David Wolever
David Wolever

Reputation: 154644

E4X: List document namespaces?

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

Upvotes: 1

Views: 100

Answers (1)

Paul Sweatte
Paul Sweatte

Reputation: 24627

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

Upvotes: 1

Related Questions