Reputation: 5129
I've got an XML file which is a pain to manually update. So I was thinking of creating a small app which synchronizes this data for me based on data from an Excel Sheet or something.
Could anyone point me in the right direction for this? Or does some software already exist for this purpose?
The XML schema looks like this:
<Data>
<Level1 value="Canada">
</Level1>
<Level1 value="Chile">
</Level1>
<Level1 value="Spain">
</Level1>
<Level1 value="Norway">
<Level2 value="North">
<Level3 value="North1"/>
<Level3 value="North2" />
</Level2>
<Level2 value="Mid">
<Level3 value="Mid1" />
<Level3 value="Mid2" />
<Level3 value="Mid3" />
</Level2>
<Level2 value="South">
<Level3 value="South1" />
<Level3 value="South2" />
<Level3 value="South3" />
</Level2>
</Level1>
<Level1 value="United Kingdom">
</Level1>
</Data>
Upvotes: 0
Views: 831
Reputation: 7917
You can use XmlDocument or XmlDataDocument class to update the xml file by Iteration node by node. You can get the excel data by 'Microsoft.ACE.OLEDB.12.0' provider for office 2007. To get all data in dataset and use XmlDataDocument class and you can update your xml schema.
Upvotes: 1