# Can't change xml nodes attributes

**URL:** <https://forum.kirupa.com/t/cant-change-xml-nodes-attributes/235264>\
**Category:** flash\
**Created:** [August 9, 2007, 8:29pm UTC](https://forum.kirupa.com/t/cant-change-xml-nodes-attributes/235264 "2007-08-09T20:29:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![test1](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@test1](https://forum.kirupa.com/u/test1)\
**Post date:** [August 9, 2007, 8:29pm UTC](https://forum.kirupa.com/t/cant-change-xml-nodes-attributes/235264/1 "2007-08-09T20:29:26Z")

</div>

Ok so I’ve done this with AS2 but for some reason it’s not working in AS3. I’m new to it so I might be overlooking something. I have an xml node and I’m trying to change the value of one of it’s attributes. This worked in AS2

node.attributes.foo = “bar”

but in AS3 this creates a childnode for the node and calls it attributes and then makes a node inside that called foo like this.

\<node\>  
\<attributes\>  
\<foo\>  
bar  
\</foo\>  
\</attributes\>  
\</node\>

So what am I doing wrong? I don’t really see any documentation on how to do this otherwise. Any suggestions?
