_XDocument4.DOM Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a reference to a form's underlying XML document in the form of an XML Document Object Model (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
Property Value
Returns IXMLDOMDocument.
Implements
Examples
// 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();
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.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기