xmldso.XMLdocument object required Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric

    #1

    xmldso.XMLdocument object required Error

    I have a problem using the XMLDOM throught data islands. On some
    machine it works fine but on other I get an error when trying to
    access a node using XMLDOM on data islands. Further more the datafld
    and datasrc HTML properties doesn't display the node value as
    expected.It seems that when I remove the XML document declaration on
    the computers where this code sample currently not working , this
    sample work much better and the node value is displayed on the HTML
    page.

    Has shown in many sample over the web the xml document declaration
    should not been removed and should not disturb the xml parser.

    Here is the code sample:


    <HTML>
    <HEAD>
    <script language="javas cript">

    function window.onload()
    {
    var msxml=new ActiveXObject(" MSXML2.DOMDocum ent.3.0");
    msxml.loadXML(" <User><ID>ERV </ID></User>");
    var xn=msxml.select SingleNode("Use r/ID");
    alert("msxml3 instance : "+xn.text);

    try
    {

    var t=oper.XMLDocum ent.selectSingl eNode("User/ID");

    alert("DataIsla nd : "+(t==null) +" "+t.xml);//.text);
    }
    catch(e)
    {
    alert(e.descrip tion);
    }
    }
    </script>
    </HEAD>
    <BODY>
    <XML id="oper" async="true"><? xml version="1.0"
    encoding="utf-8"?><User><ID>E RV</ID></User></XML>

    <span datasrc="#oper" datafld="ID"></span>
    </BODY>
    </HTML>

    did someone already encounter such a problem?
    Is there something to do with missing components, or xml parser bad
    version?

    I have searching for information for a few days now and I didn't find
    something relevant corresponding to my problem. If someone could help
    me to solve this problem It would be very kind.

    Eric
Working...