# Load properties from xml + using attributes - how?

**URL:** <https://forum.kirupa.com/t/load-properties-from-xml-using-attributes-how/183460>\
**Category:** flash\
**Created:** [March 27, 2006, 10:12am UTC](https://forum.kirupa.com/t/load-properties-from-xml-using-attributes-how/183460 "2006-03-27T10:12:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rasper](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@Rasper](https://forum.kirupa.com/u/Rasper)\
**Post date:** [March 27, 2006, 10:12am UTC](https://forum.kirupa.com/t/load-properties-from-xml-using-attributes-how/183460/1 "2006-03-27T10:12:00Z")

</div>

I want to use xml to load the properties of my flash movie instead of a .txt file. What I have in mind is the following piece of xml:

```auto
<root>
 <property name="color" value="0xffff00" />
 <property name="height" value="100" />
 <property name="background" value="no" />
</root>

```

I know how to use the XML.load(“settings.xml”); function in flash, but I’m not sure how to use the name attributes to get the values. I don’t know if this is even possible? What I’ve only done so far with xml is use a for-loop to iterate through all the nodes. I’ve never used attributes.

So I think my question is: **Can I access a particular node within my xml, by calling it by it’s (unique) nodename or attribute-name?**

Can someone push me in the right direction please?

---

<div class="post-metadata">

**Author:** ![Rasper](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@Rasper](https://forum.kirupa.com/u/Rasper)\
**Post date:** [March 27, 2006, 12:31pm UTC](https://forum.kirupa.com/t/load-properties-from-xml-using-attributes-how/183460/2 "2006-03-27T12:31:46Z")

</div>

Okay found it myself

```php
 
path = "/root/property[@name='color']";
arNodes = mx.xpath.XPathAPI.selectNodeList(this.firstChild, path);
trace(arNodes[0].attributes["value"]);

```
