I'm trying to get values from an XML document into flash ...
code:

profile_xml = new XML();
profile_xml.onLoad = Start;
profile_xml.load("XML_Files/profile.xml");
profile_xml.ignoreWhite = true;

// Intialize variables

function Start(success) {
if (success == true) {
rootNode = profile_xml.firstChild; // References xml doc tree

firstClass = rootNode.firstChild; // References first class


currentClass = firstClass;

totalClasses = currentClass.childNodes.length; // Counts amount of classes

trace(totalClasses);

/** Outputs for flash **/
displayName = currentClass.firstChild.attributes.text;

displayAge = currentClass.firstChild.nextSibling.attributes.tex t;

displayStatus = currentClass.firstChild.nextSibling.nextSibling.at tributes.text;

displayAlias = currentClass.firstChild.nextSibling.nextSibling.ne xtSibling.attributes.text;

displayTitle = currentClass.firstChild.nextSibling.nextSibling.ne xtSibling.nextSibling.attributes.text;

displayEmploy = currentClass.firstChild.nextSibling.nextSibling.ne xtSibling.nextSibling.nextSibling.attributes.text;

displayInspirations = currentClass.firstChild.nextSibling.nextSibling.ne xtSibling.nextSibling.nextSibling.nextSibling.attr ibutes.text;

displayDescription = currentClass.firstChild.nextSibling.nextSibling.ne xtSibling.nextSibling.nextSibling.nextSibling.next Sibling.attributes.text;
/**/
}
}



but I have to keep writing the ".nextSibling" to get the proper value ... is there of doing it with writing the ".nextSibling" over and over again ....

here is the XML file

PHP Code:
<?xml version="1.0" encoding="UTF-8"?>

<my_profile>

<profile section="about_me">
<name text="Steven"></name>
<age text="21"></age>
<status text="Single"></status>
<alias text="test"></alias>
<title text="Web Developer, Programmer"></title>
<employed text="Work></employed>
<inspirations text="Friends, Nature"></inspirations>
<description text="Des"></description>
</profile>
</my_profile>
Can anybody help me?