This documentation is archived and is not being maintained.

XPathMessageContext Class

Defines several XPath functions and namespace mappings commonly used when evaluating XPath expressions against SOAP documents.


Namespace:  System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public class XPathMessageContext : XsltContext

The XPathMessageContext type exposes the following members.

Public methodXPathMessageContext()Creates an instance of XPathMessageContext.
Public methodXPathMessageContext(NameTable)Initializes a new instance of the XPathMessageContext class with the specified NameTable.

Public propertyDefaultNamespaceGets the namespace URI for the default namespace. (Inherited from XmlNamespaceManager.)
Public propertyNameTableGets the XmlNameTable associated with this object. (Inherited from XmlNamespaceManager.)
Public propertyWhitespaceGets a value that indicates whether to include white space nodes in the output. (Overrides XsltContext.Whitespace.)

Public methodAddNamespaceAdds the given namespace to the collection. (Inherited from XmlNamespaceManager.)
Public methodCompareDocumentCompares the base Uniform Resource Identifiers (URIs) of two documents based upon the order the documents were loaded by the XSLT processor. (Overrides XsltContext.CompareDocument(String, String).)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator to use to iterate through the namespaces in the XmlNamespaceManager. (Inherited from XmlNamespaceManager.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetNamespacesInScopeGets a collection of namespace names keyed by prefix which can be used to enumerate the namespaces currently in scope. (Inherited from XmlNamespaceManager.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodHasNamespaceGets a value indicating whether the supplied prefix has a namespace defined for the current pushed scope. (Inherited from XmlNamespaceManager.)
Public methodLookupNamespaceGets the namespace URI for the specified prefix. (Inherited from XmlNamespaceManager.)
Public methodLookupPrefixFinds the prefix declared for the given namespace URI. (Inherited from XmlNamespaceManager.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodPopScopePops a namespace scope off the stack. (Inherited from XmlNamespaceManager.)
Public methodPreserveWhitespaceEvaluates whether to preserve white space nodes or strip them for the given context. (Overrides XsltContext.PreserveWhitespace(XPathNavigator).)
Public methodPushScopePushes a namespace scope onto the stack. (Inherited from XmlNamespaceManager.)
Public methodRemoveNamespaceRemoves the given namespace for the given prefix. (Inherited from XmlNamespaceManager.)
Public methodResolveFunctionResolves a function reference and returns an T:System.Xml.Xsl.IXsltContextFunction that represents the function. (Overrides XsltContext.ResolveFunction(String, String, XPathResultType[]).)
Public methodResolveVariableResolves a variable reference and returns an IXsltContextVariable that represents the variable. (Overrides XsltContext.ResolveVariable(String, String).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

The XPath engine has full XPath context support and uses the .NET Framework's XsltContext class in the same way that XPathNavigator does to implement this support. XsltContext is an abstract class that allows developers to implement custom XPath function libraries and declare XPath variables. XsltContext is an XmlNamespaceManager and thus also contains the namespace prefix mappings.

The filter engine implements an XsltContext named XPathMessageContext. XPathMessageContext defines custom functions that can be used in XPath expressions and it declares several common namespace prefix mappings.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.