Link to home
Start Free TrialLog in
Avatar of Travis Hydzik
Travis HydzikFlag for Australia

asked on

jQuery/JavaScript obtain Element name of root element in XML

experts,

I have the following bit of code that reads an xml file;
jQuery.get(xml, function (data) {

}

Open in new window


I want to get the root element's name.
I have read that the following will select the root element;
jQuery(data).filter(":first")

Open in new window


what do I add to get the name of this root element?
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Travis Hydzik

ASKER

great!