R
RC
Hi,
here is the source XML file.
data.xml
<table1>
<row1>
<col1>value1</col1>
<col2>value2</col2>
<col3>value3</col3>
</row1>
<row2>
<col1>value4</col1>
<col2>value5</col2>
<col3>value6</col3>
</row2>
<row3>
<col1>value7</col1>
<col2>value8</col2>
<col3>value9</col3>
</row3>
</table1>
to load the XML file into data set
I use following code
Dataset ds = new Dataset();
ds.ReadXML("data.xml");
I now try to delete a row
Dataview dv = ds.DefaultView;
dv.Delete(1);
And then save the dataset back to a new XML file
ds.WriteXML("new.xml");
However, the new.xml will become
<table1>
<row1>
<col1>value1</col1>
<col2>value2</col2>
<col3>value3</col3>
</row1>
</table1>
<row3>
<col1>value7</col1>
<col2>value8</col2>
<col3>value9</col3>
</row3>
Row 3 is not enclosed within table1 tag
Can anybody help me to confirm whether such bug existed?
Thanks
RC
here is the source XML file.
data.xml
<table1>
<row1>
<col1>value1</col1>
<col2>value2</col2>
<col3>value3</col3>
</row1>
<row2>
<col1>value4</col1>
<col2>value5</col2>
<col3>value6</col3>
</row2>
<row3>
<col1>value7</col1>
<col2>value8</col2>
<col3>value9</col3>
</row3>
</table1>
to load the XML file into data set
I use following code
Dataset ds = new Dataset();
ds.ReadXML("data.xml");
I now try to delete a row
Dataview dv = ds.DefaultView;
dv.Delete(1);
And then save the dataset back to a new XML file
ds.WriteXML("new.xml");
However, the new.xml will become
<table1>
<row1>
<col1>value1</col1>
<col2>value2</col2>
<col3>value3</col3>
</row1>
</table1>
<row3>
<col1>value7</col1>
<col2>value8</col2>
<col3>value9</col3>
</row3>
Row 3 is not enclosed within table1 tag
Can anybody help me to confirm whether such bug existed?
Thanks
RC