printAttributeValue(typeChild->getFirstChild(), "min");
Thx. That helped a lot. In my opinion the first child of ElementLength was the attribute min.
And by the way, getFirstChild() returns a DOMNode* which doesn't have the getAttribute method. You need to cast it to an DOMElement*, see below.
You will not believe it. It just does not compile. See was g++ issues:
// --------------------------------------------------------------------------- // printAttributeValue // --------------------------------------------------------------------------- static void printAttributeValue(DOMNode *node, char *attributeName) { const XMLCh *attrName;
DOMElement *nodeElement = NULL; // added * here!
if (node)
{
nodeElement = static_cast(DOMElement *) (node); // what is the problem?
attrName = nodeElement->getAttribute(XMLString::transcode(attributeName));
}return;
} // printAttributeValue()
DomParse.cpp: In function `void printAttributeValue(xercesc_2_2::DOMNode*, char*)': DomParse.cpp:32: parse error before `DOMElement' make: *** [DomParse.o] Error 1
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
