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

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 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:08 UTC