Hello,
Here's a line from my .xml <DocumentType>6</DocumentType>
I need to read the xml and get the value "6" to be outputted in a csv or text file. Then I want to read the "6" into a vbscript. How is vbscript and
vb.net different? Thank you.
Here's code in
VB.NET. It's not reading anything yet?
Try
Dim objTxtRd = New XmlTextReader(strFilePath)
While (objTxtRd.Read())
If (objTxtRd.NodeType = XmlNodeType.Text) Then
If (objTxtRd.Name = "DocumentType") Then
ListBox1.Items.Add("document type ID is" & objTxtRd.Value & ".")
End If
End If
End While
Catch err As Exception
errmsg = errmsg + "Error occurred while reading " & strFilePath & " " _
ListBox1.Items.Add(errmsg)
Finally
If Not objTxtRd Is Nothing Then
objTxtRd.Close()
End If
End Try
Thank you very much.