<?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: Reinitializing form values after removeAll() (C#)</title><link>https://www.infopathdev.com:443/forums/thread/22452.aspx</link><pubDate>Tue, 21 Aug 2007 07:19:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22452</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22452.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=22452</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Here is the below code first deletes the all child nodes and next we are adding those nodes.&lt;/p&gt;
&lt;p&gt;IXMLDOMNode parentNode = thisXDocument.DOM.selectSingleNode(&amp;quot;//my:new&amp;quot;);&lt;/p&gt;
&lt;p&gt;IXMLDOMNodeList childNodes = thisXDocument.DOM.selectSingleNode(&amp;quot;//my:new&amp;quot;).selectNodes(&amp;quot;*&amp;quot;);&lt;/p&gt;
&lt;p&gt;IXMLDOMNodeList tempChildNodes = childNodes;&lt;/p&gt;
&lt;p&gt;childNodes.removeAll();&lt;/p&gt;
&lt;p&gt;foreach (IXMLDOMNode tempChildNode in tempChildNodes)&lt;br /&gt;{&lt;/p&gt;
&lt;p&gt;parentNode.appendChild(tempChildNode);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Hope this Helps you&lt;/p&gt;</description></item><item><title>Reinitializing form values after removeAll() (C#)</title><link>https://www.infopathdev.com:443/forums/thread/22269.aspx</link><pubDate>Thu, 09 Aug 2007 19:41:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22269</guid><dc:creator>CSSmitty</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22269.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=22269</wfw:commentRss><description>&lt;p&gt;My form system will allow the user to submit several times, starting over with a clean form each time and not closing infopath.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;m using code to submit the form and am currently able to clear the form.&amp;nbsp; The problem is that all the fields are grayed out after I use &amp;#39;removeAll&amp;#39; .&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The code to clean up all the values is:&lt;/p&gt;&lt;p&gt;IXMLDOMSelection reset = (IXMLDOMSelection)thisXDocument.DOM.selectSingleNode(&amp;quot;//my:new&amp;quot;).selectNodes(&amp;quot;*&amp;quot;);&lt;br /&gt;reset.removeAll(); &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;How can I reinitialize these values after I clear them out?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;-C&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>