Facing a Problem when I use the loadXML("<xml String>")

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sumanmshan
    New Member
    • Jun 2008
    • 1

    #1

    Facing a Problem when I use the loadXML("<xml String>")

    Hi everyone,

    This is my first post to this forum, hope I would get a reply quickly :-)

    Iam using loadXML(xmlStri ng) and it is always returning "false". My code looks like this :

    [CODE=javascript]if (window.ActiveX Object)
    {
    var responseXml=new ActiveXObject(" Microsoft.XMLDO M");
    responseXml.asy nc="false";
    var wellFormedMarku p = "<g>"+strin g+"</g>";
    alert(wellForme dMarkup);
    //alert(responseX ml.loadXML(well FormedMarkup));
    loaded = responseXml.loa dXML(wellFormed Markup);
    alert(loaded);

    .......

    }

    [/CODE]when I print the value for the *string*, it displays the response text.
    So its not null or empty.
    Where did I get deviated???
    Thank You in advance.

    Regards,
    Suman
    Last edited by acoder; Jun 11 '08, 02:28 PM. Reason: Added code tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Welcome to Bytes!

    See if this example works for you. Remember that other browsers have a different method of reading/loading XML files/strings.

    PS. please remember to use code tags when posting code. Thanks!

    Comment

    Working...