Ms XmlDom asynchronous loading Xml file
On here, it shall be counted as a resource backup.
<script>
Var xmldoc;
Function Load () (
Xmldoc = new ActiveXObject ( "Msxml2.DOMDocument");
Xmldoc.onreadystatechange = CheckState;
Xmldoc.resolveExternals = false;
Xmldoc.load (URL.value);
)
Function CheckState () (
Var state = xmldoc.readyState;
RESULTS.innerHTML + = "loading state =" + state + "<BR>"
If (state == 4) (
Var err = xmldoc.parseError;
If (err.errorCode! = 0)
RESULTS.innerHTML err.reason + + = "<BR>"
Else
(
RESULTS.innerHTML + = "loading successful." + "<BR>"
Alert (xmldoc.xml)
)
)
)
</ Script>
URL: <input type=text size=60 id=URL value=" http://dotnet.aspx.cc/Rss.aspx ">
<input Type=button value=" is XML" onclick="Load()">
<div Id=RESULTS style="color:red; font-weight:bold;"> </ div> </ script>
Tags: XML








0 Comments to “Ms XmlDom asynchronous loading Xml file”
No Comments. Send your comment.
Leave a Reply
You must be logged in to post a comment.