Yes, you are right, that works, but for some reason cloning won't work for
the DataSet that I create with the xml below using DataSet.ReadXml:
<Media xmlns="http://mycompany.com/MediaConfig">
<Type>Encode</Type>
<Standard>NTSC</Standard>
<Peripheral>
<ID>1</ID>
<NumWindows>1</NumWindows>
<Video>
<Name>Camera #1</Name>
<Source>0</Source>
<FrameRate>30</FrameRate>
<BitRate>3000000</BitRate>
<Resolution>4CIF</Resolution>
<McastIP>239.128.0.153</McastIP>
<Port>4000</Port>
</Video>
<Audio>
<Source>LEFT</Source>
<SampleRate>16000</SampleRate>
<McastIP>235.0.0.52</McastIP>
<Port>4001</Port>
</Audio>
</Peripheral>
</Media>
If you have any suggestions, please let me know.
David
"Cor Ligthert" wrote:
David,
I tried this code.
\\\
DataSet ds = new DataSet("Media");
DataTable dt = new DataTable("Media");
dt.Columns.Add("Media");
dt.Rows.Add(dt.NewRow());
dt.Rows[0][0] = "Media";
ds.Tables.Add(dt);
ds.WriteXml("C:\\Test1\\Media.XML",XmlWriteMode.Wr iteSchema);
///
It gave this dataset,
<?xml version="1.0" standalone="yes"?>
<Media>
<xs:schema id="Media" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="Media" msdata:IsDataSet="true" msdata:Locale="nl-NL">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Media">
<xs:complexType>
<xs:sequence>
<xs:element name="Media" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<Media>
<Media>Media</Media>
</Media>
</Media>
Therefore can you explain it a little bit more?
Cor