Loading an in-memory XmlDocument directly into an XMLDOM object

Discussion in 'ASP .Net' started by Robert Zurer, Jun 28, 2005.

  1. Robert Zurer

    Robert Zurer Guest

    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
     
    Robert Zurer, Jun 28, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shoval Tomer
    Replies:
    0
    Views:
    448
    Shoval Tomer
    Jul 9, 2003
  2. Bob
    Replies:
    0
    Views:
    414
  3. deepak
    Replies:
    9
    Views:
    1,394
    Anthony Jones
    Feb 14, 2008
  4. joe
    Replies:
    7
    Views:
    134
    David Patow
    Jun 9, 2005
  5. Robert Zurer

    Loading and Persisting XMLDOM

    Robert Zurer, Jun 29, 2005, in forum: Javascript
    Replies:
    2
    Views:
    108
    Robert Zurer
    Jun 29, 2005
Loading...

Share This Page