<?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: thisXDocument.ImportDOM error</title><link>https://www.infopathdev.com:443/forums/thread/14769.aspx</link><pubDate>Tue, 05 Sep 2006 17:21:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14769</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14769.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14769</wfw:commentRss><description>Yes, "Import" is going to pull in additional data, not replace any.&lt;br /&gt;&lt;br /&gt;If you want to replace the current DOM, try selecting the root node, and then doing a RootNode.parentNode.replaceChild()</description></item><item><title>Re: thisXDocument.ImportDOM error</title><link>https://www.infopathdev.com:443/forums/thread/14768.aspx</link><pubDate>Fri, 01 Sep 2006 20:57:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14768</guid><dc:creator>philscience</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14768.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14768</wfw:commentRss><description>Ok, I think I've got it.  There were a couple of problems - newDoc was complaining about some things, so I turned off validation and loaded it a different way.  This pretty much works now (although it is merging the new data into the form instead of replacing it, which I guess ImportDOM is supposed to do).&lt;br /&gt;&lt;br /&gt;IXMLDOMDocument newDoc = hisXDocument.CreateDOM();&lt;br /&gt;newDoc.validateOnParse = false;	&lt;br /&gt;newDoc.loadXML(transformedXml.ToString());&lt;br /&gt;thisXDocument.ImportDOM(newDoc);</description></item><item><title>Re: thisXDocument.ImportDOM error</title><link>https://www.infopathdev.com:443/forums/thread/14767.aspx</link><pubDate>Fri, 01 Sep 2006 18:00:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14767</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14767.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14767</wfw:commentRss><description>The newDoc schema must match exactly that of your form or you will end up with schema errors that will prevent the form from opening.&lt;br /&gt;&lt;br /&gt;Since you've said you applied an XSLT to the original DOM, that would indicate to me that you modified the DOM somehow--possibly changing node names, order or location. Any of these things will cause problems.</description></item><item><title>thisXDocument.ImportDOM error</title><link>https://www.infopathdev.com:443/forums/thread/12938.aspx</link><pubDate>Fri, 01 Sep 2006 16:28:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12938</guid><dc:creator>philscience</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12938.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12938</wfw:commentRss><description>Hi, &lt;br /&gt;&lt;br /&gt;I am having some performance issues when using ReplaceChild to modify the DOM, and am trying to instead use this:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;IXMLDOMDocument newDoc = thisXDocument.CreateDOM();&lt;br /&gt;newDoc.load(transformedXml.ToString());	&lt;br /&gt;thisXDocument.ImportDOM(newDoc);&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;But when this runs, I get the following error:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;System.Runtime.InteropServices.COMException&lt;br /&gt;This form has an unknown structure.&lt;br /&gt;#65279;#65279;&lt;br /&gt;The XML Schema specified for this form could not be identified.&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Has anyone run into this before?  I have a feeling that it might be related to the newDoc, it contains xml that was created from running XSLT on the original DOM.</description></item></channel></rss>