Re: Request help parsing XML reply from HTTPRequest



In article <46fa816b$0$16109$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Martin.Honnen@xxxxxx wrote:
Doug Miller wrote:

Client side is IE6 / Win XP Pro SP2. I have no idea what the server side
environment is. It doesn't belong to me, I have no control over it, and I
have
to take what I can get.

Do you simply want to load an XML document and parse it with IE 6?

No -- I'm sending an HTTP request to a remote server, and I need to parse the
XML response that the server returns.

Then you don't need XMLHttpRequest, instead you can do e.g.
var xmlDocument = new ActiveXObject('Msxml2.DOMDocument.3.0');
xmlDocument.onreadystatechange = function () {
if (xmlDocument.readyState === 4) {
alert(xmlDocument.getElementsByTagName('package').length);
}
};
xmlDocument.load('file.xml');

XMLHTTP and responseXML will only work if the server sends the XML with
the HTTP response header Content-Type with value text/xml or
application/xml.

And if it doesn't?

--
Regards,
Doug Miller (alphageek at milmac dot com)

It's time to throw all their damned tea in the harbor again.
.



Relevant Pages

  • Re: Recordset.Open Causes Lockup/Timeout
    ... > running Windows Server 2003. ... This works great for server side xml requests ... > when the request is outside of my domain, but when I make a request ... > Page "A" returns the final response to the Client Browser ...
    (microsoft.public.inetserver.asp.db)
  • SOAP Request is repeated in the SOAP response.
    ... I'm using SOAP tool kit version 3 in my application. ... My response from the server is sent within a tags and after ... In my case I send a XML to the server and after doing dome processing ...
    (comp.text.xml)
  • Re: Web service was working, now not working
    ... You probably didn't enable HTTP during XML/A setup. ... > I've verified that the AS server is working and available. ... > XML for Analysis is configured to require a secure transport ... Perhaps the full response would ...
    (microsoft.public.data.xmlanalysis)
  • Re: ajax newbie question
    ... My server is using classic ... asp doing a response.write "a block of xml". ... TBH I always use an XML DOM to build an XML response rather than sending ...
    (microsoft.public.scripting.jscript)
  • Re: Duplicate Record with .ADDNEW
    ... If the database server will allow you to create a table without something, ... table there is no possibility of duplicate records. ... field imported from the XML. ... Use the Command object instead. ...
    (microsoft.public.vb.database.ado)