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 Tomas Telecky <to...@volny.cz> on 2004/09/28 18:19:33 UTC
DOMElement?
Hi,
when I have the DOM structure created using Xerces-C++, then I can get
the DOMDocument object. From it I get the first DOMElement object. How
do I get the other DOMElement objects? I can only call the
DOMNode::getFirstChild() which returns me the node of type ELEMENT_NODE
but dynamic cast to DOMElement on it fails and typeid says that it is of
type DOMNode. So how to do it?
Thanks
Tomas
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: DOMElement?
Posted by Alberto Massari <am...@progress.com>.
At 18.19 28/09/2004 +0200, Tomas Telecky wrote:
>Hi,
>
>when I have the DOM structure created using Xerces-C++, then I can get
>the DOMDocument object. From it I get the first DOMElement object. How
>do I get the other DOMElement objects? I can only call the
>DOMNode::getFirstChild() which returns me the node of type ELEMENT_NODE
>but dynamic cast to DOMElement on it fails and typeid says that it is of
>type DOMNode. So how to do it?
You cannot use dynamic_cast<> unless you compile the sources with RTTI
enabled; you should just use the (DOMElement*) cast, once you have tested
that the node type is DOMNode::ELEMENT_NODE
Alberto
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org