<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Loading a form from an XML string?</title><link>https://www.infopathdev.com:443/forums/thread/30381.aspx</link><pubDate>Sat, 12 Jul 2008 12:19:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30381</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30381.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=30381</wfw:commentRss><description>&lt;p&gt;Hi, welcome, and thank you for posting your solution -- this is going to be helpful to others!&lt;/p&gt;</description></item><item><title>Re: Loading a form from an XML string?</title><link>https://www.infopathdev.com:443/forums/thread/30378.aspx</link><pubDate>Sat, 12 Jul 2008 00:55:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30378</guid><dc:creator>markw</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30378.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=30378</wfw:commentRss><description>&lt;p&gt;OK, this is what I figured out:&lt;/p&gt;&lt;p&gt;Given my web service data source,&amp;nbsp; the XML of the saved data I retrieved is in the node GetDataResult. I get the DOM for the GetData connection and cast is to an IXMLDOMDocument2. I use the setProperty method to setup the SelectionNamespaces so I can select the GetDataResult node. If there is no data, I don&amp;#39;t have a previous saved version (this is how MY webservice works, yours may differ). I create a new IXMLDOMDocument and load it from the string. Now I have a source DOM I can copy from. The implementation details here are going to depend on what you want to do. In my case, I empty out a repeating list and then merge the form.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IXMLDOMDocument2 getData = (IXMLDOMDocument2)thisXDocument.GetDOM(&amp;quot;GetData&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getData.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;quot;xmlns:dfs=&amp;#39;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;#39; xmlns:ns2=&amp;#39;http://mywebsite.com/mynamespace&amp;#39;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IXMLDOMNode aNode = getData.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/ns2:GetDataResponse/ns2:GetDataResult&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (aNode.text == &amp;quot;&amp;quot;) return;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IXMLDOMDocument srcDom = thisXDocument.CreateDOM();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcDom.loadXML(aNode.text);&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Loading a form from an XML string?</title><link>https://www.infopathdev.com:443/forums/thread/30256.aspx</link><pubDate>Wed, 09 Jul 2008 20:19:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30256</guid><dc:creator>markw</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30256.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=30256</wfw:commentRss><description>&lt;p&gt;I submit my form with an XML string to a web service. I would like to load (populate) the form from the same web service, which returns the XML string. Is there an easy way to do this? If I have to do a deep copy or something, how do I start?&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>