You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Alberto Massari <am...@progress.com> on 2003/03/24 16:59:58 UTC
Re: parsing DOM tree: How to get attribute values ( Idon´t like monday s)
At 16.55 24/03/2003 +0100, you wrote:
>>The C++ syntax for static cast is static_cast<DOMElement*>(node)
>
>Good try. Unfortunately it has not helped. :-/
>
>Time to get drunk...
I think so; has the following code been written *after* my e-mail? I still
see the parenthesis "()" instead of the angle brackets "<>" around the
"DOMElement"
Alberto
>// ---------------------------------------------------------------------------
>// printAttributeValue
>// ---------------------------------------------------------------------------
>static void printAttributeValue(DOMNode *node, char *attributeName)
>{
> const XMLCh *attrName;
>
> DOMElement *nodeElement = NULL;
>
> if (node)
> {
> nodeElement = static_cast(DOMElement*)(node); // line 32
> 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: xerces-c-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org