T
Testguy
Hi,
I have been reading various messages in this group, and could not find
an answer regarding what I am trying to do. At least, I could not find
an easy answer.
I am trying to figure out how to read and XML file and put the data in
fields in a VB application, and also how to write the information to
an XML file (either to a new file or modifying an existing file.
I saw an example in a book (Leaning VB.NET 2nd edition, published by
WROX, ISBN # 0-7645-4384-9), but the examples only show a simple XML
format, and not something where you would have many levels and
sub-levels of data.
My knowledge of VB is somewhat OK. I am trying to write a program to
enhance my knowledge, and to make my job easier.
I have a file similar to this.
<?xml version="1.0" encoding="UTF-8"?>
<Packagename>
<ApplicationID>
<EmployeeNo>0001</EmployeeNo>
<Lastname>Mustard</Lastname>
<Firstname>Bob</Firstname>
<Address1>
<Street>105 Main Street</Street>
<City>Toronto</City>
<Province>Ontario</Province>
<Phone>
<AreaCode>905</AreaCode>
<Number>123-4567</Number>
</Phone>
</Address1>
<Address2>
<Street>PO Box 666</Street>
<City>Toronto</City>
<Province>Ontario</Province>
<Phone>
<AreaCode/
<Number/>
</Phone>
</Address2>
<Questions>
<QuestionNo>1</QuestionNo>
<QuestionDesc>Are you smart?</QuestionDesc>
<QuestionAnswer>Yep</QuestionAnswer>
<QuestionNo>2</QuestionNo>
<QuestionDesc>Do you know VB</QuestionDesc>
<QuestionAnswer>Yep</QuestionAnswer>
<QuestionNo>3</QuestionNo>
<QuestionDesc>Do you know C++?</QuestionDesc>
<QuestionAnswer>Nope</QuestionAnswer
</Questions>
</ApplicationID>
</Packagename>
What I want to do is:
- Read the XML file, and populate the fields on a VB form.
- Review the data and either modify and save the data or do nothing
with it.
or
- Create a new file using values entered on the screen.
I am not trying to do anything complicated. I am just trying to create
a small front end to allow me to view/enter/edit data in a simple XML
document.
We use XML file for testing, and I would prefer to use a VB program
instead of modifying the XML file manually.
Anything thing I would do in the VB program is to check the data for
accuracy
If anyone could help, it would be greatly appreciated.
Thank you,
André
I have been reading various messages in this group, and could not find
an answer regarding what I am trying to do. At least, I could not find
an easy answer.
I am trying to figure out how to read and XML file and put the data in
fields in a VB application, and also how to write the information to
an XML file (either to a new file or modifying an existing file.
I saw an example in a book (Leaning VB.NET 2nd edition, published by
WROX, ISBN # 0-7645-4384-9), but the examples only show a simple XML
format, and not something where you would have many levels and
sub-levels of data.
My knowledge of VB is somewhat OK. I am trying to write a program to
enhance my knowledge, and to make my job easier.
I have a file similar to this.
<?xml version="1.0" encoding="UTF-8"?>
<Packagename>
<ApplicationID>
<EmployeeNo>0001</EmployeeNo>
<Lastname>Mustard</Lastname>
<Firstname>Bob</Firstname>
<Address1>
<Street>105 Main Street</Street>
<City>Toronto</City>
<Province>Ontario</Province>
<Phone>
<AreaCode>905</AreaCode>
<Number>123-4567</Number>
</Phone>
</Address1>
<Address2>
<Street>PO Box 666</Street>
<City>Toronto</City>
<Province>Ontario</Province>
<Phone>
<AreaCode/
<Number/>
</Phone>
</Address2>
<Questions>
<QuestionNo>1</QuestionNo>
<QuestionDesc>Are you smart?</QuestionDesc>
<QuestionAnswer>Yep</QuestionAnswer>
<QuestionNo>2</QuestionNo>
<QuestionDesc>Do you know VB</QuestionDesc>
<QuestionAnswer>Yep</QuestionAnswer>
<QuestionNo>3</QuestionNo>
<QuestionDesc>Do you know C++?</QuestionDesc>
<QuestionAnswer>Nope</QuestionAnswer
</Questions>
</ApplicationID>
</Packagename>
What I want to do is:
- Read the XML file, and populate the fields on a VB form.
- Review the data and either modify and save the data or do nothing
with it.
or
- Create a new file using values entered on the screen.
I am not trying to do anything complicated. I am just trying to create
a small front end to allow me to view/enter/edit data in a simple XML
document.
We use XML file for testing, and I would prefer to use a VB program
instead of modifying the XML file manually.
Anything thing I would do in the VB program is to check the data for
accuracy
If anyone could help, it would be greatly appreciated.
Thank you,
André