I would like to scan my xml file whether the specific node is exists or not. Then, I wanted to show the number of files in a message box. For example, when I browse multiply files, then the output will show difference results in the MsgBox()
This is what I have tried:
Private Sub WritingFile(ByVal strContent As String)
Dim xmlDoc As New XmlDocument()
xmlDoc.Load(strContent)
Dim nodes As XmlNode
Try
nodes = xmlDoc.DocumentElement.SelectSingleNode("\PRODUCT\NAME")
If nodes Is Nothing Then
MsgBox("File Not Exist")<----<--- should display the no. of files not exists
Else
MsgBox("File Exists") <--- should display the no. of files exists
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
How can I display the results without the messagesbox display one by one for each files? Thank you
This is an example of how you could loop through the list of xml files