> ///XML file
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
> <catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> 
>    <book> 
>       <author x="10">Adams</author>
>       <State>NC</State>
>       <subbook>
>                        <genre>Computer</genre>
>                        <price>44.95</price>
>       </subbook>
>     </book>
>     <secondAuthor>234</secondAuthor>
> </catalog>
> ////
> 
> My XPath query is /catalog/book/child::[EMAIL PROTECTED]
> evaluate() returns a NodeSet with 0 nodes in it.

I ran your document with the sample program SimpleXPathAPI that ships with 
Xalan-C, and it found one node using your document and XPath expression. I 
don't know why your code is failing, but you might want to compare it to 
the sample code.

> 
> I used "Visual XPath" and it returned 10.

If "Visual XPath" returned 10 nodes evaluating that XPath expression with 
the exact document you've supplied then it has a bug.  There are only 3 
child elements of "book", and there is only one with an attribute "x".

Dave

Reply via email to