Ich schreibe ein Dataset in eine XML Datei:
dsXML.WriteXml(filename, xmlWriteMode);
Das XML-Schema wird vorher eingelesen und enthält mehrere Namespaces:
dsXML.ReadXmlSchema(filename1);
als Ergebnis bekomme ich eine XML Datei, wo fast jedes Element einen Attribut xmlns hat:
....
<customtype:stopaddress>
<psv3lib:id xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd">0</psv3lib:id>
<psv3lib:name1 xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd">ROT-ELEKTROWERK</psv3lib:name1>
<psv3lib:name2 xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd"></psv3lib:name2>
<psv3lib:name3 xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd"></psv3lib:name3>
<psv3lib:street xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd">Burger Str. 12</psv3lib:street>
<psv3lib:place xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd">Porta W.</psv3lib:place>
<psv3lib:postcode xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd">32457</psv3lib:postcode>
<psv3lib:infotext xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd"></psv3lib:infotext>
</customtype:stopaddress>
<customtype:arrivaldate category="1">
<psv3lib:key xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd">fix</psv3lib:key>
<psv3lib:date xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd">2008-08-01T10:00:00</psv3lib:date>
<psv3lib:text xmlns:psv3lib="http://www.psv3.com/Interfaces/generic/Host/1.0/psv3lib.xsd">Uhrzeit Termin</psv3lib:text>
</customtype:arrivaldate>
<customtype:jobcounter>
....
Wie kann ich dieses Verhalten ändern und xmlns Attribute nur im Root-Element ausgeben???