<?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>Connect to XML via Managed Code (C#)</title><link>https://www.infopathdev.com:443/forums/thread/43512.aspx</link><pubDate>Fri, 26 Jun 2009 15:34:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43512</guid><dc:creator>ccarns</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43512.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=43512</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Could someone point me to an example of creating a data connection to an XML file for a secondary data source? The data in question&amp;nbsp;is being created by a different InfoPath form on the same server and in the same folder as this one, not that it should make much difference.&lt;/p&gt;
&lt;p&gt;The example I find are all creating it via the GUI and I need to do in the code behind because my connection is dynamic (path parameter coming into the form via the URL -which I have already worked out).&lt;/p&gt;
&lt;p&gt;Environment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;MOSS&amp;nbsp;2007&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Using form services and web forms (2007)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;All I am trying to accomplish is to display a few fields from the other XML file in this form as read only information.&lt;/p&gt;
&lt;p&gt;Thanks ahead of time for your time and effort!&lt;/p&gt;</description></item></channel></rss>