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 Da...@lotus.com on 2000/09/08 18:03:26 UTC
Re: Question about obtaining a DOM_Element from a DOM_NodeList
How about:
DOM_Node node = nodeList.item(i);
if (node.getNodeType() == DOM_Node::ELEMENT_NODE) {
DOM_Element& element = static_cast<DOM_Element&>(node);
// do something with element...
}
Dave
"Lortz,
Victor" To: "'xerces-c-dev@xml.apache.org'" <xe...@xml.apache.org>
<victor.lortz@ cc: (bcc: David N Bertoni/CAM/Lotus)
intel.com> Subject: Question about obtaining a DOM_Element from a DOM_NodeList
09/08/2000
11:32 AM
Please respond
to
xerces-c-dev
I've got a newbie question that is probably answered somewhere in the
unavailable archive...
What is the best way to convert a DOM_Node object to a DOM_Element object?
I've been doing the following, but I don't like using reinterpret_cast<>.
DOM_Node node = nodeList.item(i);
if (node.getNodeType() == DOM_Node::ELEMENT_NODE) {
DOM_Element element = * reinterpret_cast<DOM_Element*>(&node);
// do something with element...
}
Regards,
Vic
------------------------------------------------------
Vic Lortz email: Victor.Lortz@intel.com
Intel's Architecture Labs phone: 503-264-3253
2111 NE 25th Avenue fax: 503-264-3483
Hillsboro, OR 97124
Let not the wise man glory in his wisdom. Let not the mighty man glory in
his might. Nor let the rich man glory in his riches; But let him who
glories
glory in this, that he understands and knows Me, that I am the Lord,
exercising lovingkindness, judgement, and righteousness in the earth. For
in these I delight. -- Jeremiah 9:23-24
------------------------------------------------------
> -----Original Message-----
> From: Paul Duffy [SMTP:paduffy@cisco.com]
> Sent: Friday, September 08, 2000 8:02 AM
> To: xerces-c-dev@xml.apache.org; 'xerces-c-dev@xml.apache.org'
> Subject: Mail Archive....
>
> Humble plea from the masses. Please get the mail archive up again
>
> At 10:51 AM 9/8/00 -0400, Jesse Pelton wrote:
> >Your code looks ok. I'm fresh out of ideas (not that I'm an expert on
> >Xerces).
> >
> >It's a pity the mail archives are unavailable. Anybody know what's up
> with
> >them? I tried sending a message to the address listed on the page that
> says
> >they're unavailable, but I've had no response, though I sent the message
> >over two weeks ago. Maybe it's time to look for another host...
> >
> >---------------------------------------------------------------------
> >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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org