views:

99

answers:

3

Hi, 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>
+1  A: 

I am not getting your question properly. What do you want to do? Do you want to update XML file by any application or want to get data in Excel sheet?

Deepak
The XML file is a pain to update manually. And there's only a few columns that actually need updating. So I want to be able to use an Excel sheet as a source and update the XML file with the values from the Excel sheet
Kenny Bones
Which version of Excel do you have?How complex is the xml schema ?
iDevlop
I can use Excel 2007, but I have both available. The XML schema isn't that advanded really. I've updated the first post as an example.
Kenny Bones
+1  A: 

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.

Deepak
+1  A: 

Try looking here http://www.meadinkent.co.uk/xl%5Fxml1.htm