views:

971

answers:

2

So today I had to move some tables with data from an MS Access database into XML to be used in a web application. So I thought it would be an easy process to define the table structure as an XSD file in Visual Studio, then load in the data (for the sake of simplicity, lets say I would type it in). Well for the life of me I can't figure this out....I googled up lots of articles, but nothing seemed to click for me.

I guess the simple form of my question is: is it possible to (graphically) define simple xml schemas in Visual Studio, and then edit the data contained within (within VS, via a nice grid interface) and have the data saved to an xml file?

If not, is there a popular freeware or open source tool that would be appropriate for this?

+2  A: 

The easy way would be to do the following.

  1. Read the data in using a DataAdapter and filling a dataset
  2. Bind that to a DataGrid control, do your updates
  3. Accept changes on the dataset
  4. Call the WriteXml() method on the DataSet and volia! You have an XML doc with the data.
Mitchel Sellers
Does this create an xsd file also?? I know absolutely nothing about this.....
tbone
I believe you can have it create the XSD
Mitchel Sellers
If it's a strongly typed dataset, I believe it can create the XSD for you.
lc
A: 

Hi there,

what if I need to write each row in a nesting (hierarchy) xml format? is this possible?, How?

Best regards

Waleed
Better post this as a new question ("Ask Question" button in the top right of the page). More people will see it that way.
sth