-
XML Load method Fails!
Hi,
I have a simple Load request from Vb reference MSXML 3.0 in project properties. When I run the code it cannot load the XML file. I am CERTAIN the path is correct. Has anyone seen this before. I have done this 100's of times on my old machine, but never on my new one. Am I missing something??
I get a object not set when I try to look at node contents. The boolean returns false on load.
Any help appreciated. This is incredibly annoying.
Source:
Public Function getXML()
Dim xmlDoc As MSXML2.DOMDocument
Set xmlDoc = New MSXML2.DOMDocument
Dim xmlNodes As IXMLDOMNodeList
Dim lb_loaded As Boolean
lb_loaded = True
xmlDoc.async = False
lb_loaded = xmlDoc.Load("http://home_pc/myRequestTest/controls.xml")
' Retrieve the collection of nodes at pc/ram
Set xmlNodes = xmlDoc.getElementsByTagName("mycontrols/control")
' And use the item property to retrieve the
' text from the mycontrols/control tag
MsgBox xmlNodes.Item(0).Text
End Function
-
Sorry my fault, I user domdocument.parseError. A tag in my XML was not closed. Sorry for bother.
Lenin