I’m having some issue to parse this xml:
<gallery>
<photo title=" Sampan">
<date>20/17/2007</date>
<camera>Canon</camera>
<filter>Circular Polarizer</filter>
<description>Test…</description>
</photo>
<photo title=“Test”>
<date>02/07/2007</date>
<camera>Canon</camera>
<filter>Circular Polarizer</filter>
<description>Test2…</description>
</photo>
</gallery>
I can’t get the content of <Camera> tag though.
For some reason I can parse the dates but NOT camera, filter, etc. I got “undefined” error msg.
Result:
20/17/2007
02/07/2007
var nodes = _xml.firstChild.ChildNodes;
for(var i:Number=0;i<nodes.length;i++) {
var date = nodes*.firstChild.childNodes[0].nodeValue;
var camera = nodes*.firstChild.childNodes[1].nodeValue;
trace("Date: "+date);
trace("Camera: "+camera);
}