<?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: Adding optional sections in code</title><link>https://www.infopathdev.com:443/forums/thread/14715.aspx</link><pubDate>Tue, 11 Jul 2006 02:27:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14715</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14715.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14715</wfw:commentRss><description>You can remove the child section before adding the parent. It would go something like this:&lt;br /&gt;&lt;br /&gt;IXMLDOMDocument2 tempdom = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;br /&gt;tempdom.async = false;&lt;br /&gt;tempdom.validateOnParse = false;&lt;br /&gt;tempdom.load( "sampledata.xml" );&lt;br /&gt;&lt;br /&gt;IXMLDOMNode nToAdd = tempdom.documentElement.selectSingleNode( "/group1/group2" );&lt;br /&gt;&lt;br /&gt;IXMLDOMNode nToDelete = nToAdd.selectSingleNode( "group3" );&lt;br /&gt;nToDelete.parentNode.removeChild( nToDelete );&lt;br /&gt;&lt;br /&gt;// Now add it to the Main DOM and it won't have that child section (i.e. will be hidden)&lt;br /&gt;</description></item><item><title>Re: Adding optional sections in code</title><link>https://www.infopathdev.com:443/forums/thread/14714.aspx</link><pubDate>Tue, 11 Jul 2006 01:58:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14714</guid><dc:creator>SamDahl</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14714.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14714</wfw:commentRss><description>Tried adding the section and then hiding the subsection? just a thought...  &lt;br /&gt;&lt;br /&gt;GL</description></item><item><title>Adding optional sections in code</title><link>https://www.infopathdev.com:443/forums/thread/12916.aspx</link><pubDate>Mon, 10 Jul 2006 23:33:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12916</guid><dc:creator>djay</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12916.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12916</wfw:commentRss><description>I'm adding an optional section in C#.  I can't use executeAction so I'm using appendChild with the xml I got out of sampledata.xml&lt;br /&gt;&lt;br /&gt;The problem is that I have optional sections within this optional section and I want them to remain hidden.  Is there a way to add this optional section without adding it's children?</description></item></channel></rss>