I have a PHP file echoing the following XML:
header("content-type:xml-text");
echo '<?xml version="1.0" encoding="UTF-8"?>
<pages>
<page>
<user>1</user>
<name>book1</name>
<theme>mariage</theme>
<width>20</width>
<height>25</height>
<images>
<image>image1.jpg</image>
<image>image2.jpg</image>
<image>image3.jpg</image>
<image>image4.jpg</image>
</images>
</page>
</pages>';
i'm using flex HTTPService to get the the xml file and i need to count the number of images in it (4 in this particular case).
I've used the following code and it show 0 every-time.
var pages_xml:XML = XML(httpservice.lastResult);
Alert.show(pages_xml.page.images.image.length());
can anybody help?. thank you in advance.
the following code worked fine.