how to read xml data from xml file in VB6.0
-
I am reading an xml file.My code is as follow- Dim XmlDoc As New DOMDocument30 Dim nodlst As IXMLDOMNodeList Dim nod As IXMLDOMNode Dim Data As String XmlDoc.async = False 'Loading the XML file on C drive If XmlDoc.Load(TextFilePath.Text) Then Set nodlst = XmlDoc.selectNodes("/Request") Set nod = nodlst(0).selectSingleNode("Responce") Set Data = nod.Text MsgBox Data End If where TextFilePath.Text is the path of the xml file and file structure is as - <Request> <Responce>File Not Found</Responce> </Request> On compiling my code it is giving an error- "User-defined type not defined......" Please how can I rea data from xml file. Thanks in adv..
-
I am reading an xml file.My code is as follow- Dim XmlDoc As New DOMDocument30 Dim nodlst As IXMLDOMNodeList Dim nod As IXMLDOMNode Dim Data As String XmlDoc.async = False 'Loading the XML file on C drive If XmlDoc.Load(TextFilePath.Text) Then Set nodlst = XmlDoc.selectNodes("/Request") Set nod = nodlst(0).selectSingleNode("Responce") Set Data = nod.Text MsgBox Data End If where TextFilePath.Text is the path of the xml file and file structure is as - <Request> <Responce>File Not Found</Responce> </Request> On compiling my code it is giving an error- "User-defined type not defined......" Please how can I rea data from xml file. Thanks in adv..