Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLDOM 2

Status
Not open for further replies.

brianpercival

Programmer
Jun 13, 2005
63
US
I have a simple question.

------------------------------------------------------
var temp="";
temp=temp+'<?xml version="1.0"?><menus>blah blah</menus>'
useTemp(temp);
------------------------------------------------------
ABOVE WORKS FINE.

INSTEAD OF HARDCODING temp, NOW I DO A
var temp="";
var curMenuXML = new ActiveXObject("Microsoft.XMLDOM");
curMenuXML.async = false;
curMenuXML.load("getCurUserFavorites.cfm");
NOW WHAT PROPERTY OF curMenuXML SHOULD I USE TO GET ITS TEXT VERSION? I USED
temp=curMenuXML.xml but didn't work (because xml property is actually an object of some sort. )

HOW DO I GET IT AS A STRING VERSION????


regards,
Brian

 
Jeff,
I tried that and did an alert on it, brings back null. I changed the content-type for the target file as both 'xml'and 'html' still it wouldn't work. Any ideas?

regards,
Brian
 
Hmmm - content-type text might do the trick? I'll take a look when I get home and see if I have better fortune testing :)

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
OK,

here is what I did finally. Instead of using a xmldom object, I used a xmlhttp and got the response as .text and it works fine. the content-type I left as text/xml and it works fine.

regards,
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top