It doesn't really solve my problem - using SAX with the Xalan/XPath API but the page you referred to seems to suggest that it is OK to create a Node object simply to hold the namespace for the document and that in turn makes it possible to create precompiled XPath expressions.
Thanks! /Christoffer Soop On Fri, May 03, 2002 at 11:57:33AM -0400, Elliotte Rusty Harold wrote: > >I having great difficulties understanding the XPath API and would > >really apreciate some help. > > > >What I would like to do is to > > > >1. Create several, precompiled XPath expressions > >2. On demand parse an XML-document from a java.lang.String and apply > >the precompiled XPaths to the parsed document one at a time. > > > >Ideally I would like to accomplish the above using SAX and DTM. If > >anybody could supply me with some code that does something similar > >to this I would be more than grateful! > > > > Soem of this is demoed at > http://www.cafeconleche.org/books/xmljava/chapters/ch16s04.html > > I don't use DTM at all, but this may be helpful. > -- > > +-----------------------+------------------------+-------------------+ > | Elliotte Rusty Harold | [EMAIL PROTECTED] | Writer/Programmer | > +-----------------------+------------------------+-------------------+ > | The XML Bible, 2nd Edition (Hungry Minds, 2001) | > | http://www.cafeconleche.org/books/bible2/ | > | http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/ | > +----------------------------------+---------------------------------+ > | Read Cafe au Lait for Java News: http://www.cafeaulait.org/ | > | Read Cafe con Leche for XML News: http://www.cafeconleche.org/ | > +----------------------------------+---------------------------------+ -- Christoffer Soop <[EMAIL PROTECTED]> +46 (0)730 74 68 15 / +46 (0)8 651 24 36
