<?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: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/32225.aspx</link><pubDate>Fri, 12 Sep 2008 19:42:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32225</guid><dc:creator>BuildPro Guru</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32225.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=32225</wfw:commentRss><description>&lt;p&gt;Hello Greg.&amp;nbsp; I am desparately searching to find a way to pass values from form A to form B (form B is created&amp;nbsp;via rules on a button on form A).&amp;nbsp; I have read just about every post here (and elsewhere) and I just can&amp;#39;t get it working.&amp;nbsp; You have a link in this post to some sample forms that you created, but the link does not work.&amp;nbsp; Would you happen to still have those forms somewhere or could you provide other assistance?&lt;/p&gt;
&lt;p&gt;I am not entirely new to IP, but I can only plagiarize and tweak code to get it to work (my coding language is google ++) so please be liberal with the explainations.&amp;nbsp; I am on an XP Pro box with IP07.&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4099.aspx</link><pubDate>Tue, 13 Mar 2007 18:07:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4099</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4099.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4099</wfw:commentRss><description>Thanks for your kind words!</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4098.aspx</link><pubDate>Tue, 13 Mar 2007 12:34:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4098</guid><dc:creator>Smeets</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4098.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4098</wfw:commentRss><description>Hello Greg,&lt;br /&gt;&lt;br /&gt;thanks a lot.&lt;br /&gt;That&amp;#39;s no problem that it took a little longer.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m interessted in this Programm and also SharePoint.&lt;br /&gt;The forms are built in a SharePoint portal. &lt;br /&gt;If one has still no notion of it, this forum is particularly for InfoPath very useful and helpful. &lt;br /&gt;&lt;br /&gt;Thanks again.</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4097.aspx</link><pubDate>Mon, 12 Mar 2007 16:10:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4097</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4097.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4097</wfw:commentRss><description>Matthias,&lt;br /&gt;&lt;br /&gt;I am glad to have been able to help you. Working across forms can be very frustrating if you&amp;#39;ve never done it before -- and even when you have done it before. I&amp;#39;m sorry it took us so long to get it working for you, but I&amp;#39;m glad that you have it working now!&lt;br /&gt;&lt;br /&gt;Keep up the good work--it gets easier the more you work with it!</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4096.aspx</link><pubDate>Mon, 12 Mar 2007 11:34:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4096</guid><dc:creator>Smeets</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4096.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4096</wfw:commentRss><description>Hello &lt;br /&gt;&lt;br /&gt;thank you for the example forms. This helped me very much. &lt;br /&gt;It has in principle everything been correct, only with the namspaces I had instead of one &amp;quot;:&amp;quot;, a &amp;quot;-&amp;quot; set, therefore the form did not open any longer. &lt;br /&gt;&lt;br /&gt;Now everything works perfectly. &lt;br /&gt;I imagined already that it can be only one little thing. &lt;br /&gt;&lt;br /&gt;I find it great, how much time you invested for me. &lt;br /&gt;Now I can successfully lock my project. &lt;br /&gt;&lt;br /&gt;Thank you for your support. I become you further-recommend. &lt;br /&gt;&lt;br /&gt;Greeting Matthias</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4095.aspx</link><pubDate>Fri, 09 Mar 2007 17:50:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4095</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4095.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4095</wfw:commentRss><description>You will not need to set XDocument.DOM.setProperty(&amp;quot;...&amp;quot;) because this is done at the top of the script file. It only needs to be done one time.&lt;br /&gt;&lt;br /&gt;I have created a simple 2 Form sample that you can &lt;a href="https://www.infopathdev.com:443/downloads/2forms.zip" target="_blank" title="/downloads/2forms.zip"&gt;download here&lt;/a&gt;. It has Form A and Form B. Form A has a text box and a button. Type anything into the text box and click the button to open Form B and populate the text box in Form B with the value you typed into the text box in Form A.&lt;br /&gt;&lt;br /&gt;When you get the .zip file, extract both .xsn files to C:\ because this is where they are expected to be.&lt;br /&gt;&lt;br /&gt;Let me know if this helps.</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4094.aspx</link><pubDate>Fri, 09 Mar 2007 09:32:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4094</guid><dc:creator>Smeets</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4094.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4094</wfw:commentRss><description>Thanks. &lt;br /&gt;&lt;br /&gt;Opening Fomrular B works perfectly. &lt;br /&gt;&lt;br /&gt;However the onclick event not as planned. &lt;br /&gt;The form leaves itself to open, but as soon as I merge the following two lines, in the preview I get the error: &amp;quot;the selected form cannot be opened by InfoPath&amp;quot; &lt;br /&gt;&lt;br /&gt;var sFormAFieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:meineFelder/my:id_form&amp;quot;).text; &lt;br /&gt;xdFormB.DOM.selectSingleNode(&amp;quot;/my:meineFelder/my:id_form).text = sFormAFieldValue; &lt;br /&gt;&lt;br /&gt;I think because of the XDocument. &lt;br /&gt;First I have the namespace xdFormB.DOM.setProperty(&amp;quot;...&amp;quot;) integratet, how you had meant it. &lt;br /&gt;Then I have additionally still inserted the namespace XDocument.DOM.setProperty(&amp;quot;...&amp;quot;), but the error emerged again. &lt;br /&gt;What could it still be that it does not recognize these two code lines, and how I know to take the value (in the meantime no more bezeichnungderveranstaltung) from the text field id_form from form A and insert it into the text field id_form (no more schulung) in form B? &lt;br /&gt;&lt;br /&gt;I think we stand briefly before the solution of the problem. &lt;br /&gt;I find it also great that you support me so intensively.</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4093.aspx</link><pubDate>Thu, 08 Mar 2007 17:22:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4093</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4093.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4093</wfw:commentRss><description>Hi. Hopefully we&amp;#39;re coming to a final solution for you...&lt;br /&gt;&lt;br /&gt;First thing is you cannot place a function (openFormB) inside another function (CTRL242_6::OnClick)... that will have to be moved outside the other function...&lt;br /&gt;&lt;br /&gt;Also, I&amp;#39;m not sure that in your case you need to use NewFromSolution**WITHDATA***... you probably only need NewFromSolution(). Please refer to the InfoPath internal help or the MSDN web site for help with these functions.&lt;br /&gt;&lt;br /&gt;Please note that I haven&amp;#39;t tested any of the changes I&amp;#39;m making to the code you provided above... I&amp;#39;m just making changes here inline...&lt;br /&gt;&lt;br /&gt;function CTRL242_6::OnClick(eventObj) //button-onclick-event&lt;br /&gt;{&lt;br /&gt;var xdFormB = openFormB();&lt;br /&gt;&lt;br /&gt;// Set namespaces here.&lt;br /&gt;xdFormB.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;... xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot; xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-02-14T14:04:34&amp;quot; xmlns:xd=&amp;quot;http://schemas.microsoft.com/office/infopath/2003&amp;quot;&amp;#39;);&lt;br /&gt;&lt;br /&gt;var sFormAFieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:meineFelder/my:id_form&amp;quot;).text;&lt;br /&gt;xdFormB.DOM.selectSingleNode(&amp;quot;/my:meineFelder/my:id_form).text = sFormAFieldValue;&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;function openFormB() //your MY_CODE_THAT_OPENS_FORM_B()-function&lt;br /&gt;{&lt;br /&gt;var sSharePointTemplate = &amp;quot;http://sharepoint.company.com/name/Forms/template.xsn&amp;quot;;&lt;br /&gt;var oXDoc = Application.XDocuments.NewFromSolution(sSharePointTemplate);&lt;br /&gt;return oXDoc;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Maybe this will help.</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4092.aspx</link><pubDate>Thu, 08 Mar 2007 08:25:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4092</guid><dc:creator>Smeets</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4092.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4092</wfw:commentRss><description>Thanks for this Information.&lt;br /&gt;It could be also because of my English, which I had sometimes misleadingly expressed myself.&lt;br /&gt;It soundsto very simple to do your tip, but my prgamming knowledge ist not very good, anyhow in JScript.&lt;br /&gt;&lt;br /&gt;If I understood you correctly, I have to implement your example in form A, where I open form B with die MY_CODE_THAT_OPENS_FORM_B()-Function.&lt;br /&gt;In every other forms I use rules to open forms, to close forms and fill the fields in this forms.&lt;br /&gt;&lt;br /&gt;I searched in books and the internet if there is a help how to open a new form with an button-click. But haven&amp;#39;t found realy good informations.&lt;br /&gt;For example I looked at the following page:&lt;br /&gt;http://www.infopathdev.com/howto/bugs/default.aspx?i=9fc31c95201f44a1938ba8d9cf47d5e5&lt;br /&gt;But I don&amp;#39;t know how to use this code.&lt;br /&gt;&lt;br /&gt;Form B is saved as template.xsn on a server. (like http://sharepoint.company.com/name/Forms/template.xsn)&lt;br /&gt;I don&amp;#39;t know to combine this code-lines. I have no fixed *.xml-file an the form whitch should be opened should not be in a &amp;quot;xdCanOpenInReadOnlyMode&amp;quot;.&lt;br /&gt;&lt;br /&gt;The Code that I have know is the following:&lt;br /&gt;function CTRL242_6::OnClick(eventObj) //button-onclick-event&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;function openFormB() //your MY_CODE_THAT_OPENS_FORM_B()-function&lt;br /&gt;{&lt;br /&gt;var sSharePointTemplate = &amp;quot;http://sharepoint.company.com/name/Forms/template.xsn&amp;quot;;&lt;br /&gt;var oXDoc = Application.XDocuments.NewFromSolutionWithData(XDocument.DOM.documentElement, sSharePointTemplate, 1);&lt;br /&gt;thisApplication.XDocuments.Open(sForm, (int)XdDocumentVersionMode.xdCanOpenInReadOnlyMode);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var xdFormB = openFormB();&lt;br /&gt;// Set namespaces here.&lt;br /&gt;XDocument.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;...  xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot; xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-02-14T14:04:34&amp;quot; xmlns:xd=&amp;quot;http://schemas.microsoft.com/office/infopath/2003&amp;quot;&amp;#39;);&lt;br /&gt;&lt;br /&gt;var sFormAFieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:meineFelder/my:id_form&amp;quot;).text;&lt;br /&gt;xdFormB.DOM.selectSingleNode(&amp;quot;/my:meineFelder/my:id_form).text = sFormAFieldValue;&lt;br /&gt;} &lt;br /&gt;Sorry, about the german words (like meineFelder), but I use the german IP-version.&lt;br /&gt;&lt;br /&gt;I cannot test the code at the moment, since I do not point, like I can/should open form B.&lt;br /&gt;&lt;br /&gt;I hope you can help me to finish this.&lt;br /&gt;For now thanks a lot for your time, that you spend at my problem.&lt;br /&gt;&lt;br /&gt;Greetings&lt;br /&gt;Matthias</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4091.aspx</link><pubDate>Wed, 07 Mar 2007 18:24:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4091</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4091.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4091</wfw:commentRss><description>I just ran some tests and it looks like I gave some misleading information earlier. XDocuments(0) is NOT always the current document, but rather the first document open. In your case though, since Form A was open first, that would indeed be XDocuments(0). However, for Form B, you don&amp;#39;t want to use XDocuments(1) as this will point you back to Form B.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So Form A is already open. This is XDocuments(0).&lt;br /&gt;Button on Form A opens Form B. Form A is still XDocuments(0) in BOTH forms, and Form B is XDocuments(1) in BOTH forms.&lt;br /&gt;&lt;br /&gt;Sorry for the misinformation. Maybe this will help. Remember though, Form B *CANNOT* use the OnLoad function to get the value of Form A.&lt;br /&gt;&lt;br /&gt;Another option, since you said that Form B is opened by clicking a button on Form A, if you are using code (and not rules) to open Form B, then that function has a return value which is the XDocument to Form B. You can use this XDocument return value to set the field value in Form B. For example:&lt;br /&gt;&lt;br /&gt;var xdFormB = MY_CODE_THAT_OPENS_FORM_B();&lt;br /&gt;// Set namespaces here.&lt;br /&gt;var sFormAFieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:FormAField&amp;quot;).text;&lt;br /&gt;xdFormB.DOM.selectSingleNode(&amp;quot;/my:myFields/my:FormBField).text = sFormAFieldValue;</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4090.aspx</link><pubDate>Tue, 06 Mar 2007 20:01:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4090</guid><dc:creator>Smeets</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4090.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4090</wfw:commentRss><description>The Code is not in the OnLoad-Function, because I have commentated the OnLoad-Function.&lt;br /&gt;&lt;br /&gt;Whit the button I save form A and with an other butten I open a new Form. In this case form B. Everything functions without any code because I use rules in the forms.&lt;br /&gt;So die only code I need is in Form B the onload-function to get the value of form A.</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4089.aspx</link><pubDate>Tue, 06 Mar 2007 19:45:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4089</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4089.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4089</wfw:commentRss><description>Sorry, I have to ask this... but did you make sure that the code is NOT in the onload event handler? The new XDocument is not added to the XDocuments collection until after onload has finished. Since you are only getting 1 for the count, InfoPath has not recognized the second form being open yet. That is why the XDocuments(1) fails. The count should be 2.</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4088.aspx</link><pubDate>Tue, 06 Mar 2007 08:03:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4088</guid><dc:creator>Smeets</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4088.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4088</wfw:commentRss><description>I implemented the code with the alert box.&lt;br /&gt;&lt;br /&gt;I open form A, put in my values, go by button-click to form B (where your code is implemented) an form A is already open, I get in the first alert box the &amp;quot;1&amp;quot; as output.&lt;br /&gt;In the secound alert box I get the infos of the xml-file:&lt;br /&gt;e.g. &amp;amp;lt;my:bezeichnungderverantsaltung&amp;amp;gt;SchulungTest 5&amp;amp;lt;/my:bezeichnungderveranstaltung&amp;amp;gt;&lt;br /&gt;an all the other fields which I put an value into will be shown in this alert box.&lt;br /&gt;&lt;br /&gt;After that I get an error in the secound part of your code:&lt;br /&gt;x = Application.XDocuments(1).DOM;&lt;br /&gt;&amp;amp;gt;&amp;amp;gt; index value lies outside of the valid range</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4087.aspx</link><pubDate>Mon, 05 Mar 2007 17:49:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4087</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4087.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4087</wfw:commentRss><description>Sorry - I had told you earlier in this thread that you can use this in OnLoad, but I&amp;#39;ve just verified that it does not work in OnLoad... it has to be done elsewhere--which might take some figuring out on your part as to where it should occur (if you were trying to do it in OnLoad). An OnClick event is just fine, or perhaps an OnAfterChange event.</description></item><item><title>Re: Delivery of value between form A to form B</title><link>https://www.infopathdev.com:443/forums/thread/4086.aspx</link><pubDate>Mon, 05 Mar 2007 17:46:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4086</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4086.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4086</wfw:commentRss><description>Yes, OM stands for Object Model. If you were able to successfully save your form to work with IP03, open it in IP03 and still run it, then yes, you were using the IP03 OM.&lt;br /&gt;&lt;br /&gt;As I look back in the thread, I noticed that I should have seen that you were using the IP03 OM, but you are using JScript and not C#. Sorry--my mistake. I should have seen that.&lt;br /&gt;&lt;br /&gt;So-- you are using InfoPath 2003, with JScript. This means that you Application.XDocuments is the right collection to be working with.&lt;br /&gt;&lt;br /&gt;What I want you to do is to add the following lines of code and report back what it provides in the alert box:&lt;br /&gt;&lt;br /&gt;&lt;font face="Lucida Console" size="2"&gt;XDocument.UI.Alert(Application.XDocuments.Count);&lt;br /&gt;&lt;br /&gt;var x = Application.XDocuments(0).DOM;&lt;br /&gt;XDocument.UI.Alert(x.xml);&lt;br /&gt;&lt;br /&gt;x = Application.XDocuments(1).DOM;&lt;br /&gt;XDocument.UI.Alert(x.xml);&lt;/font&gt;&lt;br /&gt;NOTE: This code CANNOT be in the OnLoad event handler or it will not work correctly. The XDocument in not added to the collection until AFTER the onload has completed.</description></item></channel></rss>