Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Loading an in-memory XmlDocument directly into an XMLDOM object

Reply
Thread Tools

Loading an in-memory XmlDocument directly into an XMLDOM object

 
 
Robert Zurer
Guest
Posts: n/a
 
      06-28-2005
Hello all,

I want to load an in-memory XmlDocument from the server to the client and
create an XMLDOM object using javascript.

I can do it from a url by calling this Javascript from the client.

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = "false";
xmlDoc.load(url);

but I want to load it directly from the server.

I have tried to use the Xml server control. This deposits the xml ob the client
but I don't know how to load it into an XMLDOM.

As a workaround, I wrapped the XML server control in a div ('divTest') and
called this javascript

var divTest = document.getElementById("divTest");
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = "false";
xmlDoc.loadXML(divTest.innerHTML);

this worked, but was extremely messy as innerHTML changes all node names to
uppercase -- not really an option.

My gut feeling is that this all very simple but I'm missing something. Is there
a way to read the OutputStream directly into a client-side object or some
such??

Anyone?

TIA

Robert Zurer
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
loading xmldocument with httpwebrequest object? deepak ASP .Net 9 02-14-2008 06:18 PM
Loading and Persisting XMLDOM Robert Zurer Javascript 2 06-29-2005 10:12 AM
XMLDOM / Conditional Check for Object fails joe ASP General 7 06-09-2005 12:10 PM
Re: Can an XmlNode from one XmlDocument be copied to another XmlDocument? Bob ASP .Net 0 07-21-2004 11:49 PM
loading xmlcontent from one xmldocument into another xmldocument Shoval Tomer ASP .Net 0 07-09-2003 04:29 PM



Advertisments