Robert Zurer
Usenet Archive
- Joined
- Mar 28, 2002
- Messages
- 26
- Reaction score
- 0
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
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