Share via


_XDocument3.DOM property

Gets a reference to a form's underlying XML document in the form of an XML Document Object Model (DOM).

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property DOM As IXMLDOMDocument
    Get
'Usage
Dim instance As _XDocument3
Dim value As IXMLDOMDocument

value = instance.DOM
IXMLDOMDocument DOM { get; }

Property value

Type: Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMDocument
A reference to a form's underlying XML document in the form of an XML Document Object Model (DOM).

Implements

_XDocument2.DOM

Remarks

A key property of the XDocument object, the DOM property allows you to programmatically access and manipulate the source XML of a form. After you have set a reference to the XML DOM, which contains the source XML data of a form, you can use any of the properties and methods that are supported by the XML DOM.

Examples

// retrieve the Employees Adapter from the DataAdapters collection
ADOAdapter employeesDA=(ADOAdapter)thisXDocument.DataAdapters["Employees"];
// get employee’s ID from the main DOM
string employeeID=thisXDocument.DOM.selectSingleNode("//my:field2").text;
// Change the ADOAdapter’s command to retrieve the record of the Employee’s ID entered
// by the user
employeesDA.Command="select * from Employees where EmployeeID="+employeeID;
// get DataObject from the DataObjects collection and call Query to refresh
// the data object
DataObject employeesDO=thisXDocument.DataObjects["Employees"];
employeesDO.Query();

See also

Reference

_XDocument3 interface

_XDocument3 members

DOM overload

Microsoft.Office.Interop.InfoPath namespace