Share via


_XDocument2.ImportDOM method

Imports the specified XML data into the current form.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
Sub ImportDOM ( _
    pxDoc As IXMLDOMDocument _
)
'Usage
Dim instance As _XDocument2
Dim pxDoc As IXMLDOMDocument

instance.ImportDOM(pxDoc)
void ImportDOM(
    IXMLDOMDocument pxDoc
)

Parameters

Remarks

Using the object model to import a form programmatically is equivalent to performing a merge operation in the user interface..

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Examples

In the following example, the ImportDOM method of the XDocument object is used to import a form from the OnMergeRequest event:

[InfoPathEventHandler(EventType=InfoPathEventType.OnMergeRequest)]
public void OnMergeRequest(MergeEvent e)
{ 
 thisXDocument.ImportDOM(e.DOM);
 e.ReturnStatus = true;
}

See also

Reference

_XDocument2 interface

_XDocument2 members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace