blu3
07-29-2007, 03:36 PM
Let's say i have the following input xml example:
<test>
<body>
<par title="Example">
<img region="main" source="somePath"/>
<audio id="test" source="somePath2"/>
<img id="first" begin="00:00" />
<img id="second" begin="00:10" />
<img id="third" begin="00:20" />
</par>
</body>
</test>
Which i loaded from .xml file as an XML object and i would like to trace "begin" attribute value of an "img" node whose "id=second" and that would be "00:10". How can i do that, i tried with the following E4X statement:
myXML.body.par.img.(@id == "second").@begin.toXMLString())
but i get the following error in Flex Builder:
Main Thread (Suspended: ReferenceError: Error #1065: Variable @id is not defined.)
so i must have been doing something wrong but i am not sure why, can someone please help me on this?
thanks in advanced
<test>
<body>
<par title="Example">
<img region="main" source="somePath"/>
<audio id="test" source="somePath2"/>
<img id="first" begin="00:00" />
<img id="second" begin="00:10" />
<img id="third" begin="00:20" />
</par>
</body>
</test>
Which i loaded from .xml file as an XML object and i would like to trace "begin" attribute value of an "img" node whose "id=second" and that would be "00:10". How can i do that, i tried with the following E4X statement:
myXML.body.par.img.(@id == "second").@begin.toXMLString())
but i get the following error in Flex Builder:
Main Thread (Suspended: ReferenceError: Error #1065: Variable @id is not defined.)
so i must have been doing something wrong but i am not sure why, can someone please help me on this?
thanks in advanced