Re: Problem getting attributes from a node

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 UTC