How to read XML in vb.net

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have the below XML file. How can I read each tag and its attribute in
vb.net?

Many Thanks

Regards



<Configuration>
<section name="Clients" type="Company-Contacts">
<mastertable name ="tblClients" primarykey="tblclients.id" />
<childtable name="tblClientContacts" foreignkey="tblContacts.Company_ID"
/>
</section>

<section name="Suppliers" type="Company-Contacts">
<mastertable name ="tblSuppliers" primarykey="tblsuppliers.id" />
<childtable name="tblSupplierContacts"
foreignkey="tblSupplierContacts.Company_ID" />
</section>
</Configuration>
 
John said:
Hi

I have the below XML file. How can I read each tag and its attribute in
vb.net?

Many Thanks

Regards

If you're using .Net Framework 2.0, there are the Application Blocks. There
is nothing to download for the Framework it's already included in the
Framework.

However, you'll have to download the examples, which there is a section for
XML and configuration files that will allow you to pull the xml into your
application and treat them as variables. There are VB and C# examples.

<http://www.microsoft.com/downloads/...97BA84AE80B5&displaylang=en#AffinityDownloads>

There is one for .Net Framework 1.1 too, but you'll have to install that
one.
 
Back
Top