Hi, I'm trying to create a DOM tree in memory and dump the result to an XML file using FormatterToXML and FormatterTreeWalker. Somehow when I call appendChild to append the result of XPath evaluation( ELEMENT_NODE ) to the tree, the code crashes:
{ ... XercesDOMSupport domSupport; XercesParserLiaison parserLiaison(domSupport); XalanDocument* xDocument = parserLiaison.createDocument(); XalanElement * parentEle = xDocument->createElement(XalanDOMString("Parent")); xDocument->appendChild( parentEle ); parentEle->appendChild((XalanNode *)theNode); <--- crashes here ... } theNode is a valid element node retrieved from the nodelist of XPath evaluation, if I just use FormatterTreeWalker::traverseSubtree(theNode), I am able to save this into a valid XML file. However, when I add this to be a part of a DOM tree, it crashes. Can you let me know what I should do? Thanks in advance, - Crystal --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]