<?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: Copy rich text field with formatting</title><link>https://www.infopathdev.com:443/forums/thread/13523.aspx</link><pubDate>Fri, 02 Sep 2005 14:58:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13523</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13523.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13523</wfw:commentRss><description>Ok I will try next week!&lt;br /&gt;&lt;br /&gt;Thanks for the three solution!&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;&lt;br /&gt;Every moment hesitated is a moment gone for life!!! Think about it</description></item><item><title>Re: Copy rich text field with formatting</title><link>https://www.infopathdev.com:443/forums/thread/13522.aspx</link><pubDate>Thu, 01 Sep 2005 17:13:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13522</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13522.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13522</wfw:commentRss><description>The easiest fix is to make sure that both the Main DOM and 2DS have the same field name (including the same namespace). Even if both were named "Text" if one was "Text" and the other was "my:Text" replaceChild would still not work because they have to be the same fully qualified name (i.e. the namespace must match too).&lt;br /&gt;&lt;br /&gt;But you don't always have the capability to make both match.&lt;br /&gt;&lt;br /&gt;I don't recall if the Node.xml attribute is read/write or readonly. If it is read/write you might be able to do something like jean2.xml = jean.xml. You'll have to look into that.&lt;br /&gt;&lt;br /&gt;Other than that I can't think of anything right now that would work. I'm sure there some way to do it though, even if it means loading a custom XSL to transform the one into the other before doing the replaceChild.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Copy rich text field with formatting</title><link>https://www.infopathdev.com:443/forums/thread/12544.aspx</link><pubDate>Mon, 29 Aug 2005 14:37:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12544</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12544.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12544</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I wan't to copy in c# code the rich text field(RTF) in the Secondary data source(SDS) to my RTF in the Primary data source (PDS) without lost my formatting! Is it possible?&lt;br /&gt;&lt;br /&gt;What I have try:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;IXMLDOMNode jean = oDomSearchHRG.selectSingleNode("/tabMuster/Muster/Text[position()=1]");&lt;br /&gt;IXMLDOMNode jean2= thisXDocument.DOM.selectSingleNode("/my:myFields/my:group3/my:group4/my:field9");  			&lt;br /&gt;jean2.parentNode.replaceChild(jean, jean2);&lt;/pre&gt; &lt;br /&gt;&lt;br /&gt;That make me an error because the node is Text in the SDS and my:field9 in the PDS.&lt;br /&gt; &lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;jean2.replaceChild(jean, jean2);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;that make me this error:&lt;br /&gt; &lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;System.ArgumentException&lt;br /&gt;Insert position Node must be a Child of the Node to insert under.&lt;br /&gt;&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode.replaceChild(IXMLDOMNode newChild, IXMLDOMNode oldChild)&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.replaceChild(IXMLDOMNode newChild, IXMLDOMNode oldChild)&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper.replaceChild(IXMLDOMNode newChild, IXMLDOMNode oldChild)&lt;br /&gt;   at testmuster.testmuster.field9_OnAfterChange(DataDOMEvent e) &lt;br /&gt;in c:\documents and settings\tc\bureau\st gallen\visual studio&lt;br /&gt; projects\testmuster\formcode.cs:line 50&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnAfterChange(DataDOMEvent pDataDOMEvent)&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How can I proceed to copy my value with my formating (bold, strike, color, etc (no table ,no image))?&lt;br /&gt;&lt;br /&gt;Thanks in advance &lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;&lt;br /&gt;Every moment hesitated is a moment gone for life!!! Think about it</description></item></channel></rss>