Hi,
I am trying to parse some XML data from a live FTP Server. I am unable to parse the elements i require into the widget screen(although i am just able to print it on the terminal). Is there any documentation that could help me achieve this (there are examples in the document but no concrete example on parsing step by step unless i am missing something).
My code currently is currently just (without parsing any element) in the updateview: function
var request = new XMLHttpRequest();
request.open( "GET", "http://www.website.com/test.xml", false );
request.send();
print("doing this!!!!!");
print( request.responseXML.toXML() );
print("doint this too !!!!!!");
I do realize currently i am just printing it into the terminal. For example say i have a parent element named 'bookstore' and child named 'name' how can i parse the value of text of the first element of 'name' ?i tried something like
element = request.evaluate( "bookstore/name" );
text = element.item(0).firstChild.data;
document.write(text);
but it just wont recogonize document.write. I am pretty new to JavaScript and XML