Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27514

VS 2005 [RESOLVED] load an xml file to textboxes

$
0
0
i have a xml file including this table below and i want to load the node <Nom> to textbox and <adresse> to an other textbox etc
Code:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <Table>
- <Company>
  <Nom>Ma société</Nom>
  <Adresse > 00000<Adresse />
  <Postale>45800</Postale>
  <Ville>Tinghir</Ville>
  <Province>Tinghir</Province>
  <Pays>Maroc</Pays>
  <Telephone>0</Telephone>
  <Fax>0</Fax>
 <Email >000000  <Email />
  <Siteweb > 000000 <Siteweb />
  <Compte > 000000  <Compte />
  </Company>
  </Table>


I tried this code to do that but it does not work

Code:

Dim xmldoc As XmlDocument = New XmlDocument
        xmldoc.Load(Application.StartupPath & "\nkkin.xml")
        nomtxt.Text = xmldoc.SelectSingleNode("Company/Nom").InnerText

And thank you

Viewing all articles
Browse latest Browse all 27514

Trending Articles