the e4x implementation in as3 doesn't seem to be able to handle node names that have dashes in them. The musicbrainz api returns xml with a node named artist-list
and i can't seem to get it to let me access the node.
sample from http://musicbrainz.org/ws/1/artist/?type=xml&name=dr%20dog :
<metadata xmlns="http://musicbrainz.org/ns/mmd-1.0#" xmlns:ext="http://musicbrainz.org/ns/ext-1.0#">
<artist-list offset="0" count="1090">
<artist type="Group" id="e9aed5e5-ed35-4244-872e-194862290295" ext:score="100">
</artist>
</artist-list>
</metadata>
If I try to access it like so myXml.artist-list
i get the compile time error:
Error: Access of undefined property list.
Anybody know of a workaround?
--Edit: full source--
var l:URLLoader = new URLLoader();
l.load(new URLRequest("http://musicbrainz.org/ws/1/artist/?type=xml&name=dr%20dog"));
l.addEventListener(Event.COMPLETE, function(e:Event) {
var myXml:XML = XML(e.target.data);
trace(myXml.artist-list)
});