It looks like you're using Xerces for the xpath stuff
instead of the built-in Jaxen xpath impl.

Look at the API for Branch/Element, and you'll see that
it directly supports XPath using the integrated Jaxen impl.

        -bob

On Thu, 1 Apr 2004, Shekhar Srivastava wrote:

> Hi All,
>
> I am new to DOM4J and I am getting the following exception in an existing system 
> that I am supporting. We are using JDK 1.4.1.
>
> NodeIterator nl = XPathAPI.selectNodeIterator( doc, xql );
> while ( ( n = nl.nextNode () ) != null )
> {
>       //...some processing
> }
>
> the xql passed is "//docinfo" and when I serialised the document passed, I find that 
> the node is present. Also this problem is occuring only for some xml files. Most of 
> the files are getting through without any error.
>
> java.lang.NullPointerException
> at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:347)
> at 
> org.apache.xml.dtm.ref.DTMDefaultBaseTraversers$IndexedDTMAxisTraverser.getNextIndexed(DTMDefaultBaseTraversers.java:576)
> at 
> org.apache.xml.dtm.ref.DTMDefaultBaseTraversers$DescendantTraverser.next(DTMDefaultBaseTraversers.java:742)
> at org.apache.xpath.axes.DescendantIterator.nextNode(DescendantIterator.java:274)
> at org.apache.xpath.axes.LocPathIterator.runTo(LocPathIterator.java:802)
> at org.apache.xml.dtm.ref.DTMNodeList.<init>(DTMNodeList.java:114)
> at org.apache.xpath.objects.XNodeSet.nodelist(XNodeSet.java:384)
> at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:205)
> at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:182)
> at 
> com.lexisNexis.ftk.foundation.utils.FTKConfigAccessor.executeXpath(FTKConfigAccessor.java:1563)
>
>
> regards,
> Shekhar Srivastava,
>
> ӆ+^隊X'u 
> {Nh&ZxnjZkzǧ[6Qϭ"ujwBӢ^r薈"zyzbg֦z{Zh+-zf)ڶ*'mig&'׎ehǫx%]n#bqall.ǟwXb?v
>

--
Bob McWhirter        [EMAIL PROTECTED]
The Werken Company   http://werken.com/


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to