You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Brian Quinlan <Br...@ActiveState.com> on 2001/02/16 20:29:10 UTC
NULL node pointer in Xalan C++ 1.0
Hi,
I am trying to get Xalan to display the full tree for the result of XPath
expressions for debugging purposes.
In a simple example, I evaluate "//*", grab all of the XalanNodes from the
resulting nodeset and then iterate across each node's children in a loop
like this:
const XalanNodeList* childNodes = node->getChildNodes( );
for ( int l = 0; l < childNodes->getLength( ); ++l )
assert( childNodes->item( l ) ); // This causes an assert!
The problem is that childNodes->item() returns a NULL pointer even though
getLength() returns the correct value.
At the bottom level of the call to childNotes->item( ), THIS_CLASS::item( )
is returning a valid NodeImpl pointer, so I suspect that the problem is with
m_navigator.mapNode( ). Any ideas? Is this intentional or a bug?