Hi,
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.