Question XMLReader?


New member
Nov 27, 2008
Programming Experience
Hello Every1,

I hope it is ok for me to post this thread here. :confused: I am new to VB .Net and am having difficulties knowing where to start with my new windows form application i am trying to build. :p

What i want to create is a form where a user can enter XML into a textbox and then hit 'TEST' to validate the XML to see if there is any problems with it.

I have built the form using VB express edition but now need to code and this is where i am coming across problems. :(

This is how the programe should work:

- A user selects a value from the combo box at the top of the form (This is the make of car. The xml structure changes for each value in the combobox)
- The user then enters the XML into the textbox or can do file open and select the XML which will then be displayed in this text box
- The user then hits 'Test' and the results of the XML are shown in another text box (Results Textbox) at the bottom of the form which highlight any problems with the XML or state if the XML is formatted correctly.

Here is a example piece of the XML that will need to be processed:

    <Vehicle Make="Ford"> 
      <CarDetails Model="Fiesta"
		   Numberofdoors="5" />
      <Owners Numberofowners="2"
	      Year Registered="2006" />

I want the XML to be read so that all the attributes values entered are compared to a preformed list to check if it is a valid value entered. :)

For e.g If we look at the CarDetails node and the Model attribute, the value entered is Fiesta. I want my form to take this value and compare it against a list of valid values for this specific attribute, I.e Sierra, Escort, Fiesta. As Fiesta is on the valid entries list the program will continue reading the rest of the XML. If a value entered was 206 (A value that is not on accepted list) then the program continues to read the rest of the XML but highlights this problem in the results textbox. The user would then see what the problem is with the XML.

If anybody can help with this it would be very much appreciated as i am getting very frustrated! :mad:

Thank you! :p
Chloe ~X~
Top Bottom