Maybe you already now Stax, the performant (if you say how to param your parser
![]() Unfortunately (and logically int a streaming approch) it doesn't implement the XPath processor. And I need to ask to the user the complete access tree to a element (for exemple "/myroot/mylist/myelementwanted"). Do you know a xpath like tool based on Stax? Or an easily changeable factory to define an EventFilter stax with the dynamic path? Thanks for help me! -------------------- m2f -------------------- Read this forum topic online here: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=295#295 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
I think that StAX and XPath are not technologies very close. XPath needs to read completely the stream to run.
If you need only few XPath expressions, perhaps can you use StAX filters. -------------------- m2f -------------------- Read this forum topic online here: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=296#296 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
In reply to this post by cdeneux-4
All rights.
I think that the EIP compnent would be "quick-run oriented" (so SAX through JAXP or StaX, to be quick for a simple sequential treatment) and not "loud-treatment oriented" (so JDOM today, to do complex search an a xml tree). The problem is that all patterns are user fronted with XPath Expression. I need to found an easy method, understandable and standard for the newbie, such as XPath, to switch from JDOM to StAX... -------------------- m2f -------------------- Read this forum topic online here: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=297#297 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
In reply to this post by cdeneux-4
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) :
-------------------- m2f -------------------- Read this forum topic online here: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=300#300 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
In reply to this post by cdeneux-4
I think the problem of Frederic is more a sax event problem,
Fred, I think you want to catch all elements of your xml source that respect a rule, such as “I want all elements in root/list/element” for example And you don’t want to make some xpath tests Am I right ? -------------------- m2f -------------------- Read this forum topic online here: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=302#302 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
In reply to this post by cdeneux-4
All right for my current Splitter pattern. But I would like switch all the patterns to Stax so, and it uses XPath to stipulate conditions ("element >100") moreover path ("root/list/element") ![]() -------------------- m2f -------------------- Read this forum topic online here: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=303#303 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
In reply to this post by cdeneux-4
Hi. You can use Apache Axiom. It is an API that uses the StAX parser. Axiom supports XPATH.
-------------------- m2f -------------------- Subscribe/Unsubscribe emails notifications. Response to this email will be posted on the Petals forum. Please delete the existing text before responding :) Read the topic online: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=30364#30364 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
I would recommend VTD-XML as a way to achieve better perforamnce than StAX, VTD-XML is faster (according to the spec) and natively supports XPath 1.0 (full set)
http://vtd-xml.sf.net -------------------- m2f -------------------- Subscribe/Unsubscribe emails notifications. Response to this email will be posted on the Petals forum. Please delete the existing text before responding :) Read the topic online: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=30388#30388 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
Is it lgpl?
-------------------- m2f -------------------- Subscribe/Unsubscribe emails notifications. Response to this email will be posted on the Petals forum. Please delete the existing text before responding :) Read the topic online: http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=30389#30389 -------------------- m2f -------------------- _______________________________________________ General mailing list [hidden email] http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general |
Free forum by Nabble | Edit this page |