I would like to use an xml (Data.xml) file to store the text on buttons of my app as well as the SQL commands those buttons will trigger. I can find plenty of examples of how to read xml nodes when the xml file is structured as below:
<?xml version="1.0" encoding="utf-8"?>
<SavedQueries>
<Rec>
< Button> Button1<Button/>
<btnText> Button 1<btnText/>
< btnSQL>SELECT * FROM Sheet1btnSQL/>
<Rec/>
<Rec>
< Button> Button2<Button/>
<btnText> Button 2<btnText/>
< btnSQL>SELECT * FROM Sheet1btnSQL/>
<Rec/>
</SavedQueries>
But not when it is structured like this (this is how I would like my structure to be):
<?xml version="1.0" encoding="utf-8"?>
<SavedQueries>
<Rec1 Button = "Button1" btnText ="Button 1" btnSQL ="SELECT * FROM Sheet1" />
<Rec2 Button = "Button2" btnText ="Button 2" btnSQL ="SELECT * FROM Sheet1" />
<Rec3 Button = "Button3" btnText ="Button 3" btnSQL ="SELECT * FROM Sheet1" />
<Rec4 Button = "Button4" btnText ="Button 4" btnSQL ="SELECT * FROM Sheet1" />
<Rec5 Button = "Button5" btnText ="Button 5" btnSQL ="SELECT * FROM Sheet1" />
<Rec6 Button = "Button6" btnText ="Button 6" btnSQL ="SELECT * FROM Sheet1" />
<Rec7 Button = "Button7" btnText ="Button 7" btnSQL ="SELECT * FROM Sheet1" />
<Rec8 Button = "Button8" btnText ="Button 8" btnSQL ="SELECT * FROM Sheet1" />
</SavedQueries>
How do I read/write to the nodes & attributes in VB.net in this way?
Start Free Trial