Is there a formula for this?
thanks
Find the Lowest Price on Thousands of Products & Save More
Shop http://salerack.googlepages.com/lowestprices.html or Click Here
Have Fun Getting Into Shape in 2008, visit FunFitness Visit: http://astore.amazon.com/funfitness-20 or Click Here
---------------------------------
Never miss a thing. Make Yahoo your homepage.
If you want to parse from a string use
var xmlDoc = new DOMParser().parseFromString(yourXmlString,
'application/xml');
If you want to parse from a file or URL then you have two options:
1) create an XML DOM document and call its load method:
var xmlDoc = document.implementation.createDocument('', 'root', null);
xmlDoc.onload = function () {
// access DOM here
};
xmlDoc.load('file.xml');
Note that loading by default happens asynchronously so you need to set
up an onload handler as shown above.
2) use XMLHttpRequest and access the responseXML property:
var httpRequest = new XMLHttpRequest();
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4) {
// access httpRequest.responseXML here
}
};
httpRequest.open('GET', 'file.xml', true);
httpRequest.send(null);
--
Martin Honnen
http://JavaScript.FAQTs.com/