469,569 Members | 1,520 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,569 developers. It's quick & easy.

Extra data comes at time of serialize DataSet

Hi All,

I want to serialize an object which contain the DataTable. As DataSet
is MarshalByRef object and is serializable. I am using it directly.
Even my data is also serialize and save it to XML file.

Now as DataSet serialize, it's creating some extra information (schema
information), And i don't need that. I only want to store the data in
XML format. I don't want to store extra details like namespace etc...
As it's increase XML file size.

One thing is clear that this DataSet is a part of my object. So I can't
use DataSet.GetXML() function.

////My XML file

<dataSet>
<xs:schema id="MarkupData" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="MarkupData" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="MarkupWrapper">
<xs:complexType>
<xs:sequence>
<xs:element name="index" msdata:AutoIncrement="true"
type="xs:int" minOccurs="0" />
<xs:element name="key" msdata:Prefix="k" type="xs:string"
minOccurs="0" />
<xs:element name="eleID" msdata:Prefix="eid" type="xs:int"
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Element">
<xs:complexType>
<xs:sequence>
<xs:element name="index" msdata:AutoIncrement="true"
type="xs:int" minOccurs="0" />
<xs:element name="name" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<MarkupData>
<MarkupWrapper diffgr:id="MarkupWrapper1" msdata:rowOrder="0"
diffgr:hasChanges="inserted">
<index>0</index>
<key>IMS1</key>
<eleID>1</eleID>
</MarkupWrapper>
<MarkupWrapper diffgr:id="MarkupWrapper2" msdata:rowOrder="1"
diffgr:hasChanges="inserted">
<index>1</index>
<key>IMS1</key>
<eleID>2</eleID>
</MarkupWrapper>
<Element diffgr:id="Element1" msdata:rowOrder="0"
diffgr:hasChanges="inserted">
<index>0</index>
<name>food</name>
</Element>
<Element diffgr:id="Element2" msdata:rowOrder="1"
diffgr:hasChanges="inserted">
<index>1</index>
<name>misc</name>
</Element>
<Element diffgr:id="Element3" msdata:rowOrder="2"
diffgr:hasChanges="inserted">
<index>2</index>
<name>comp</name>
</Element>
</MarkupData>
</diffgr:diffgram>
</dataSet>

///

Thanks & Regards,
Rushi

Aug 25 '05 #1
0 1174

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by D Witherspoon | last post: by
4 posts views Thread by Al Christoph | last post: by
reply views Thread by IMS.Rushikesh | last post: by
3 posts views Thread by Pat Alessi | last post: by
9 posts views Thread by David Harris | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.