0

Using a STAX parser , I have to extract nodes whose name is repeated at many other paths in same XML. So, I am ending up creating lots of booleans for reaching to each path.

Please suggest a way like XPath by which Iterator could go directly to specified path in XML and extract its value. XML is so structured that even though same name appears many times in XML at different paths, if I continue forward parsing only, all requirements will be met..

Just need to reduce boiler-plate code to reach there..

Thanks

fortm
  • 1
  • Find similar questions here https://stackoverflow.com/questions/1863250/is-there-any-xpath-processor-for-sax-model and https://stackoverflow.com/questions/7215931/reading-huge-xml-file-using-stax-and-xpath – jschnasse Feb 26 '18 at 09:47

1 Answers1

0

Try XSLT or XProc with Streaming implementations like Saxon and QuiXProc

innovimax
  • 11
  • 1