If I have this as my XML file
<?xml version="1.0" standalone="yes " ?>
- <opml>
- <body>
- <outline text="RssImport er OPML">
<outline title="CNN" htmlUrl=""
xmlUrl="http://rss.cnn.com/rss/cnn_topstories. rss" />
</outline>
</body>
</opml>
And I use this code to add a new row
System.Data.Dat aSet myds = new System.Data.Dat aSet();
myds.ReadXml(@" C:\Program Files\RSSImport er\Data\feeds.x ml");
System.Data.Dat aRow dr;
dr = myds.Tables[2].NewRow();
dr[0] = "test";
myds.Tables[2].Rows.Add(dr);
myds.AcceptChan ges();
myds.WriteXml(@ "C:\Program Files\RSSImport er\Data\feeds2. xml");
I end up with:
<?xml version="1.0" standalone="yes "?>
<opml>
<body>
<outline text="RssImport er OPML">
<outline title="CNN" htmlUrl=""
xmlUrl="http://rss.cnn.com/rss/cnn_topstories. rss" />
</outline>
</body>
<outline title="test" />
</opml>
But the new row with the title "test" should go right after the CNN entry
like this:
<?xml version="1.0" standalone="yes "?>
<opml>
<body>
<outline text="RssImport er OPML">
<outline title="CNN" htmlUrl=""
xmlUrl="http://rss.cnn.com/rss/cnn_topstories. rss" />
<outline title="test" />
</outline>
</body>
</opml>
Any idea on what I could be doing wrong?
Thanks