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.

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp