Share via


XMLFileAdapter Object

InfoPath Developer Reference

Represents a connection to an XML file.

Version Information
 Version Added:  InfoPath 2003

Remarks

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

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.

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.

For more information about using the XMLFileAdapter object, see Working with data in a form's secondary data sources.

Example

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:

JScript
  var objXMLFileAdapter;

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

See Also