<?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>Re: How access to a data connection in a resource file</title><link>https://www.infopathdev.com:443/forums/thread/12328.aspx</link><pubDate>Tue, 12 Dec 2006 19:21:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12328</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12328.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12328</wfw:commentRss><description>Do both DOMs have the exact same namespaces? Maybe that's an issue.</description></item><item><title>Re: How access to a data connection in a resource file</title><link>https://www.infopathdev.com:443/forums/thread/12327.aspx</link><pubDate>Mon, 11 Dec 2006 17:42:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12327</guid><dc:creator>Kun</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12327.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12327</wfw:commentRss><description>I wanted to do exactly the same as you proposed but this does not work. The bold marked line is the problem. In the debug window both InnerXml properties seem to be the same!? Why can't I set it this way?&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;System.Xml.XPath.XPathNavigator fieldxpn;&lt;br /&gt;            &lt;br /&gt;// the new values in the drop down list&lt;br /&gt;String[] newItems = { "11111", "22222222", "33333333" };&lt;br /&gt;&lt;br /&gt;// create a new XML document&lt;br /&gt;XmlDocument newXdoc = new XmlDocument();&lt;br /&gt;XmlElement colNames = newXdoc.CreateElement("ColumnNames");&lt;br /&gt;newXdoc.AppendChild(colNames);&lt;br /&gt;&lt;br /&gt;foreach (String s in newItems)&lt;br /&gt;{&lt;br /&gt;                XmlElement colName =  newXdoc.CreateElement("ColumnName");&lt;br /&gt;                colName.InnerText = s;&lt;br /&gt;                colNames.AppendChild(colName);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;fieldxpn = DataSources["participantFields"].CreateNavigator();&lt;br /&gt;            &lt;br /&gt;// ERROR: why does this not work?&lt;br /&gt;// -&amp;gt; "Unexpected XML declaration. The XML declaration &lt;br /&gt;// must be the first node in the document, &lt;br /&gt;// and no white space characters are allowed to appear before it. &lt;br /&gt;// Line 1, position 9."&lt;br /&gt;&lt;b&gt;fieldxpn.InnerXml = newXdoc.InnerXml;&lt;/b&gt;&lt;br /&gt;&lt;/pre&gt;</description></item><item><title>Re: How access to a data connection in a resource file</title><link>https://www.infopathdev.com:443/forums/thread/12326.aspx</link><pubDate>Fri, 08 Dec 2006 17:29:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12326</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12326.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12326</wfw:commentRss><description>Don't load it that way.&lt;br /&gt;&lt;br /&gt;1. Create a data connection to the XML file (sounds like you've already done that).&lt;br /&gt;2. Use the GetDOM() method to load your XML DOM into a variable.&lt;br /&gt;3. You might need to set namespaces--if so, do that.&lt;br /&gt;4. Access your XML DOM the same as you would the main DOM from the XDocument object.</description></item><item><title>How access to a data connection in a resource file</title><link>https://www.infopathdev.com:443/forums/thread/12142.aspx</link><pubDate>Fri, 08 Dec 2006 09:59:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12142</guid><dc:creator>Kun</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12142.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12142</wfw:commentRss><description>How can I access a data connection, represented as a xml data source in a resource file in managed code?&lt;br /&gt;&lt;br /&gt;I use Infopath 2007 and VS 2005 and I've just found IP 2003 code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;IXMLDOMDocument2 domSecondaryXML = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;br /&gt;domSecondaryXML.async = false;&lt;br /&gt;domSecondaryXML.load("participantFields.xml");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What are the equivalent IP 2007 classes?</description></item></channel></rss>