Поделиться через


_XDocument3.DOM Свойство

Определение

Возвращает ссылку на базовый XML-документ формы в форме модели объектов XML-документов (DOM).

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

Значение свойства

Реализации

DOM

Примеры

// 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.<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 user
employeesDA.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 DOM
string 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 user
employeesDA.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.

Важно! Доступ к этому члену можно получить только с помощью форм, работающих в том же домене, что и открытая форма, или с помощью форм, которым предоставлены междоменные разрешения.

Применяется к