I want to be able to read my XML document but I am a little lost how to. I cant really post my XML on here because it is just trying to use markup. Anyways, I have a root node that surrounds the whole object i want to read. From there, there are a few elements. 2 of those elements can have multiple instances. There will only be one object i need to read from the XML document.
Thanks in advance. I hope I can explain enough without being able to post my XML
:::
Here is the code i have so far:
Private Function ExtractXMLFromFileToBonder(ByVal path As String) As Bonder
Dim extractedBonder As New Bonder
Dim settings As New XmlReaderSettings
settings.IgnoreWhitespace = True
settings.CloseInput = True
Using reader As XmlReader = XmlReader.Create(path, settings)
With reader
.ReadStartElement("Machine_Name")
MsgBox(.GetAttribute("Name"))
End With
End Using
Return Nothing
End Function