XML Question

  • Thread starter Thread starter Brad Markisohn
  • Start date Start date
B

Brad Markisohn

I'm writing an application that in the past I would use an Access database
and ADO. I'd like to replace the database (simple relations and small
amount of data) with an XML file. I don't know much about XML, but the
little reading I've done indicates that I can create a schema for the XML
file (similar to one in the database) and read the data into a dataset using
an XMLReader. Can somebody point me to examples or tutorials of how to
create an XML schema with relations?

Thanks

Brad
 
Brad,

When you are not depending from others about the format from your XML
format, and you want to use a flat file to save your data. Than in my
opinion the choose can be a dataset.

A dataset is on disk or streaming a XML file from a special format.

To make that you can choose by making that strongly typed or raw.
A lot of people would use this in a simple raw format.
I type here the code (so watch typos) to make a very small dataset.

\\\
Dim ds as new Dataset("Brad")
Dim dt as new Datatable("BradsTable1")
ds.tables.Add(dt)
dt.Columns.Add("FirstColumn")
dt.Columns.Add("SecondColumm")
dt.Rows.Add(dt.NewRow)
dt.rows(0)(0) = "FirstText"
dt.rows(0)(1) = "SecondText"
ds.writeXML("C:\BradsFile.XML")
///

And than the use is endless however have for that a look at MSDN with
starting the search string "Dataset Class".

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top