Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Newbie to XML - problem using xmlhttp >Thread Next - Re: Newbie to XML - problem using xmlhttp Re: Newbie to XML - problem using xmlhttpTo: NULL Date: 6/4/2007 6:42:00 PM
Tim Platt wrote:
>> With IE if responseXML has not been populated that you might be able to use
>> xmlhttp.responseXML.load(xmlhttp.responseBody)
>>
>
> We only use IE. I have tried the line above, and it displays as True.
> Does that mean it is usable and if so can you point me in the right
> direction in how to extract the data.
If you are only using IE then there is no need to use XMLHTTP to load an
XML document, instead you can use
var xmlDocument = new ActiveXObject('Msxml2.DOMDocument.3.0');
xmlDocument.onreadystatechange = function () {
if (xmlDocument.readyState === 4) {
if (xmlDocument.parseError.errorCode === 0) {
// here you can access nodes with selectNodes or
selectSingleNode or getElementsByTagName
}
else {
// handle parse errors here
}
}
};
xmlDocument.load('file.xml')
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
