Compartilhar via


_XDocument3.DOM Propriedade

Definição

Obtém uma referência ao documento XML subjacente de um formulário na forma de um DOM (Modelo de Objeto de Documento XML).

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

Valor da propriedade

Uma referência ao documento XML subjacente de um formulário na forma de um DOM (Modelo de Objeto de Documento XML).

Implementações

DOM

Exemplos

// 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
DataObject employeesDO=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
DataObject employeesDO=thisXDocument.DataObjects["Employees"];
employeesDO.Query();

Comentários

Uma propriedade chave do objeto XDocument , a propriedade DOM permite que você acesse e manipule programaticamente o XML de origem de um formulário. Depois de definir uma referência ao DOM XML, que contém os dados XML de origem de um formulário, você pode usar qualquer uma das propriedades e métodos compatíveis com o DOM XML.

Aplica-se a