"Lars Wilhelmsen" <la*****@NOSPAM.ifi.uio.no> wrote in message news:<uf**************@tk2msftngp13.phx.gbl>...
Hi Joe,
"Joe98765" <jo***********@hotmail.com> wrote in message
news:44**************************@posting.google.c om...I have data coming from SQL Server and need to write out some XML. I
have a schema(xsd) for this XML file. Right now I am bringing in the
DataSet and writing out the elements and attributes myself using
xmltextwriter to match schema without really using the xsd at the time
of writing.
The file I create validates but I was wondering is there a better way?
I see things like inferschema method off of dataset, can this be used?
How do you map columns in a dataset with elements and attributes in
the schema? I know dataset.WriteXmL will write XML but that match my
schema. Appreciate any help!
I find it a bit hard to grasp your problem - you want to write out the
DataSet as
xml - and you want it to validate against your schema - but you don't want
to
use the dataset.WriteXml() that actually writes out conforming xml !?
Is it speed/other performance issues you're troubling with?
Sorry, let me clarify...as I mistyped "I know dataset.WriteXML will
write XML but that DOESN'T match my schema".
dataset.writexml would be great...but how do you get it to write xml
based on a existing schema? Is there a way to associate an existing
schema and map my columns in the dataset to elements/attributes and
then call the WriteXml method?