Compartilhar via


XPathExpression.Compile Method (String, IXmlNamespaceResolver)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Compiles the specified XPath expression, with the IXmlNamespaceResolver object specified for namespace resolution, and returns an XPathExpression object that represents the XPath expression.

Namespace:  System.Xml.XPath
Assembly:  System.Xml.XPath (in System.Xml.XPath.dll)

Syntax

'Declaration
Public Shared Function Compile ( _
    xpath As String, _
    nsResolver As IXmlNamespaceResolver _
) As XPathExpression
public static XPathExpression Compile(
    string xpath,
    IXmlNamespaceResolver nsResolver
)

Parameters

Return Value

Type: System.Xml.XPath.XPathExpression
An XPathExpression object.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.