Click here to Skip to main content
15,902,189 members
Home / Discussions / C#
   

C#

 
Generalinterface Pin
mowli19-May-05 23:29
mowli19-May-05 23:29 
GeneralRe: interface Pin
Ali Iqbal Khan19-May-05 23:57
Ali Iqbal Khan19-May-05 23:57 
GeneralRe: interface Pin
Colin Angus Mackay19-May-05 23:58
Colin Angus Mackay19-May-05 23:58 
GeneralOverloding Pin
mowli19-May-05 23:04
mowli19-May-05 23:04 
GeneralRe: Overloding Pin
Ali Iqbal Khan19-May-05 23:42
Ali Iqbal Khan19-May-05 23:42 
GeneralRe: Overloding Pin
Colin Angus Mackay20-May-05 0:06
Colin Angus Mackay20-May-05 0:06 
GeneralRe: Overloding Pin
Colin Angus Mackay20-May-05 0:04
Colin Angus Mackay20-May-05 0:04 
GeneralDataset WriteXML places rows added to dataset outside of main nodes Pin
Mikan2319-May-05 22:34
Mikan2319-May-05 22:34 
I have a dataset that I read from an xml file using
DataSet.ReadXml(fs);

I then add to the dataset and rewrite the xml file using the following:

DataRow newrow = mf.quotesDataSet.Tables["quote"].NewRow();<br />
newrow["thequote"] = quoteInput.Text;<br />
newrow["speaker"] = speakerInput.Text;<br />
newrow["origin"] = originInput.Text;<br />
newrow["image"] = "test.jpg";<br />
mf.quotesDataSet.Tables["quote"].Rows.Add(newrow);<br />
mf.quotesDataSet.WriteXml(fw);


It does add the data, however, it adds it outside the main xml hierarchy. For example, instead of:

<rss><br />
<channel><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>new text</thequote></quote><br />
</channel><br />
</rss><br />


it writes to the file as:
<rss><br />
<channel><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>text</thequote></quote><br />
</channel><br />
</rss><br />
<quote><thequote>new text</thequote></quote><br />


how do I make the added rows to the dataset write into the proper hierarchy?
Generalnamespace. what dll refrence to add Pin
HuntTheShunt219-May-05 22:19
HuntTheShunt219-May-05 22:19 
GeneralRe: namespace. what dll refrence to add Pin
mav.northwind19-May-05 23:22
mav.northwind19-May-05 23:22 
GeneralRe: namespace. what dll refrence to add Pin
HuntTheShunt220-May-05 8:34
HuntTheShunt220-May-05 8:34 
GeneralRe: namespace. what dll refrence to add Pin
mav.northwind20-May-05 19:49
mav.northwind20-May-05 19:49 
GeneralReadOnly properties initialization Pin
Vjacheslav Murashkin19-May-05 21:56
Vjacheslav Murashkin19-May-05 21:56 
GeneralRe: ReadOnly properties initialization Pin
walcott19-May-05 22:20
walcott19-May-05 22:20 
GeneralRe: ReadOnly properties initialization Pin
Vjacheslav Murashkin20-May-05 0:10
Vjacheslav Murashkin20-May-05 0:10 
GeneralInterview Question on assemblies Pin
mowli19-May-05 21:13
mowli19-May-05 21:13 
GeneralRe: Interview Question on assemblies Pin
leppie19-May-05 21:33
leppie19-May-05 21:33 
GeneralRe: Interview Question on assemblies Pin
mowli19-May-05 22:48
mowli19-May-05 22:48 
GeneralRe: Interview Question on assemblies Pin
mav.northwind19-May-05 23:19
mav.northwind19-May-05 23:19 
Generalassemblies Pin
mowli19-May-05 21:09
mowli19-May-05 21:09 
GeneralRe: assemblies Pin
leppie19-May-05 21:34
leppie19-May-05 21:34 
Generalsynchronization database Pin
SEAGames2219-May-05 20:57
SEAGames2219-May-05 20:57 
GeneralRe: synchronization database Pin
gnjunge19-May-05 23:44
gnjunge19-May-05 23:44 
GeneralInteresting problem with datagrid Pin
Anonymous.19-May-05 19:20
sussAnonymous.19-May-05 19:20 
GeneralRe: Interesting problem with datagrid Pin
John Fisher20-May-05 9:50
John Fisher20-May-05 9:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.