Saving Data in XML Files

G

Guest

Hi,

I need to save data into a XML file using an existing schema (I have the
..xsd file)

If the record exists then the data must be read from the DB in MS Access
2000 and saved into a XML file.

If the record does not exist then the apps must create a new record into XML
file (this record must not be saved into the database)

The application is being developed in VB.NET

Any idea?

Thanks

Sean
 
C

Cor Ligthert

Sean,

To be more sure of your question, why not create a XML dataset from your
access file and than process that?

Cor
 
G

Guest

Hi Cor

When I try to generate the dataset for the schema from VS.NET, I get the
following error message: "Tha same table (Customers) cannot be the child
table in two nested relations"

I musn't change the structure of the schema, because it is being used to
share the same information among our business customers.

I wonder if is there a way to create an instance from my schema file and so
create a XML file with this structure? Then once I have all my entries in the
win form, I should to walk for each part of the XML file to save the data ...
Does make sense? or am I wrong?

I am all ears for your advices

Thanks

Sean
 
C

Cor Ligthert

Sean,

I don't know how to answer you.

Can you tell me what is your starting point.

I assume an access database, than what you want to do with the data and what
tables.

(And what version from VB.Net that you have or VS.Net).

Cor
 
G

Guest

Thanks Cor for your reply

Okay, this is the scenario:

I have an ASP.NET web-application that create .xml files according to a
defined schema and they are sent out to our customers to review and/or to
update the information.

I need to create a new VB.NET application (in the customer side) :

1. That receives these .xml files and allow to modify the data into these
..xml files and then send out these .xml files to the web-application for
validation

2. Create new .xml files from the VB.NET Application using the records into
a MS Access database and send these .xml files to the web-application for
validation

3. Create new .xml files from the VB.NET apps if some records does not exist
in the MS Access database (i.e.: new products to request) and send these .xml
files to the web-application for validation.

As you see, I need to use the same schema to generate the .xml files and so
both applications (web and win) can exchange the same data with the same
structure.

I was asked that I musn't change the schema ... I tried to generate the
dataset for this schema from Visual Studio.NET Architecture 2002 but I got an
error message

If you have some idea or suggestion to work out this issue I would
appreciate it.

Sean.
 
C

Cor Ligthert

Sean,

What you tell, makes it probably more difficult, it has the behaviour you
tell.

The approach will probably be to use the xmlDataDocument class or the
xmlnodereader and the xmltextwriter.

xmlDataDocument(when you click on the links in the page you get more
information by instance the constructor
http://msdn.microsoft.com/library/d...l/frlrfSystemXmlXmlDataDocumentClassTopic.asp


The writer is as well a possibility
http://msdn.microsoft.com/library/d...cpguide/html/cpconWritingXMLWithXmlWriter.asp

The reader another
http://msdn.microsoft.com/library/d...tml/frlrfsystemxmlxmlnodereaderclasstopic.asp

When I hear about XML and access I start alwayst to think about datasets. I
don't assume that your XML files are that.

I would if I was you and have more problems ask them crossposted (when that
is relevant) in the newsgroups.
microsoft.public.dotnet.languages.vb
and
microsoft.public.dotnet.xml
and
microsoft.public.dotnet.framework.aspnet

I think that this all the help I can give you until now.
(I am as well active in the language.vb newsgroup however not in XML and
ASPNET)

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

Top