OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] sax parser and xpath

[ Lists Home | Date Index | Thread Index ]

> My process receives an xml doc, and uses a xpath expression 
> i.e. x/y/z[2] to designate a node on which to perform a 
> pagination operation.  I am proceeding with a jaxp sax class 
> that will walk through the doc and build the hierarchal node 
> name in order to test against the xpath expression.  

That's possible only for a very restricted subset of XPath (roughly the
subset used in XML Schema, for similar reasons). As soon as you get
something like

/x/y/z[t]

you're stuck: you can't test for that in a SAX application without
lookahead.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com  





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS