// In this sample, we have an XML file as follow:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<DATA>
<VERSION>1</VERSION>
</DATA>
// The JavaScipt code to retrieve the content of the tag VERSION
// is as follow:
mioxml_download("www.mioplanet.com/data.xml", "xml_data_loaded");
// Download completed...
function xml_data_loaded(status) {
if(status == 1) {
ver = mioxml_getElement(MIO_XML.xml, "VERSION");
alert(ver);
} else {
// Failure: can be a wrong URL or an error in the XML file
alert("Failure");
}
} |