you could use the DomParser. to extract values from the xml. From there you could build up your array.
something like
Code:
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);
}
a library like jquery would make this even easier
Code:
var xml = getxml();
var array = new Array();
$(xml).each(function(i, e){
array.push($(e).val());
});
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.