xmldso.XMLdocument object required Error

Eric (23)

Usenet Archive
Joined
Sep 13, 2004
Messages
12
Reaction score
0
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="javascript">

function window.onload
{
var msxml=new ActiveXObject("MSXML2.DOMDocument.3.0");
msxml.loadXML("<User><ID>ERV</ID></User>");
var xn=msxml.selectSingleNode("User/ID");
alert("msxml3 instance : "+xn.text);

try
{

var t=oper.XMLDocument.selectSingleNode("User/ID");

alert("DataIsland : "+(t==null)+" "+t.xml);//.text);
}
catch(e)
{
alert(e.description);
}
}
</script>
</HEAD>
<BODY>
<XML id="oper" async="true"><?xml version="1.0"
encoding="utf-8"?><User><ID>ERV</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
 

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

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top