<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/55049.aspx</link><pubDate>Wed, 19 May 2010 14:23:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55049</guid><dc:creator>colecg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55049.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55049</wfw:commentRss><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;I followed your advice, but I had problem with one control text box that gets filled with System.Environment.UserName&lt;/p&gt;
&lt;p&gt;I ended up with following code for my purpose&lt;/p&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; firstElement = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:group3/my:group4[1]&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; userName = firstElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:txtCreatedBy&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value; //had to add this because this would get written over when other user inserted new item&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;firstElement.InsertAfter(firstElement);&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newElement = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:group3/my:group4[1]&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:dtDate&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:ddlStatus&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;Draft&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:ddlUpdateType&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;Update Report&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:ddlMonthOfMonthlyUpdate&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;January 2010&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:Update&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:txtComment&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:txtMonthlySummary&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:txtAssessment&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:txtAtt&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:txtCreatedBy&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(System.&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;Environment&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.UserName);//this action was setting the user name of both new and orginial item to same user name&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;newElement.MoveToNext();//I move to next to return the original user name on previous node&lt;/p&gt;
&lt;p&gt;newElement.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:txtCreatedBy&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(userName);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Why does only this one field txtCreatedBy gets written over for node prior to newly inserted one? rest of the fields are untouched.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Thank you again for all your help&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/54983.aspx</link><pubDate>Tue, 18 May 2010 15:51:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54983</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54983.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54983</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;If you want to insert items to the front of the list:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;1. Select the first item in the list.&lt;/p&gt;&lt;p&gt;2. Insert a copy of it after itself using InsertAfter().&lt;/p&gt;&lt;p&gt;3. Modify the first item in the list (selected in step 1).&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I don&amp;#39;t see any reason why you would need Clone() in order to do this. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/54965.aspx</link><pubDate>Tue, 18 May 2010 07:43:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54965</guid><dc:creator>colecg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54965.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54965</wfw:commentRss><description>&lt;p&gt;okay I have suceeded in appending the child&lt;/p&gt;
&lt;p&gt;But the reason I was using clone before was because I will have a list of&amp;nbsp; or more nodes and the new node has to be at top, not at the end of the list, because users who have 100 nodes will have to scroll and I have some spoiled users who do not want to do that. &lt;/p&gt;
&lt;p&gt;So, clone gave me possibility to do InsertAfter of cloned node but failed to give me possibility to change the values of attributes inside of cloned node without changing the original.&lt;/p&gt;
&lt;p&gt;Now, with using AppendChild, can you give me an advice how to quickly move that child that was appended at the end to be at first position?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description></item><item><title>Re: XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/54964.aspx</link><pubDate>Tue, 18 May 2010 07:11:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54964</guid><dc:creator>colecg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54964.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54964</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have tried of course before I posted on here&lt;/p&gt;
&lt;p&gt;I tried following which gives me problem&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;Case one&amp;nbsp;&lt;/p&gt;
&lt;p&gt;MainDataSource.CreateNavigator().AppendChild(); //This does not append anything&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Case two&lt;/p&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newElement = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:group3/my:group4&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;MainDataSource.CreateNavigator().AppendChild(newElement);&lt;/p&gt;
&lt;p&gt;//This gives me following error&lt;/p&gt;
&lt;p&gt;Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 1, position 9.&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;Regards&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/54933.aspx</link><pubDate>Mon, 17 May 2010 11:47:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54933</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54933.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54933</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I already described how to get around the issue.&amp;nbsp; Why don&amp;#39;t you try it out for yourself?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/54931.aspx</link><pubDate>Mon, 17 May 2010 11:23:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54931</guid><dc:creator>colecg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54931.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54931</wfw:commentRss><description>&lt;p&gt;did you ever suceed solving this issue?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have same problem and came accross your post&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Re: XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/45185.aspx</link><pubDate>Thu, 30 Jul 2009 12:54:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45185</guid><dc:creator>Indyshawn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45185.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45185</wfw:commentRss><description>&lt;p&gt;I am encountering the same situation - were you able to resolve this using the recommended solution?&amp;nbsp; I would be very interested in any info you can share - thanks!!&lt;/p&gt;</description></item><item><title>Re: XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/40502.aspx</link><pubDate>Thu, 09 Apr 2009 23:45:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40502</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40502.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=40502</wfw:commentRss><description>&lt;p&gt;I went and tried this for myself and was surprised to find the same thing as you did.&amp;nbsp; It turns out that like several members of XPathNavigator, Clone() functions differently from the member of the same name in the XmlNode class. However, if you read the documentation on MSDN, you will find this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="title"&gt;XPathNavigator&lt;span class="cs"&gt;.&lt;/span&gt;&lt;span class="vb"&gt;.&lt;/span&gt;&lt;span class="cpp"&gt;::&lt;/span&gt;&lt;span class="nu"&gt;.&lt;/span&gt;Clone Method &lt;/div&gt;
&lt;div id="mainBody"&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="summary"&gt;
&lt;p&gt;When overridden in a derived class, creates a new &lt;span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xpath.xpathnavigator.aspx" id="ctl00_rs1_mainContentContainer_ctl03"&gt;XPathNavigator&lt;/a&gt;&lt;/span&gt; &lt;b&gt;positioned at the same node&lt;/b&gt; as this &lt;span&gt;XPathNavigator&lt;/span&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;The Clone() method actually creates a copy of the XPathNavigator &lt;i&gt;object&lt;/i&gt;, not a clone of the node.&amp;nbsp; If you want to add a copy of a node to your data source, you can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Append the node to the data source (no need to use Clone(); appending it will create a copy of the node).&lt;/li&gt;
&lt;li&gt;Select the new node using SelectSingleNode() or other selection methods&lt;/li&gt;
&lt;li&gt;Modify the new node&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;I typically do not recommend adding rows to repeating groups by copying a node in the main data source because it leaves your strategy up the creek without a paddle if all the rows in the section happen to be deleted.&lt;/p&gt;</description></item><item><title>XPathNavigator.Clone() not really cloning?</title><link>https://www.infopathdev.com:443/forums/thread/40495.aspx</link><pubDate>Thu, 09 Apr 2009 18:58:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40495</guid><dc:creator>jaskey</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40495.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=40495</wfw:commentRss><description>&lt;p&gt;Hello everyone...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Firstly, this site is *amazing* and I want to thank everyone for the past postings which has allowed me to get a fairly complex Infopath form up and running in couple of weeks...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am making a form with C# codebehind and I am programmatically adding a new row to my repeating table via a button click...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am using Clone to copy the first row (always exists) and then interating through each child and clearing the values for the new row. However, it seems that the return from Clone is still pointing to the original row as my end result is the original first row and the new row having cleared values. I was assuming that Clone() was making a copy&amp;nbsp;of the original node but it seems that it is not in my case...&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any thoughts?&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thank you!!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;jess&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ButtonAddSample_Clicked(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ClickedEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// get a reference to the node the repeating table is bound to&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; row = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:queryFields/tns:SubmitGroundwaterSamplingData/tns:data/tns:GroundwaterSamplingData/tns:SampleData/tns:SampleData&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// make a copy of the node by cloning it&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newrow = row.Clone();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//remove all former values&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNodeIterator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; iterator = newrow.SelectChildren(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNodeType&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Element);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;while&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (iterator.MoveNext())&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;blockquote&gt;iterator.Current.SetValue(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Empty);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/blockquote&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//add it after&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;newrow.InsertAfter(row);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>