<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Printing SelectNodes works for Primay DataSource but not for Secondary can you explain why?</title><link>https://www.infopathdev.com:443/forums/thread/23319.aspx</link><pubDate>Thu, 27 Sep 2007 18:34:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23319</guid><dc:creator>justindevine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23319.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=23319</wfw:commentRss><description>&lt;p&gt;Can someone explain this to me?&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When trying to print a parent node in a Primary DataSource the following code produces a dialog box with all fields in that parent node.&amp;nbsp; AttendGroup is a repeating table in the form in which this code works.&amp;nbsp; All the fields are printed in one dialog box for each row in the repeating table.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;var nodeList = XDocument.DOM.selectNodes(&amp;quot;my:myFields/my:AttendGroup&amp;quot;)
	&lt;/p&gt;&lt;p&gt;var node
	
	&lt;/p&gt;&lt;p&gt;while( ( node = nodeList.nextNode()) != null)
	&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;
	XDocument.UI.Alert(node.text)
	&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;quot;Workshop History&amp;quot; is a SharePoint list.&amp;nbsp; The following code returns a blank dialog box for each row in the SharePoint List.&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;var oSharePointDom = XDocument.GetDOM(&amp;quot;Workshop History&amp;quot;)
	oSharePointDom.setProperty(&amp;quot;SelectionNamespaces&amp;quot;,&amp;#39;xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&amp;#39;);&lt;br /&gt;var sharedItems = oSharePointDom.selectNodes(&amp;quot;/dfs:myFields/dfs:dataFields/dfs:Workshop_History&amp;quot;)

	&lt;/p&gt;&lt;p&gt;while( ( node = sharedItems.nextNode()) != null)
	&lt;/p&gt;&lt;p&gt;{
		&lt;/p&gt;&lt;p&gt;
	XDocument.UI.Alert(node.text)&lt;/p&gt;&lt;p&gt;}&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Can someone explain why printing the whole node does not work when
using a secondary data source, but does work for primary ones?&amp;nbsp; BTW I
don&amp;#39;t believe this is a namespace issue as i can access individual
fields.&amp;nbsp; For example XDocument.UI.Alert(node.selectSingleNode(
&amp;quot;@First_Name&amp;quot; ).text works just fine if I put it in the while loop I
get a list of all the First Names in the SharePoint list so while I
have solved my problem I want to understand why the secondary data
source works differently here.&amp;nbsp; THANKS! &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>