João Graça
Fri, 28 Aug 2009 04:29:53 -0700
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?
------------------------------------------------------------------------------ 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