A few folks seem to have done XPath-subsets of this kinda thing. e.g. dom4j allows the registration of path based ElementHandler objects that allows you to process elements as they are parsed, which avoids needing the whole document in memory.
One day it'd be cool to create a special kind of XPath implementation in Jaxen that would allow at least a subset of XPath to be evaluated on SAX streams. For SAX it might make sense to register all the XPath expressions that are required, then the document can be parsed to evaluate the answers. e.g. SAXXPathEngine engine = new SAXXPathEngine(); Result result1 = engine.registerPath( "/foo"); Result result2 = engine.registerPath( "/foo/bar/@x"); ... xpath.parse( "foo.xml" ); One day it'd be cool if this could figure out what parts of the document need to be turned into Nodes to evaluate the XPath expression. Maybe the easiest way to implement the above could actually be via an XSLT stylesheet. Any contributions would be very welcome ;-) James ----- Original Message ----- From: "Andrew Eiler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 30, 2002 8:11 PM Subject: [Jaxen] Is there an XPATH implantation that uses SAX? > Hello, > > I am looking for is a SAX XMLFilter that wraps around XPATH. This would > allow me to filter a document down to only the parts I need at parse time, > Otherwise, I have to load the document into memory, then select the nodes I > need. > > Has anyone tried to implement such a thing? > > > Thanks, > > Andrew > > > > > > > > > > > > > ---------------------------------------------------- > This email with all information contained herein or attached hereto may > contain confidential and/or privileged information intended for the > addressee(s) only. If you have received this email in error, please contact > the sender and immediately delete this email in its entirety and any > attachments thereto. > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Jaxen-interest mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jaxen-interest > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest