Hi
In the InfoPath 2007 managed object model, you can reference the XML for a
secondary data source from the form code-behind using the syntax:
XPathNavigator node = this.DataSources["MainDS"].CreateNavigator();
For the main data source, use:
XPathNavigator node = this.MainDataSource.CreateNavigator();
The XPathNavigator instance is initially positioned to the document-level
node in the data source XML.
And ‘dfs’ is namespace prefix.

Signature
Shiva
http://www.ggktech.com
> Hi Friends,
>
[quoted text clipped - 32 lines]
> Please help
> Thanks in advance
Dotnetdev - 20 Jul 2007 16:06 GMT
Hi,
i tried the following code: I'm i right. I got the same error.
XPathNavigator mainnav = this.MainDataSource.CreateNavigator();
XPathNavigator myname1 =
mainnav.SelectSingleNode(""dfs:myFields/dfs:dataFields/s0:GetUserCollectionFromSiteREsponse/s0:GEtUserCollectionFromSiteResult/s0:GetUserCollectionFromSite/s0:Users/s0:User", NamspaceManager);
XPathNavigator secds = this.DataSources["Users"].CreateNavigator();
XPathnavigator myname2 =
secds.SelectSingleNode("dfs:myFields/dfs:dataFields/s0:GetUserCollectionFromSiteREsponse/s0:GEtUserCollectionFromSiteResult/s0:GetUserCollectionFromSite);
myname1.InnerXML = myname2.InnerXML();
Still I'm getting the null reference error. It says in the last line of
code(myname1.InnerXML = myname2.InnerXML();) - object reference not set to an
instance of an object.
Please help
Thanks
> Hi
>
[quoted text clipped - 48 lines]
> > Please help
> > Thanks in advance