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,
N¬HS^µéX¬²'²Þu¼ÂâìSºÚ+©l·.)îÆÛ¢¸ÞéíyÖò
©âzThm¸§°úÞ'^Öt!¡ñ:(µç!h'¬-æëÞ+ax®ºwZéíj[-¢Ìµévh§ËkjØm§ÿÚvÊ,vw(öÝxïF¥"w~·ò\'$v¸ë®f¢)à+-v¸ë®X¬¶Ë(º·~àzwÛi³ÿåËl²«qçè®§zßåËlþX¬¶)ß÷hî±ê