XMLFileAdapter Object

Microsoft Office InfoPath

Show All Show All

XMLFileAdapter Object

XMLFileAdapter

Represents a connection to an XML file. The XMLFileAdapter object is a type of Microsoft Office InfoPath 2003 data adapter that contains all the information necessary for retrieving and submitting data to an external data source.

Remarks

The XMLFileAdapter object provides the FileURL property, which can be used get or set the Uniform Resource Locator (URL) of the XML file that is being used an external data source.

Using the XMLFileAdapter object

For secondary data sources, the XMLFileAdapter object is accessible through the QueryAdapter property of the DataObject object, and DataObject objects are accessible through the DataObjects property of the XDocument object.

In the following example, a reference to the XMLFileAdapter object is set by using the QueryAdapter property of the DataObject object by passing the name of the DataObject object to the Item property of the DataObjects collection:

    var objXMLFileAdapter;

objXMLFileAdapter = XDocument.DataObjects("GetXMLCityList").QueryAdapter;
  

For more information about using the XMLFileAdapter object, see Accessing external data sources.