Thx, Erik and Parul but ...
how can I get the element? I selected the right node (ElementLength)
but I cannot compile this because getAttribute is not a member of
the DOMElement class.
I tried getAttributeNode, but it doesn�t work, either...

Jeez. I am completely stuck now. No ideas any more... Maybe someone else?


what�s wrong ???


// ---------------------------------------------------------------------------
//   printAttributeValue
// ---------------------------------------------------------------------------
static void printAttributeValue(DOMNode *node, char *attributeName)
{
   // doesn�t compile
   const char* pzMin = XMLString::transcode(node->getAttribute(attributeName));

return;

} // printAttributeValue()




main():


...

// scan children of <Type>
for (typeChild = node->getFirstChild();
     typeChild != 0;
     typeChild = typeChild->getNextSibling())
{
   if (typeChild->getNodeType() == DOMNode::ELEMENT_NODE)
   {
      // Element ElementLength
      if (XMLString::compareString(typeChild->getNodeName(), "ElementLength") == 0)
      {
         printNodeName(typeChild); // prints "ElementLength" -> right node!!!
         printAttributeValue(typeChild->getFirstChild(), "min");
      }
   }
}


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



Reply via email to