jQuery: How to find out the root tag name in XML? -


i need know name of root tag in xml. how find out?

the fastest (safe) way grab (assuming have xml in string or jquery wrapper already) be:

var firstnodename = $(xml).attr("nodename"); 

if xml in wrapper, no need $(), xml.attr() do.

you can test out here.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -