No luck! I'm also trying to stick with org.w3c.dom Element instead of dom4j
implementation.

On Fri, Aug 28, 2009 at 1:52 PM, Destry Gustin <dgus...@braishfield.com>wrote:

>  Hi Joao,
>
> I’m not sure if this will help or not, but this is a segment of code that I
> use to iterate through elements in a document.
>
>
>
> *for*(Iterator<Element> iter =  xmldoc.getList(“xPathExpression”).iterator();
> iter.hasNext();){
>
> Element trans = iter.next().createCopy();
>
> //Do something to the element
>
> }
>
>
>
> Thanks,
>
> Destry
>   ------------------------------
>
> *From:* João Graça [mailto:jmgr...@gmail.com]
> *Sent:* Friday, August 28, 2009 7:29 AM
> *To:* dom4j-user@lists.sourceforge.net
> *Subject:* [SPAM] - [dom4j-user] Trying to get a W3C DOM Element from an
> XPathevaluation - Email found in subject
>
>
>
> Hi! I've just started using dom4j instead of Sun API in an Android app and
> I'm running into some problems in XPath. I looked at Sun API usage and tried
> to do the same in dom4j but it's not working. I would greatly appreciate any
> help on this. I want to do an xpath.evaluate(expression, context,
> returnType) in dom4j. My approach was to create an xpath object and then
> call its evaluate method:
>
> org.dom4j.XPath myXpath = new
> org.dom4j.dom.DOMDocumentFactory().createXPath(expression);
> Object myResult = myXpath.evaluate(context); //
>
> But this approach fails to result in an instance of org.w3c.dom.Element as
> Sun does. dom4j selectSingleNode() fails as well. Any hints on this?
>
> *Please remember coverage cannot be bound, amended or cancelled via the
> email or voicemail system. You cannot bind, alter, or cancel coverage
> without speaking to an authorized representative of Braishfield Associates,
> Inc. Coverage cannot be assumed to be bound without confirmation from an
> authorized representative of Braishfield Associates, Inc.
> *
>
> *DISCLAIMER:
> *CONFIDENTIALITY NOTICE: Braishfield Associates, Inc. would like you to
> know that the information contained in this communication, including
> attachments is privileged and confidential. It is intended only for the
> exclusive use of the addressee. If the reader of this message is not the
> intended recipient, or the employee or agent responsible for delivering it
> to the intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited.
> Insurance coverage can not be bound, amended or changed via an e-mail
> message without knowledge or consent from the insuring carrier. If you have
> received this communication in error please notify us by telephone
> immediately at (407) 825-9911 or e-mail disclai...@braishfield.com. Thank
> you.
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to