<?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: Repeating table from XMLDataDoc</title><link>https://www.infopathdev.com:443/forums/thread/13113.aspx</link><pubDate>Tue, 31 Aug 2004 21:55:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13113</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13113.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13113</wfw:commentRss><description>Glad you got it working!!&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Repeating table from XMLDataDoc</title><link>https://www.infopathdev.com:443/forums/thread/13112.aspx</link><pubDate>Sat, 28 Aug 2004 01:45:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13112</guid><dc:creator>frank_solner</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13112.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13112</wfw:commentRss><description>Greg, The fix was two-fold: The row counter had to be one level higher (in this case at the group level) not at the field level where I had it. The other thing was to insert the new row to the repeating table after the first row. This works fine albeit kind of wordy. Thanks for getting me going. &lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Frank&lt;br /&gt;&lt;br /&gt;------------------------------------------&lt;br /&gt;&lt;br /&gt;'xnodes = XmlNodeList previously loaded&lt;br /&gt;   &lt;br /&gt;         For i = 0 To xNodes.Count - 1&lt;br /&gt;		&lt;br /&gt;                If i &amp;lt;&amp;gt; 0 Then&lt;br /&gt;                    'Get the xCollection name (i.e. table_2) from the advanced tab on the repeating table&lt;br /&gt;                    thisXDoc.View.ExecuteAction("xCollection::insert", table_2)&lt;br /&gt;                End If&lt;br /&gt;&lt;br /&gt;                With thisXDoc.DOM&lt;br /&gt;                    .selectSingleNode("/my:myFields/my:Group1[" &amp; i+1 &amp; "]/my:first").text = xNodes(i).Item("first").InnerText&lt;br /&gt;                    .selectSingleNode("/my:myFields/my:Group1[" &amp; i+1 &amp; "]/my:last").text = xNodes(i).Item("last").InnerText&lt;br /&gt;                End With&lt;br /&gt;&lt;br /&gt;         Next</description></item><item><title>Re: Repeating table from XMLDataDoc</title><link>https://www.infopathdev.com:443/forums/thread/13111.aspx</link><pubDate>Wed, 18 Aug 2004 21:30:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13111</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13111.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13111</wfw:commentRss><description>I haven't forgotten you... I've just got a very busy week and haven't had any time to reply with a solution. If you find an answer before I reply back, just say so.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Repeating table from XMLDataDoc</title><link>https://www.infopathdev.com:443/forums/thread/13110.aspx</link><pubDate>Sun, 15 Aug 2004 12:22:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13110</guid><dc:creator>frank_solner</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13110.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13110</wfw:commentRss><description>Hey Greg. I did a lot of homework and still cannot get it to go. Could you provide an example of how to add rows to a repeating table from an XMLDataDocument. In other words, I want to add one row to the repeating table for each node in the XDD. &lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Frank&lt;br /&gt;&lt;br /&gt;Frank Solner</description></item><item><title>Re: Repeating table from XMLDataDoc</title><link>https://www.infopathdev.com:443/forums/thread/13109.aspx</link><pubDate>Thu, 05 Aug 2004 02:59:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13109</guid><dc:creator>frank_solner</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13109.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13109</wfw:commentRss><description>Thanks Greg. I will not know the number of rows. I guess I could loop through the nodes and count them? I will give this a try and let you know. Thanks again.  &lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Frank&lt;br /&gt;&lt;br /&gt;Frank Solner</description></item><item><title>Re: Repeating table from XMLDataDoc</title><link>https://www.infopathdev.com:443/forums/thread/13108.aspx</link><pubDate>Thu, 05 Aug 2004 01:29:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13108</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13108.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13108</wfw:commentRss><description>Your selectSingleNode() call is always grabbing the first row of the table. If you can guarantee that you will always have the same number of rows as you do XNodes, then you could use a variable to get you by:&lt;br /&gt;&lt;br /&gt;Dim iRow = 1&lt;br /&gt;For Each XNode In XNodes&lt;br /&gt;thisXDocument.DOM.selectSingleNode("//my:first[iRow]").text = XNode.InnerText.ToString&lt;br /&gt;thisXDocument.DOM.selectSingleNode("//my:last[iRow]").text = XNode.InnerText.ToString&lt;br /&gt;iRow = iRow + 1&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But if you are trying to actually create a new row in the table for each XNode that exists, that's a whole different scenario. In this case you would need to create new Elements and populate them, then insert them into the DOM.&lt;br /&gt;&lt;br /&gt;Let me know if this was enough to get you going, or if you need more help.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Repeating table from XMLDataDoc</title><link>https://www.infopathdev.com:443/forums/thread/12411.aspx</link><pubDate>Mon, 02 Aug 2004 21:05:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12411</guid><dc:creator>frank_solner</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12411.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12411</wfw:commentRss><description>I want to populate a repeating table from VB managed code from an XMLDataDocument. &lt;br /&gt;&lt;br /&gt;&amp;lt;table&amp;gt;&lt;br /&gt;&amp;lt;row&amp;gt;&amp;lt;first&amp;gt;Tom&amp;lt;/first&amp;gt;&amp;lt;last&amp;gt;Smith&amp;lt;/last&amp;gt;&amp;lt;/row&amp;gt;&lt;br /&gt;&amp;lt;row&amp;gt;&amp;lt;first&amp;gt;Dick&amp;lt;/first&amp;gt;&amp;lt;last&amp;gt;Jones&amp;lt;/last&amp;gt;&amp;lt;/row&amp;gt;&lt;br /&gt;&amp;lt;row&amp;gt;&amp;lt;first&amp;gt;Harry&amp;lt;/first&amp;gt;&amp;lt;last&amp;gt;Johnson&amp;lt;/last&amp;gt;&amp;lt;/row&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&lt;br /&gt;I would like the repeating table to look like this:  &lt;br /&gt;Tom		Smith&lt;br /&gt;Dick		Jones&lt;br /&gt;Harry		Johnson&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I tried variations of this: &lt;br /&gt;&lt;br /&gt;For Each XNode In XNodes&lt;br /&gt;	thisXDocument.DOM.selectSingleNode("//my:first").text = XNode.InnerText.ToString&lt;br /&gt;	thisXDocument.DOM.selectSingleNode("//my:last").text = XNode.InnerText.ToString&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;The only thing that showed up was (the last one in the first row):&lt;br /&gt;&lt;br /&gt;Harry		Johnson&lt;br /&gt;&lt;br /&gt;Do you have an example of how to do this? Thanks.&lt;br /&gt;&lt;br /&gt;Frank</description></item></channel></rss>