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

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top