Hi All
I am trying to convert xml file to a text file. But my program creates an empty text file and does not copy any text from the xml file. Please help
Thanks
My code:
Dim Doc As New XmlDocument
Dim NodeList As XmlNodeList
Doc.Load("C:\Temp\MyXml.xml")
NodeList = Doc.SelectNodes("/response/TAG")
Dim sw As New StreamWriter("C:\Temp\MyXmlContents.txt", False)
For Each Node As XmlNode In NodeList
For i As Integer = 0 To Node.ChildNodes.Count - 1
With Node.ChildNodes.Item(i)
sw.WriteLine(.Name & ": " & .InnerText)
End With
Next
Next
sw.Close()