Hi all, I have a simple XML string: <d><id>1</id></d> After parsing this string, I wrote a function to traverse this DOM tree to get the node name/pairs. I'm running into a weird problem when I try to get the node name of <d>'s child (which is "id"):
Note: In the following code, the current node being processed is <d>. (1) This piece of code works, and the print out is "id": DOMNodeList *children = node->getChildNodes(); cout << XMLString::transcode((children->item(1))->getNodeName()) << endl; (2) This code does not work, and the print out is "#text": cout << XMLString::transcode((node->getFirstChild())->getNodeName()) << endl; Does anyone know why the "getFirstChild()" function does not return the expected results? Is this a bug? Thanks for your time and help. Regards, Monica __________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]