<?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: Insert optional section in VB.Net</title><link>https://www.infopathdev.com:443/forums/thread/14876.aspx</link><pubDate>Fri, 10 Nov 2006 05:26:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14876</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14876.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14876</wfw:commentRss><description>Hi Eugene,&lt;br /&gt;&lt;br /&gt;Here is one way of adding a new row to the repeating table.&lt;br /&gt;&lt;br /&gt;//write get the XML of repeating node into a string &lt;br /&gt;string sRepeatingXml = "&amp;lt;LogEntries&amp;gt;&amp;lt;name&amp;gt;NameValue&amp;lt;/name&amp;gt;&amp;lt;age&amp;gt;Agevalue&amp;lt;/age&amp;gt;&amp;lt;/LogEntries&amp;gt;";&lt;br /&gt;&lt;br /&gt;//create a Dom for the XMLNode&lt;br /&gt;IXMLDOMDocument oXml = thisXDocument.CreateDOM();&lt;br /&gt;oXml.async = false;&lt;br /&gt;oXml.loadXML(sRepeatingXml);&lt;br /&gt;&lt;br /&gt;//Get the Parent of the repeating table&lt;br /&gt;ixmldomNode parentofRepeatingNode = getNode("XPath");&lt;br /&gt;&lt;br /&gt;//append the repeating XML Element to the Parent node&lt;br /&gt;parentofRepeatingNode.appendChild(oXml.documentElement);</description></item><item><title>Insert optional section in VB.Net</title><link>https://www.infopathdev.com:443/forums/thread/12978.aspx</link><pubDate>Thu, 09 Nov 2006 22:39:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12978</guid><dc:creator>dream1213</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12978.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12978</wfw:commentRss><description>I have an optional section in my form.  I hope I can insert more by code in VB.NET.&lt;br /&gt;&lt;br /&gt;First of all, I have tried thisXDocument.View.ExecuteAction("xOptional::insert", "repeatable section name"). It didn't work.&lt;br /&gt;&lt;br /&gt;I am trying to use appendChild. the code is showed below:&lt;br /&gt;&lt;br /&gt;oRepeatSectionNode = thisXDocument.DOM.selectSingleNode("Xpath")&lt;br /&gt;domXMLNode = thisXDocument.CreateDOM()&lt;br /&gt;domXMLNode.async = False&lt;br /&gt;domXMLNode.loadXML(oRepeatSectionNode.xml)           &lt;br /&gt;thisXDocument.UI.Alert(domXMLNode.xml)              &lt;br /&gt;oParentNode = thisXDocument.DOM.selectSingleNodeXpath")&lt;br /&gt;&lt;br /&gt; ' so far it is good, but an error occured in following code: &lt;br /&gt; oParentNode.appendChild(domXMLNode.documentElement)&lt;br /&gt;&lt;br /&gt; Error:  Element 'SectionNodeName' is unexpected according to content model of parent element 'SectionParentNodeName'.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have spent whole day, but no luck. &lt;br /&gt;&lt;br /&gt;Thanks in advance.&lt;br /&gt;&lt;br /&gt;Eugene,&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>