reading and inserting in xml child nodes
I have created child nodes in app.config.xml file:
.My.MySettings>
I want to insert values in this child nodes
Astrology=6:00
Cricket=7:00
ForeignCurrency=8:00
Jobs=9:00
How to read and insert values in this xml child nodes?
in VB.NET2005
bcm
Junior Poster in Training
64 posts since Aug 2007
Reputation Points: 18
Solved Threads: 0
You can read from both user and application settings but you can only write (save) user settings
To Read:
Dim Value as StringValue = My.Settings.Astrology
Value = My.Settings.Cricket
Value = My.Settings.ForeignCurrency
Value = My.Settings.Jobs
To Write:
My.Settings.Astrology = "6:00"
My.Settings.Cricket = "7:00"
My.Settings.ForeignCurrency = "8:00"
My.Settings.Jobs = "9:00"
But for XMLs other than the Settings Config i would use Datatable.readXML and Datatable.WriteXML as datatables allow better data control
I tried it but it gave me error on
Dim Value asStringValue = My.Settings.Astrology
so I made it
Dim Value As String = My.Settings.Astrology
But now it shows an error
Configuration system failed to initialize
Please help!!!!!
bcm
Junior Poster in Training
64 posts since Aug 2007
Reputation Points: 18
Solved Threads: 0