View Full Version : httprequest and dom document creation

03-24-2005, 06:40 AM
hi all,
i have created http request using newhttprequest() and the response is
this contains xml content like
<district code =01 name=xxx>
like tht

first i was usign this in ie browser i got result usign responseXml . so the contaent wil be in xml type and
objPoster = new ActiveXObject("MSXML2.XMLHTTP.3.0");
i fetched using objposter.responseXml.Selectnodes("districts/district")

but i doesnot works in mozilla and other browsers netscape.
so i have created this

i have read tht i have to create dom docuemnt
objDOM = document.implementation.createDocument("","", null);
now i want to knw how to load the xml request into the domdocuemnt and get the value stored in the nodes .
i tried xmldoc.load but it loads only xml files.
mine is a string
responseXml is not workign in mozilla and other browsers.
plz help me regardign this issue

03-24-2005, 09:49 AM
ActiveX object works for IE only, for Moz you may use XML HTTP Request object.

See also this article (http://jibbering.com/2002/4/httprequest.html)

03-28-2005, 12:13 PM
actually for the script
objPoster=new ActiveXObject("Msxml2.XMLHTTP.4.0"); i have used

objPoster = new XMLHttpRequest();

now i have got xml string thorugh this code

since this is a response text xml is in the form of string

responsexml is not workign in mozila browsers

so i want to kwn how to get the xml mode values

the xml string is as follows
<district code=001 name="xxx">

i want to get the value stored in code and name nodes

how can i get it
is not workign in mozila browsers

plz help me in this issue

03-28-2005, 12:56 PM
I have heard about a crossbrowser library called SARISSA which might help you in your particular attempt. Google for it.

here's a start

03-28-2005, 03:26 PM
responseXml is not workign in mozila browsers...

Sounds like the header content of the page is most liekly not set to text/xml. I ran into that problem.


03-28-2005, 05:50 PM
Frankly said, I have not yet need it, so I have only pointed out an article I have seen, but no verify...so...