XML DiffGram and WriteSchema at the same time ? 
Author Message
 XML DiffGram and WriteSchema at the same time ?

How to have aa XMLWriter write the schema AND a diffgram at the same time ?

System.Data.DataSet ds;
.....
ds.WriteXml (myFileName, System.Data.XmlWriteMode.WriteSchema);
or
ds.WriteXml (myFileName, System.Data.XmlWriteMode.DiffGram);

It seems that it is either WriteSchema OR writing DiffGram  ?



Thu, 07 Oct 2004 07:24:52 GMT  
 XML DiffGram and WriteSchema at the same time ?
Hi Walter,

You're correct in saying that the WriteXml() call specifying the DiffGram
option doesn't include schema information. The purpose of a DiffGram is to
include unaccepted changes in the dataset in the resulting XML and it
doesn't include the schema. Some options for writing out the XML data with
the corresponding schema are:

1.      Use WriteXml() and specify the WriteSchema option. This gives you the
data with an embedded schema. It does not give you a DiffGram, however.
2.      If you need a DiffGram and the schema, use WriteXml() and specify the
DiffGram option. Then use WriteXmlSchema() to get the schema.

This posting is provided "AS IS" with no warranties, and confers no rights.

Regards,

Bill Cheng
Microsoft Support Engineer

--------------------

| Subject: XML DiffGram and WriteSchema at the same time ?
| Date: Sun, 21 Apr 2002 01:24:52 +0200
| Lines: 12
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

| Newsgroups: microsoft.public.dotnet.languages.CSharp
| NNTP-Posting-Host: d5e08bfe.kabel.telenet.be 213.224.139.254
| Path: cpmsftngxa07!tkmsftngxs01!tkmsftngp01!tkmsftngp02
| Xref: cpmsftngxa07 microsoft.public.dotnet.languages.csharp:55590
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| How to have aa XMLWriter write the schema AND a diffgram at the same time
?
|
|
| System.Data.DataSet ds;
| .....
| ds.WriteXml (myFileName, System.Data.XmlWriteMode.WriteSchema);
| or
| ds.WriteXml (myFileName, System.Data.XmlWriteMode.DiffGram);
|
| It seems that it is either WriteSchema OR writing DiffGram  ?
|
|
|



Sat, 09 Oct 2004 10:07:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how to serialize XML diffgrams contained in the Windows messaging system?

2. How to set XML Web Service time out

3. XML vs Resource DLL String Access - Timing Results

4. hwo to convert value which get from xml to type which get from xml also

5. XML DOM and .NET's XML classes

6. creating xml schema programmatically from an an xml file without using ADO.NET

7. VC++ and XML, I want to retrieve an XML file from URL

8. VC++ and XML, I want to retrieve an XML file from a URL

9. XML.NET to XML.ADO26

10. How to convert local time with specific time zone to UTC time in Win32 API

11. How to convert local time to gmt using a local variable time zone per process/thread

12. Minimum Wait Time (System Time Resolution)

 

 
Powered by phpBB® Forum Software