XDocument reference in vbscript - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

XDocument reference in vbscript

Last post 11-03-2010 07:15 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-02-2010 01:27 PM

    XDocument reference in vbscript

    I am running Infopath 2007 in conjuction with Sharepoint 2007.  I have seen numerous references to XDocument and XDocument.DOM both here and on the net in various script samples and forums, how ever I find no reference for this in the object browser.  I am trying to follow code I found to copy a set of nodes from one data source to another.  Is there a special reference I need to add to my FormCode to be able to use this object?  It doesn't seem likely that it would only be relevent in an older version but I'm at a loss for why it isn't recognized in my project.


    Thank you!

  • 11-03-2010 02:30 AM In reply to

    Re: XDocument reference in vbscript


    I use C# and it works fine. I think it is the same way for VB.Net.

    Take careful, VB.Net is different of VBScript.... There is no way to use VBScript in InfoPath...


    In my memory XDocument.DOM is used in 2003 model object. The 2007 model object have changed. 

    For selected nodes, i work with XPathNavigator. And I use the following code:

    XPathNavigator nav = this.MainDataSource.CreateNavigator();

    XPathNavigator test = nav.SelectSingleNode("//my:test", NamespaceManager);

    This code is in C#. I think it is approximatively the same thing in VB.Net.

    Hope this help.

    RĂ©mi MATAYRON / MVP InfoPath
    Visit my blog : Infopath Blog
  • 11-03-2010 05:06 AM In reply to

    Re: XDocument reference in vbscript

     After doing a little digging, I found that XDocument is not used in Microsoft.Office.InfoPath in vb.  Just C#, and Jscript use it in that namespace. It is used in Microsoft.Office.Interop.InfoPath for vb however.   Thank you for the quick response!

  • 11-03-2010 07:15 AM In reply to

    Re: XDocument reference in vbscript

    XDocument and XDocument.DOM are used in VBScript and JScript.  In the 2003 objectmodel for VB.NET and C#, it would be thisXDocument and thisXDocument.DOM.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.