_XDocument4.DOM 属性

定义

获取一个对表单的基础 XML 文档的引用,采用 XML 文档对象模型 (DOM) 形式。

public:
 property Microsoft::Office::Interop::InfoPath::Xml::IXMLDOMDocument ^ DOM { Microsoft::Office::Interop::InfoPath::Xml::IXMLDOMDocument ^ get(); };
public Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMDocument DOM { get; }
member this.DOM : Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMDocument
Public ReadOnly Property DOM As IXMLDOMDocument

属性值

返回 IXMLDOMDocument

实现

DOM

示例

// Retrieve the Employees Adapter from the DataAdapters collection.ADOAdapter employeesDA =   (ADOAdapter)thisXDocument.DataAdapters["Employees"];// Get employee’s ID from the main DOMstring employeeID =    thisXDocument.
<span class="label">DOM</span>
.selectSingleNode("//my:field2").text;// Change the ADOAdapter’s command to retrieve the record // of the Employee's ID entered by the useremployeesDA.Command =    "select * from Employees where EmployeeID="+employeeID;// Get DataObject from the DataObjects collection and // call Query to refresh the data object.DataSourceObject employeesDO =   (DataSourceObject)thisXDocument.DataObjects["Employees"];employeesDO.Query();
// Retrieve the Employees Adapter from the DataAdapters collection.ADOAdapter employeesDA =   (ADOAdapter)thisXDocument.DataAdapters["Employees"];// Get employee’s ID from the main DOMstring employeeID =    thisXDocument.
<span class="label">DOM</span>
.selectSingleNode("//my:field2").text;// Change the ADOAdapter’s command to retrieve the record // of the Employee's ID entered by the useremployeesDA.Command =    "select * from Employees where EmployeeID="+employeeID;// Get DataObject from the DataObjects collection and // call Query to refresh the data object.DataSourceObject employeesDO =   (DataSourceObject)thisXDocument.DataObjects["Employees"];employeesDO.Query();

注解

作为 XDocument 对象的关键属性,DOM 属性使您能够以编程的方式访问和操纵表单的源 XML。 设置了对 XML DOM(其中包含表单的源 XML 数据)的引用之后,可以使用 XML DOM 支持的任何属性和方法。

适用于