Guys, I'm really struggling with objects and would appreciate any help you guys can give me. I understand that when you instantiate an object it has its own set of properties and methods, but I'm still confused. How do you find out what those properties are? I'm mostly working with VBScript right now and to be more precise Vbscript with XML.
Example:
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("states.xml")
Dim objChildNodes, strNode
Set objChildNodes = objXMLDoc.documentElement.childNodes<State>
For Each strNode In objChildNodes
document.write(strNode.nodeName & "<br>")
Next
objXMLDoc is obviously an object :)
async is a property of the objXMLDoc object correct?
load is a method of objXMLDoc, correct?
The next is a triple decker and throws me:
Set objChildNodes = objXMLDoc.documentElement.childNodes<State>
objChildNodes is just a variablet? It's not an object?
What is documentElement in that line?
You get the gist at this point I imagine. If I could grasp this concept it would help tremendously. Reading about programming and actually doing it is a entirely different ballgame. Any help would be appreciated. Thanks.
Question
notta
Guys, I'm really struggling with objects and would appreciate any help you guys can give me. I understand that when you instantiate an object it has its own set of properties and methods, but I'm still confused. How do you find out what those properties are? I'm mostly working with VBScript right now and to be more precise Vbscript with XML.
Example:
Set objXMLDoc = CreateObject("Microsoft.XMLDOM") objXMLDoc.async = False objXMLDoc.load("states.xml") Dim objChildNodes, strNode Set objChildNodes = objXMLDoc.documentElement.childNodes<State> For Each strNode In objChildNodes document.write(strNode.nodeName & "<br>") NextobjXMLDoc is obviously an object :)
async is a property of the objXMLDoc object correct?
load is a method of objXMLDoc, correct?
The next is a triple decker and throws me:
objChildNodes is just a variablet? It's not an object?
What is documentElement in that line?
You get the gist at this point I imagine. If I could grasp this concept it would help tremendously. Reading about programming and actually doing it is a entirely different ballgame. Any help would be appreciated. Thanks.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts