W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Re: Problem getting attributes from a node

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Fri, 9 Feb 2001 17:02:21 -0500
To: "Lothar Behrens" <lothar.behrens@okay.net>
Cc: www-dom@w3.org
Message-ID: <OFB67FE4FF.05E4D659-ON852569EE.0078663E@pok.ibm.com>

The fact that there isn't a standardized DOM binding for C++ makes this
difficult to answer without knowing exactly which DOM implementation you're
using. Conceptually, you're doing the right sort of thing -- retrieving a
Node from the map of attributes and casting it to an Attr. But the details
of typecasting depend on the details of the binding, so you may get more
and better answers if you ask in a mailing list which is specific to your
tools.

One suggestion: Try rewriting this as:
     DOM_Attr a_node = node.getAttribute(DOMString(name));
That will avoid having to typecast in your own code.

______________________________________
Joe Kesselman  / IBM Research
Received on Friday, 9 February 2001 17:02:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT