Source Property (DocActionEvent Object)

Microsoft Office InfoPath

A read-only property that returns a reference to the inner-most XML Document Object Model (DOM) node of a form's underlying XML document.

expression.Source

expression    Required. Returns a reference to the DocActionEvent object.

Security Level

2: 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.

Remarks

After you have set a reference to the XML DOM node that the Source property returns, you can use any of the properties and methods that are supported by the XML DOM.

Note  To learn more about the XML DOM and all of the properties and methods that it supports, see the MSXML 5.0 SDK documentation in the Microsoft Script Editor (MSE) Help system.

Example

In the following example, the Source property of the DocActionEvent object is used to display the source XML data of the XML DOM node in a message box:

function DocActionEventSource::OnClick(eventObj)
{
   XDocument.UI.Alert("Source: " + eventObj.Source.xml);
}