<?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: Fully Editable Drop-Down List Box</title><link>https://www.infopathdev.com:443/forums/thread/18769.aspx</link><pubDate>Fri, 15 Apr 2005 16:25:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18769</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18769.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=18769</wfw:commentRss><description>In statement &lt;br /&gt;var logHistoryGroup = XDocument.DOM.selectNodes (/my:myFields/my:logHistorySection/my:logHistoryGroup");&lt;br /&gt;&lt;br /&gt;XDocument.DOM.selectNodes gets the array of nodes(IXmlDomNodeList). we cannot add the nodes to this object. Instead we should get the parent node and append children to that node.&lt;br /&gt;&lt;br /&gt;so your statement should be  &lt;br /&gt;&lt;br /&gt;var logHistoryGroup = XDocument.DOM.selectSingleNode("/my:myFields/my:logHistorySection/my:logHistoryGroup");&lt;br /&gt;...&lt;br /&gt;logHistoryGroup.appendChild(oNode);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfopathDev India</description></item><item><title>Fully Editable Drop-Down List Box</title><link>https://www.infopathdev.com:443/forums/thread/18724.aspx</link><pubDate>Thu, 14 Apr 2005 02:36:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18724</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18724.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=18724</wfw:commentRss><description>I'm trying to add entries to a repeating section programmatically just like the example Fully Editable Drop-Down List Box.&lt;br /&gt;&lt;br /&gt;Like in the example, I built:&lt;br /&gt;- a group (/my:myFields/my:logHistorySection/my:logHistoryGroup)&lt;br /&gt;- a repeating section with an expression box inside the group&lt;br /&gt;(/my:myFields/my:logHistorySection/my:logHistoryGroup/my:fieldName)&lt;br /&gt;&lt;br /&gt;But everytime the code is invoked, an error of "Object doesn't support this property or method" occurs at the line executing "appendChild" method.&lt;br /&gt;This is the code I followed from the sample:&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;function msoxd_my_formType::OnAfterChange(eventObj)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;var logHistoryGroup = XDocument.DOM.selectNodes("/my:myFields/my:logHistorySection/my:logHistoryGroup");&lt;br /&gt;&lt;br /&gt;var sOld	= eventObj.OldValue;&lt;br /&gt;var sNew	= eventObj.NewValue;&lt;br /&gt;&lt;br /&gt;if(sNew != "")&lt;br /&gt;{&lt;br /&gt;	var oNode = XDocument.DOM.createNode(1, "my:fieldName", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-03-04T02:16:49");&lt;br /&gt;			&lt;br /&gt;	oNode.text = "test value";&lt;br /&gt;			&lt;br /&gt;	logHistoryGroup.appendChild(oNode);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Any idea why the error is happening?&lt;br /&gt;&lt;br /&gt;Thanks :)</description></item></channel></rss>