Domanda

How would I get a list of namespaces in an XML document using E4X?

È stato utile?

Soluzione

Use the namespaceDeclarations() method to get an array of namespaces:

var bar = new XML('<html:div xmlns:html="about:html"><p></p></html:div>');
bar.namespaceDeclarations().toString(); //about:html

References

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top