How to escape a colon when parsing XML in actionscript?
say I have XML like this:
<root>
<x:Item>test</x:Item>
</root>
How would I navigate to the x:Item
node?
I tried myXml..x:Item
and myXml..x::Item
but both throw errors. The first won't compile and the second complains about me trying to use NameSpace '0开发者_如何学运维'.
I ended up adding the namespace to my XML in my actionscript and that solved the issue. You can find the documentation here. The coded endedup looking like this:
var wNS:Namespace = new Namespace("w", "http://www.test.com/weather/");
myXmlMessage.addNamespace(wNS);
Just on top of my head...
myXML[0].Item
精彩评论