Hello all,

I am having no luck getting values from the children nodes.  Any suggestions
on what to do?



here is a code subset of what I did...
          DOM_Document doc = parser->getDocument();
          DOM_NodeList nodeList = doc.getElementsByTagName("Server");
          for(DOM_Node child=doc.getFirstChild(); child!=NULL;
child=child.getNextSibling() )
          {
             if (child.getNodeType()== DOM_Node::ELEMENT_NODE)
             {
                  
                int chTypeNode = child.getNodeType();
                DOMString chNodeName = child.getNodeName();
                char* chNodeNameVal = chNodeName.transcode();
                  DOM_Node children = doc.getFirstChild();
                DOMString chNdValue = children.getNodeValue();
                char* chNdNameVal = chNdValue.transcode();
                  //I want to print out each value in the children nodes
                cout << "\nValues are" << chNdNameVal << endl;
             }
             else
             {
               //do nothing
             }
          }


My XML file looks something like this...

<HWCONFIG>
    <Server>
        <HostName>
            PEPSI
        </HostName>
        <Channel>
            <Type>
                TNT
            </Type>
        </Channel>
    </Server>
</HWCONFIG>
I am trying to get the values PEPSI and TNT out. And having no luck

If you have any suggestions it would be greatly appreciated...
Thanks in Advance.


Brian Jones
Software Engineer
(Email) [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to