Show All

# MatchExpression Property

A read-only property that returns a string value containing the XPath expression for the XML Document Object Model (DOM) node for which the event is currently being processed.

expression.MatchExpression

expression Required. Returns a reference to the DataDOMEvent object.

## Security Level

0: Can be accessed without restrictions.

## Remarks

The XPath expression that the MatchExpression property contains points to an XML DOM node in the form's underlying XML document. This is the node that is currently being validated by the data validation event handler.

## Example

In the following example, the MatchExpression property of the DataDOMEvent object is used to display the XPath expression of the XML DOM node that is currently being validated:

    XDocument.UI.Alert("Match expression: " + eventObj.MatchExpression);

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp