João Graça
Fri, 28 Aug 2009 08:05:50 -0700
I reckon it might be a better idea, in a server side context, to actually use the dom4j implementation and then export a w3c element for interfacing with the outside world. I'll keep looking into it. Thanks for your help!
On Fri, Aug 28, 2009 at 3:59 PM, Destry Gustin <dgus...@braishfield.com>wrote: > Sorry, I’ve only used d4j’s implementation, but I imagine you could > easily loop trough all attributes and elements within this element and then > build a w3c element. > > > > Thanks, > > Destry > ------------------------------ > > *From:* João Graça [mailto:jmgr...@gmail.com] > *Sent:* Friday, August 28, 2009 10:46 AM > *To:* Destry Gustin; dom4j-user@lists.sourceforge.net > *Subject:* Re: [SPAM] - [dom4j-user] Trying to get a W3C DOM Element from > an XPathevaluation - Email found in subject > > > > 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. > > > > *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