count xml tag from HTTPService.lastresult in flex 3

Systorgan

New Member
I have a PHP file echoing the following XML:\[code\]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>';\[/code\]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.\[code\]var pages_xml:XML = XML(httpservice.lastResult);Alert.show(pages_xml.page.images.image.length());\[/code\]can anybody help?. thank you in advance.
 
Back
Top