Why is this E4X code not honoring the default namespace?
I am hacking a Firefox extension trying to use E4X. However, I ran into some strange problem:
var myXml = <test xmlns="http://test.com">
Hey
<inner>
Guys
</inner>
</test>;
var ns = myXml.namespace();
default xml namespace = ns;
this.log(myXml.*::inner);
this.log(myXml.ns::inner);
this.log(myXml.inner);
The first two operators of the magazine print "Guys". The third is empty. What's happening? I have specified a default namespace and it is actually the same as what I use in the second log statement. Why doesn't it work?
+1
source to share