views:

171

answers:

1

I'm hacking around in a Firefox extension, trying to use E4X. However, I've come across a weird problem:

var myXml = <test xmlns="http://test.com"&gt;
     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 log statements print "Guys". The third is blank. What's going on? I've specified the default namespace, and it's in fact the exact same thingas I'm using in the second log statement. Why doesn't this work?

Mozilla's documentation suggests this should work.

A: 

In Firefox 3 your code runs as you expect. Maybe you run into a bug found in older version of Gecko?

Sergey Ilinsky
This is in Firefox 2, in an extension...
BRH