dragonballs2
Programmer
I am having trouble finding a function that converts XML to a multidimensional array. I'll appreciate your input, please.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
var xml = getxml();
var doc = parser.parseFromString(xml, "text/xml");
var elements = doc.getElementsByTag('name of tag');
var array = new Array();
for(var i = 0; i < elements.length; i++)
{
array.push(elements[i].innerHtml);
}
var xml = getxml();
var array = new Array();
$(xml).each(function(i, e){
array.push($(e).val());
});