[General] Stax has an "XPath like"?
cdeneux
petals-features at ebmwebsourcing.com
Wed Mar 16 10:20:03 CET 2011
Your first need is to have "an easy method, understandable and standard for the newbie", and I think that XPath is the right one.
Your performance need through StAX is a second need.
I think that you will start to implement your XPath need. As XPath needs a full representation of the XML tree in memory, StAX can be used with XMLBeans to create this tree. Saxon is a good XPath engine, moreover it is compliant with XPath 2.0.
Example (putting Saxon librairies in the classpath) :
Code:
final XMLStreamReader xsr = xifThreadLocal.get().createXMLStreamReader(...);
final XmlObject xmlRequest = XmlObject.Factory.parse(xsr);
final XmlObject[] values = xmlRequest.selectPath("xpath_expression");
-------------------- m2f --------------------
Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=300#300
-------------------- m2f --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/general/attachments/20110316/17686a9b/attachment.htm>
More information about the General
mailing list