Am grappling with a task at the moment and was wondering if anyone has had any experience with the XMLDocument class in VB.NET?
I need to read an XML document and extract just the elements and display them in a textbox.
The catch is the XML documents are random so I need to use (I think) the XMLDocument class to run through the XML doc and pull all the elements out as it encounters them. I suppose I could use XMLReader but I have a feeling that the reader may end up being a bit restrictive later on in development.
Below is a snippet of the xml I will be (attempting) reading. So in this case i would need to get the 'SO' and the 'O' from the code and put them in the textbox.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
- <LAIBATCH>
- <LAIMSG version="1.0" name="salesorder">
- <REC>
<TYP>SO</TYP>
<ACT>O</ACT>
</REC>
</LAIMSG>
</LAIBATCH>