1

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

David Wolever
  • 148,955
  • 89
  • 346
  • 502

1 Answers1

1

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

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265