i have a simple string that looks something like this...

Code:
var xml = "<mydata><name>Bob Smith</name><email>bob@smith.com</email></mydata>";
i'd like to take this string and convert it so i can run things like...

Code:
var names = xml.getElementsById("name");
var num_names = names.length;