We have many classes generated from schema by the xsd.exe tools.
These classes are then serialize in files using the XmlSerializer class.
The generated XML file looks like:
<?xml version="1.0"?>
<RootItem xmlns:xsd="..." >
<Data ID="1">
<Data1>...</Data1>
<Data2>...</Data2>
...
</Data>
</RootItem >
Each time we use the XmlSerializer all the XML tag are generated like:
<?xml version ...
xmlns:xsd=" ...
Is there a way to tell the XmlSerializer to skip these tags?
We need a way to serialize many of these classes in the same XML file like:
<?xml version="1.0"?>
<RootItem xmlns:xsd="..." >
<Data ID="1">
<Data1>...</Data1>
<Data2>...</Data2>
...
</Data ID="2">
<Data>
<Data1>...</Data1>
<Data2>...</Data2>
...
</Data>
...
<Data ID="n">
<Data1>...</Data1>
<Data2>...</Data2>
...
</Data>
</RootItem >
So we could manage the XML file details like positionning and use the
XmlSerializer class to append
only the data we need.
Thanks