Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
The CreateNavigator method allows you to programmatically access and manipulate the stored data of a data source represented by the DataSource object. You can use any of the properties and methods that are supported by the XPathNavigator class to work with the data source.
The CreateNavigator method replaces the DOM property of the DataObject object used in the Microsoft InfoPath 2003 object model.
This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser.
In the following example, an XPathNavigator object is created for the "CityList" data source using the CreateNavigator method, and then the XML of the data source is displayed in a message box.