How would I get a list of namespaces in an XML document using E4X?
Asked
Active
Viewed 97 times
1
-
Would this help? http://stackoverflow.com/questions/922668/e4x-grab-nodes-with-namespaces – Kumsal Obuz Nov 08 '11 at 15:56
-
Also this would help : http://stackoverflow.com/questions/8080947/xml-namespaces-and-e4x – Kumsal Obuz Nov 10 '11 at 15:18
1 Answers
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