<?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: Help with OnVersionUpgrade event - InfoPath 2003 / C#</title><link>https://www.infopathdev.com:443/forums/thread/49164.aspx</link><pubDate>Tue, 17 Nov 2009 20:30:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49164</guid><dc:creator>mstaples709</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49164.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=49164</wfw:commentRss><description>&lt;p&gt;Thanks, Jimmy.&amp;nbsp; This code works great for appending a child node to the selected parent node.&amp;nbsp; The problem I have now is trying to replace or remove a child node.&amp;nbsp; Basically, what I am doing is renaming an element&amp;nbsp;from &amp;quot;/ClientInfo/Title&amp;quot; to &amp;quot;/ClientInfo/ClientTitle&amp;quot;.&amp;nbsp; I have tried the replaceChild method, along with a combination of appendChild and removeChild, with no luck.&amp;nbsp;&amp;nbsp;The schema has changed, such that the new version contains the renamed &amp;quot;ClientTitle&amp;quot; element, while the previous version contains the old &amp;quot;Title&amp;quot; element.&amp;nbsp; Any existing forms based on the old schema fail to open due to the validation error with the new schema.&amp;nbsp; I thought that this was the whole point of the OnVersionUpgrade event...i.e. prior to schema validation, update the old form schema to use the new one and make&amp;nbsp;the necessary&amp;nbsp;changes to the form XML so that it is schema valid.&amp;nbsp; I have tested that the &amp;quot;Title&amp;quot; tag does exist in the old form, but when I try to use replaceChild, I get an error (&amp;quot;insert position node must be a child of the node to insert under&amp;quot;).&amp;nbsp; I have verified the XPath via an alert and it is correct.&amp;nbsp; Here is a sample of the code:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (thisXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/ClientInfo/Title&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;) != &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;thisXDocument.UI.Alert(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;Found It&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;br /&gt;&lt;font color="#008080"&gt;IXMLDOMNode&lt;/font&gt;&lt;font size="2"&gt; oldTitleNode = thisXDocument.DOM.createElement(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;Title&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;br /&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;IXMLDOMNode&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; clientTitleNode = thisXDocument.DOM.createElement(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;ClientTitle&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;thisXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/ClientInfo&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).replaceChild(clientTitleNode, oldTitleNode);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;}&lt;/p&gt;
&lt;p&gt;Any suggestions would be more than welcome.&amp;nbsp; Thanks!&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Help with OnVersionUpgrade event - InfoPath 2003 / C#</title><link>https://www.infopathdev.com:443/forums/thread/49145.aspx</link><pubDate>Tue, 17 Nov 2009 12:21:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49145</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49145.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=49145</wfw:commentRss><description>&lt;p&gt;This should be the equivalent of the JScript code you posted.&amp;nbsp; Only a few differences here and there:&lt;/p&gt;&lt;blockquote&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; if (thisXDocument.DOM.selectSingleNode(&amp;quot;/Customers/CustomerInfo/EmailAddress&amp;quot;) == null)&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create the new element.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IXMLDOMNode objItemNode = thisXDocument.DOM.createElement(&amp;quot;EmailAddress&amp;quot;);&lt;br /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add the new &amp;lt;item&amp;gt; element to the XML document as a&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // child of the &amp;lt;order&amp;gt; element.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.DOM.selectSingleNode(&amp;quot;/Customers/CustomerInfo&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .appendChild(objItemNode);&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.ReturnStatus = true;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.UI.Alert(&amp;quot;There was an error inserting the &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;&amp;lt;EmailAddress&amp;gt; node.\nDescription: &amp;quot; + ex.Message);&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.ReturnStatus = false;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&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; } &lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Help with OnVersionUpgrade event - InfoPath 2003 / C#</title><link>https://www.infopathdev.com:443/forums/thread/49132.aspx</link><pubDate>Tue, 17 Nov 2009 02:38:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49132</guid><dc:creator>mstaples709</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49132.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=49132</wfw:commentRss><description>&lt;p&gt;Thanks, Jimmy.&amp;nbsp; This should work fine in InfoPath 2007 and I will let you know, once I have tested it.&amp;nbsp; Would you happen know what the equivalent C# code would be, using the InfoPath 2003 object model (i.e. thisXDocument)?&amp;nbsp; I am having some difficulty figuring this out.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Help with OnVersionUpgrade event - InfoPath 2003 / C#</title><link>https://www.infopathdev.com:443/forums/thread/49131.aspx</link><pubDate>Tue, 17 Nov 2009 02:18:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49131</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49131.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=49131</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;The equivalent C# code for that VB.NET code should be the following:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;XPathNavigator xMain = MainDataSource.CreateNavigator();&lt;br /&gt;XPathNavigator clientTitlePath;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;clientTitlePath = xMain.SelectSingleNode(&amp;quot;/FormData/ClientInfo/ClientTitle&amp;quot;, NamespaceManager);&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;if(clientTitlePath == null)&lt;br /&gt;{&lt;br /&gt;     xMain.SelectSingleNode(&amp;quot;/FormData/ClientInfo&amp;quot;, NamespaceManager).AppendChild(&amp;quot;&amp;lt;ClientTitle/&amp;gt;&amp;quot;);&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre&gt;That should succeed in creating a new ClientTitle node (assuming that a node actually exists at the path /FormData/ClientInfo), but it will not move the data from underneath Title to the new ClientTitle node.&lt;br /&gt;&lt;/pre&gt;</description></item><item><title>Re: Help with OnVersionUpgrade event - InfoPath 2003 / C#</title><link>https://www.infopathdev.com:443/forums/thread/49130.aspx</link><pubDate>Tue, 17 Nov 2009 01:53:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49130</guid><dc:creator>mstaples709</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49130.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=49130</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Sure thing...samples in JScript and VB.NET included below.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;JScript &lt;/b&gt;(taken from http://msdn.microsoft.com/en-us/library/aa662354%28office.11%29.aspx):&lt;/p&gt;&lt;pre&gt;&lt;code&gt;function XDocument::&lt;b class="bterm"&gt;OnVersionUpgrade&lt;/b&gt;(eventObj)&lt;br /&gt;{&lt;br /&gt;   if (!XDocument.DOM.selectSingleNode(&amp;quot;/Customers/CustomerInfo/EmailAddress&amp;quot;))&lt;br /&gt;   {&lt;br /&gt;      try&lt;br /&gt;      {&lt;br /&gt;         // Create the new element.&lt;br /&gt;         var objItemNode = XDocument.DOM.selectSingleNode(&amp;quot;/Customers/CustomerInfo&amp;quot;)&lt;br /&gt;            .ownerDocument.createElement(&amp;quot;EmailAddress&amp;quot;);&lt;br /&gt;&lt;br /&gt;         // Add the new &amp;lt;item&amp;gt; element to the XML document as a&lt;br /&gt;         // child of the &amp;lt;order&amp;gt; element.&lt;br /&gt;         XDocument.DOM.selectSingleNode(&amp;quot;/Customers/CustomerInfo&amp;quot;)&lt;br /&gt;            .appendChild(objItemNode);&lt;br /&gt;         eventObj.ReturnStatus=true;&lt;br /&gt;      }&lt;br /&gt;      catch(ex)&lt;br /&gt;      {&lt;br /&gt;         XDocument.UI.Alert(&amp;quot;There was an error inserting the &amp;quot; +&lt;br /&gt;            &amp;quot;&amp;lt;EmailAddress&amp;gt; node.\nDescription: &amp;quot; + ex.description);&lt;br /&gt;         eventObj.ReturnStatus=false;&lt;br /&gt;      }&lt;br /&gt;   }&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;VB.NET (InfoPath 2007):&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;Public Sub FormEvents_VersionUpgrade(ByVal sender As Object, ByVal e As VersionUpgradeEventArgs)&lt;/pre&gt;&lt;pre&gt;Dim xMain As XPathNavigator = MainDataSource.CreateNavigator()&lt;br /&gt;Dim clientTitlePath As XPathNavigator&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;clientTitlePath = xMain.SelectSingleNode(&amp;quot;/FormData/ClientInfo/ClientTitle&amp;quot;, NamespaceManager)&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;If clientTitlePath Is DBNull.Value Or clientTitlePath Is Nothing Then&lt;br /&gt;     xMain.SelectSingleNode(&amp;quot;/FormData/ClientInfo&amp;quot;, NamespaceManager).AppendChild(&amp;quot;&amp;lt;ClientTitle/&amp;gt;&amp;quot;)&lt;br /&gt;End If &lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;End Sub&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;</description></item><item><title>Re: Help with OnVersionUpgrade event - InfoPath 2003 / C#</title><link>https://www.infopathdev.com:443/forums/thread/49129.aspx</link><pubDate>Tue, 17 Nov 2009 01:14:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49129</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49129.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=49129</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Would you mind letting us in on the working code samples you&amp;#39;ve found?&amp;nbsp; Maybe someone here would be able to adapt it to C#.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Help with OnVersionUpgrade event - InfoPath 2003 / C#</title><link>https://www.infopathdev.com:443/forums/thread/49128.aspx</link><pubDate>Tue, 17 Nov 2009 01:04:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49128</guid><dc:creator>mstaples709</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49128.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=49128</wfw:commentRss><description>&lt;p&gt;Hello all,&lt;/p&gt;&lt;p&gt;I have a client using an InfoPath 2003 managed code solution (C#).&amp;nbsp; Recently, we needed to make a change to the XML schema serving as the Main data source.&amp;nbsp; Specifically, we changed a single tag&amp;#39;s name from &amp;lt;Title/&amp;gt; to &amp;lt;ClientTitle/&amp;gt;.&amp;nbsp; This change needs to be pushed out to their Production environment (WSS 3), but I am concerned about existing forms failing to open, due to the inevitable XML schema validation error.&amp;nbsp; If it were only a few forms, I would just change them manually, then re-upload.&amp;nbsp; However, they have several hundred items in their list.&amp;nbsp; I would like to take advantage of the Form object&amp;#39;s OnVersionUpgrade event to replace the old tag with the new one.&amp;nbsp; I have seen this done quite easily in both InfoPath 2003 and 2007, using JScript or VB.NET.&amp;nbsp; I cannot seem to figure out how to do it in C#, though, since I am not very familiar with this language.&amp;nbsp; The JScript example given by Microsoft (and re-posted on this site a couple of times) does not seem to work in C#.&amp;nbsp; I have tried using the replaceChild() and appendChild() methods of IXMLDOMNode, but no luck so far.&lt;/p&gt;&lt;p&gt;Any suggestions would be greatly appreciated.&amp;nbsp; Is it just me, or is there not much managed code support for C#?&amp;nbsp; Seems like everyone is using JS or VB.NET... &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>