In Java how do I evaluate XPATH expression on XML using SAX Parser?
Need more dynamic way because the XML format is not fixed. So i should be able pass the following
- xpath as string
- xml as string / input source
Something like Utility.evaluate("/test/@id='123'", "")
Oracle's XQuery processor for Java will "dynamically" stream path expressions: https://docs.oracle.com/database/121/ADXDK/adx_j_xqj.htm#ADXDK99930
Specifically, there is information on streaming here, including an example: https://docs.oracle.com/database/121/ADXDK/adx_j_xqj.htm#ADXDK119
But it will not stream using SAX. You must bind the input XML as either StAX, InputStream, or Reader to get streaming evaluation.