次の方法で共有


_XDocument3.DOM プロパティ

XML ドキュメント オブジェクト モデル (DOM) 形式でフォームの基になる XML ドキュメントへの参照を取得します。

名前空間: Microsoft.Office.Interop.InfoPath
アセンブリ: Microsoft.Office.Interop.InfoPath (microsoft.office.interop.infopath.dll 内)

構文

'宣言
<DispIdAttribute(8)> _
ReadOnly Property DOM As IXMLDOMDocument
'使用
Dim instance As _XDocument3
Dim value As IXMLDOMDocument

value = instance.DOM
[DispIdAttribute(8)] 
IXMLDOMDocument DOM { get; }

プロパティ値

XML ドキュメント オブジェクト モデル (DOM) 形式でフォームの基になる XML ドキュメントへの参照。

コメント

XDocument オブジェクトの主要なプロパティである DOM プロパティを使用すると、フォームのソース XML へのアクセスおよび操作をプログラムで行うことができます。フォームのソース XML データを格納する XML DOM への参照を設定した後は、その XML 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.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();

関連項目

参照

_XDocument3 インターフェイス
_XDocument3 のメンバ
Microsoft.Office.Interop.InfoPath 名前空間