|
-
May 11th, 2007, 10:43 AM
#1
why to call alert() between xml parsing in javascript
Hello Dear
I am parsing my xml using below mention code.but i donot know should use alert("ffff")because if i donot use alert("ffff") it's throws an error "object required"
You can also try this code with own xmlfile in two ways
1. By putting comment before "alert("ffff")
2. By removing the comment "alert("ffff")
I am sure that if you will use the code with first method you will get the error.
<SCRIPT LANGUAGE="JavaScript">
function readXMLData()
{
var xmlDocumentObject, sessionNode, committeeNode1,
attendeesNode
var firstNameNode, lastNameNode, displayText
var attributes, statusSenator
xmlDocumentObject = new ActiveXObject("Microsoft.XMLDOM")
xmlDocumentObject.load("category.xml")
alert("fffff")
sessionNode = xmlDocumentObject.documentElement
alert(sessionNode.firstChild.xml);
committeeNode1 = sessionNode.firstChild
committeeNode = committeeNode1.firstChild
attributes = committeeNode.attributes
CategoryId = attributes.getNamedItem("CategoryId")
outputText = committeeNode.firstChild.nodeValue
+ ' ' + committeeNode.firstChild.nodeValue
+ "'s status is: " + CategoryId
displayDIV.innerHTML=outputText
}
</SCRIPT>
I am waiting for someones response.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|