Re: Hoo to add an attribute to a node?

Hello,

You can not append an attribute using appendChild(). It will cause a
HIERARCHY_REQUEST_ERR. You should use setAttributeNode(). This applys only
to element nodes so you may have to static_cast first.

Gareth


> 
>         if(attributes)
>         {
>           node.appendChild(myAttr); //add attribute to the node
>         }
> 
> ....
> 
> Thanks in advance
> Mario
> 
> 

Received on Tuesday, 28 November 2000 04:39:44 UTC