<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: error while copying xml from secondary to main DOM</title><link>https://www.infopathdev.com:443/forums/thread/51301.aspx</link><pubDate>Tue, 02 Feb 2010 14:10:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51301</guid><dc:creator>vikas_chess</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51301.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=51301</wfw:commentRss><description>&lt;p&gt;I&amp;nbsp;have created the main data source from secondary data source. Now, how could i add a control&amp;nbsp;(say comments text box)&amp;nbsp;inside the List repeating field of main control? I am getting error while doing so. please suggest.&lt;/p&gt;</description></item><item><title>Re: error while copying xml from secondary to main DOM</title><link>https://www.infopathdev.com:443/forums/thread/50859.aspx</link><pubDate>Thu, 21 Jan 2010 15:14:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50859</guid><dc:creator>vikas_chess</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50859.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50859</wfw:commentRss><description>&lt;p&gt;thank you. there was problem with my resource structure.&lt;/p&gt;</description></item><item><title>Re: error while copying xml from secondary to main DOM</title><link>https://www.infopathdev.com:443/forums/thread/50852.aspx</link><pubDate>Thu, 21 Jan 2010 14:44:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50852</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50852.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50852</wfw:commentRss><description>Does your main data source have a my:List node directly under the my:myFields node, whose namespace is different from the myFields namespace?&amp;nbsp; You need to put your data into nodes that are defined in the structure of your main data source.&lt;br /&gt;</description></item><item><title>error while copying xml from secondary to main DOM</title><link>https://www.infopathdev.com:443/forums/thread/50849.aspx</link><pubDate>Thu, 21 Jan 2010 14:18:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50849</guid><dc:creator>vikas_chess</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50849.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50849</wfw:commentRss><description>&lt;p&gt;I am getting following error while writing code in Jscript to copy xml from secondary to main DOM:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Element &amp;#39;{&lt;font size="2"&gt;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-06-03T00:09:57}List&amp;#39;"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-06-03T00:09:57&lt;/font&gt;}List&amp;#39;&lt;/a&gt; is unexpected according to content model of parent element &amp;#39;{&lt;font size="2"&gt;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-01-20T15:52:17}MyFields&amp;#39;"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-01-20T15:52:17&lt;/font&gt;}MyFields&amp;#39;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;below is the JScript code:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; load::OnClick(eventObj)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; secondaryApes = XDocument.GetDOM(&amp;quot;apes&amp;quot;).selectNodes(&amp;quot;/Main/List&amp;quot;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; mainRoot = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields&amp;quot;);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; apes;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&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;(apes = secondaryApes.nextNode()) {&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; qNo = apes.selectSingleNode(&amp;quot;QNo&amp;quot;).text;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; question = apes.selectSingleNode(&amp;quot;Question&amp;quot;).text;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; apesXML = &amp;quot;&amp;lt;my:List xmlns:my=&amp;#39;http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-06-03T00:09:57&amp;#39;&amp;gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;+ &amp;quot;&amp;lt;my:QNo&amp;gt;&amp;quot; + qNo + &amp;quot;&amp;lt;/my:QNo&amp;gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;+ &amp;quot;&amp;lt;my:Question&amp;gt;&amp;quot; + question + &amp;quot;&amp;lt;/my:Question&amp;gt;&amp;lt;/my:List&amp;gt;&amp;quot;;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// Load new apes string into a temporary XML DOM.&lt;/p&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;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; domNewRow = XDocument.CreateDOM();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;domNewRow.validateOnParse = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/p&gt;domNewRow.async = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;false&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;domNewRow.loadXML(apesXML);&lt;/p&gt;
&lt;p&gt;domNewRow.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-06-03T00:09:57&amp;quot;&amp;#39;);&lt;/p&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;// Insert the new a into the main DOM.&lt;/p&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;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; lst = domNewRow.selectSingleNode(&amp;quot;my:List&amp;quot;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;mainRoot.appendChild(lst);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;getting error at last line: mainRoot.appendChild(lst);&lt;/p&gt;
&lt;p&gt;Please tell me how to resolve the error.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thank you.&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>