Loading an in-memory XmlDocument directly into an XMLDOM object

R

Robert Zurer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top