You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by ww...@eecs.umich.edu on 2000/07/17 23:32:45 UTC
TreeWalker
I have a problem when I use DOM_TreeWalker. I want to visit
a subtree from a given node but I always get the error as follows:
Unhandled execption in
DOMPrint.exe(Xerces-c_1_2D.DLL): 0xC00000005: Accesss Violation.
And the following is the section of the funtion causing this
problem.
void Ele_Print(DOM_Document node)
{
DOM_NodeList list = node.getElementsByTagName("*");
DOM_TreeWalker * myWalker = new DOM_TreeWalker;
DOM_Node current = list.item(0);
printf("The Node Name is = %s\n",current.getNodeName().transcode());
myWalker->setCurrentNode(current);
....
}
It works well for the printf statement but it fails for the last
statement setCurrentNode. Could someone tell me how I can fix this
problem and other way to visit the subtree. Thanks a lot.
Best,
Wuwei