A
Alan Silver
Hello,
I am trying to write some XML from a DataSet out to the Response object,
but I'm getting somewhat stuck.
I started out with ...
strXmlData = dstData.GetXml();
Response.Write(strXmlData);
which was fine, except it doesn't include the schema. I then discovered
that I should have been using WriteXML instead of GetXML, as that allows
me to tell it add the schema.
This is where I got stuck. I can't work out what to use for the first
parameter of WriteXML. The second one is the WriteSchema flag, but what
do I use for the first?
I tried ...
dstData.WriteXml(Response, XmlWriteMode.WriteSchema);
thinking that maybe Response was really a stream, but that didn't work.
So, anyone know how to do this? I just want the most efficient way of
sending the XML including schema to Response.
TIA for any help
I am trying to write some XML from a DataSet out to the Response object,
but I'm getting somewhat stuck.
I started out with ...
strXmlData = dstData.GetXml();
Response.Write(strXmlData);
which was fine, except it doesn't include the schema. I then discovered
that I should have been using WriteXML instead of GetXML, as that allows
me to tell it add the schema.
This is where I got stuck. I can't work out what to use for the first
parameter of WriteXML. The second one is the WriteSchema flag, but what
do I use for the first?
I tried ...
dstData.WriteXml(Response, XmlWriteMode.WriteSchema);
thinking that maybe Response was really a stream, but that didn't work.
So, anyone know how to do this? I just want the most efficient way of
sending the XML including schema to Response.
TIA for any help