<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Repeating groups containing repeating groups</title><link>https://www.infopathdev.com:443/forums/thread/7368.aspx</link><pubDate>Thu, 04 Aug 2005 13:38:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7368</guid><dc:creator>bobstery</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7368.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7368</wfw:commentRss><description>I have now figured it out, the problem was that the repeating group had been created once when the parent node (i.e my:Results) had originally been created, however there were other elements below the repeating group (i.e. my:Activity) that belonged to my:Results, therefore when I tried to add nodes to my:Activity I got a schema error as the node can only be created in order of how the schema expects.&lt;br /&gt;   I therefore moved the repeating group my:Activity to the bottom of the my:Results repeating group.</description></item><item><title>Repeating groups containing repeating groups</title><link>https://www.infopathdev.com:443/forums/thread/4829.aspx</link><pubDate>Thu, 04 Aug 2005 10:25:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4829</guid><dc:creator>bobstery</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4829.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4829</wfw:commentRss><description>I have the following structure (simplified for this illustraion):&lt;br /&gt;&lt;br /&gt;my:Fields&lt;br /&gt;  my:Results&lt;br /&gt;     jobid&lt;br /&gt;     address&lt;br /&gt;     postcode&lt;br /&gt;     my:Activity&lt;br /&gt;       type&lt;br /&gt;       serialnum&lt;br /&gt;     action&lt;br /&gt;&lt;br /&gt;I am trying to dynamically call a stored procedure to produce the my:Activity elements if the jobid from my:Results returns any elements when calling the stored procedure with the jobid value.&lt;br /&gt;&lt;br /&gt;See my code below (which is called after the user has selected a row and clicked on a button):&lt;br /&gt;&lt;br /&gt;&lt;i&gt;	&lt;br /&gt;var jobid = eventObj.Source.selectSingleNode("my:jobid").text&lt;br /&gt;		XDocument.DataAdapters("JobColl").Command = "execute getJobActivity "+ jobid;&lt;br /&gt;&lt;br /&gt;XDocument.DataAdapters("JobColl").Query();&lt;br /&gt;	&lt;br /&gt;var jobResults = XDocument.GetDOM("JobCol").getElementsByTagName("d:JOBCOL");&lt;br /&gt;		&lt;br /&gt;for(var j=1;j&amp;lt;jobResults.length+1;j++)&lt;br /&gt;{&lt;br /&gt;var oNode = XDocument.DOM.selectSingleNode("/dfs:myFields/my:Results/my:Activity");&lt;br /&gt;&lt;br /&gt;oNode = oNode.cloneNode(true);&lt;br /&gt;&lt;br /&gt;oNode.selectSingleNode("my:serialnum").text = XDocument.GetDOM("JobCol").selectSingleNode("/dfs:myFields/dfs:dataFields/d:JOBCOL["+j+"]/@jbcl_serialnum").text;&lt;br /&gt;			&lt;br /&gt;parent = XDocument.DOM.selectSingleNode("/dfs:myFields/my:Results");&lt;br /&gt;parent.appendChild(oNode);	&lt;br /&gt;}&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I tried to make the parent the individual element of my:Results corresponding to the job id e.g.&lt;br /&gt;&lt;br /&gt;parent = XDocument.DOM.selectSingleNode("/dfs:myFields/my:Results[ntlid="+jobid+"]");&lt;br /&gt;&lt;br /&gt;However it stated that the value was null or not an object. &lt;br /&gt;&lt;br /&gt;However when trying to add the oNode to the Parent I get the following error:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Element {&lt;a target="_blank" href=http://schemas....&gt;http://schemas....&lt;/a&gt; } 'Activity' is unexpected according to the content model of parent element&lt;br /&gt;{&lt;a target="_blank" href=http://schemas...&gt;http://schemas...&lt;/a&gt; } 'Results' &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The format is correct though, does anybody see anything obvious.&lt;br /&gt;&lt;br /&gt;Many Thanks</description></item></channel></rss>