var xml:XML = <library> <shelf> <book> <chapter>Once Upon A Time</chapter> </book> </shelf> </library> ; var path1:XMLList = xml.shelf.book.chapter; trace("path1: " + path1.text()); // output: "path1: Once Upon A Time" var string:String = "xml.shelf.book.chapter"; var path2:XMLList = XMLList("xml.shelf.book.chapter"); trace("path2: " + path2.text()); // output: "path1:"
Why do I get no output with the second trace, it looks like the XMLList() dosn't work, any tips would be great. - Criptopus