XPathMessageFilter Class

 

Represents a query on an XML document defined by an XPath 1.0 expression.

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

System.Object
  System.ServiceModel.Dispatcher.MessageFilter
    System.ServiceModel.Dispatcher.XPathMessageFilter

public class XPathMessageFilter : MessageFilter, IXmlSerializable

NameDescription
System_CAPS_pubmethodXPathMessageFilter()

Initializes a new instance of the XPathMessageFilter class that matches all well-formed XML documents.

System_CAPS_pubmethodXPathMessageFilter(String)

Initializes a new instance of the XPathMessageFilter class using an XPath expression to specify query criteria for the filter.

System_CAPS_pubmethodXPathMessageFilter(String, XmlNamespaceManager)

Initializes a new instance of the XPathMessageFilter class using the specified XPath expression and namespace manager.

System_CAPS_pubmethodXPathMessageFilter(String, XsltContext)

Initializes a new instance of the XPathMessageFilter class using a specified XPath expression and XsltContext.

System_CAPS_pubmethodXPathMessageFilter(XmlReader)

Initializes a new instance of the XPathMessageFilter class by reading a streamed XPath with the specified XML reader.

System_CAPS_pubmethodXPathMessageFilter(XmlReader, XmlNamespaceManager)

Initializes a new instance of the XPathMessageFilter class by reading in a streamed XPath with a specified XML reader and using the specified namespace manager.

System_CAPS_pubmethodXPathMessageFilter(XmlReader, XsltContext)

Initializes a new instance of the XPathMessageFilter class by reading a streamed XPath with a specified XML reader and using the XsltContext to resolve namespaces, custom functions, and variables.

NameDescription
System_CAPS_pubpropertyNamespaces

Gets the manager that resolves namespace prefixes in the XPath expression that defines the filter.

System_CAPS_pubpropertyNodeQuota

Gets or sets the maximum number of nodes that should be looked at during filter evaluation.

System_CAPS_pubpropertyXPath

Gets the XPath expression that defines the query criteria for the filter.

NameDescription
System_CAPS_protmethodCreateFilterTable<FilterData>()

Creates an XPathMessageFilterTable<TFilterData> that has a specified type of data associated with it.(Overrides MessageFilter.CreateFilterTable<FilterData>().)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodMatch(Message)

Tests whether a specified message satisfies the criteria of the XPath filter. This form is not allowed to access the body of the message.(Overrides MessageFilter.Match(Message).)

System_CAPS_pubmethodMatch(MessageBuffer)

Determines whether a buffered message satisfies the query criteria of the XPath filter.(Overrides MessageFilter.Match(MessageBuffer).)

System_CAPS_pubmethodMatch(SeekableXPathNavigator)

Determines whether the XML document provided by the specified optimized XPath navigator satisfies the query criteria of the XPath filter.

System_CAPS_pubmethodMatch(XPathNavigator)

Evaluates the filter over the specified XPath navigator.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnGetSchema()

Gets the schema for the current XML document.

System_CAPS_protmethodOnReadXml(XmlReader)

Reads the current XML node.

System_CAPS_protmethodOnWriteXml(XmlWriter)

Writes a node using writer.

System_CAPS_protmethodReadXPath(XmlReader, XmlNamespaceManager)

Initializes the current instance of the XPathMessageFilter with an XPath obtained from a specified XML reader using a specified namespace manager.

System_CAPS_pubmethodSystem_CAPS_staticStaticGetSchema(XmlSchemaSet)

Gets the type of XML schema used to serialize the XPath filter.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodTrimToSize()

Compacts the XPath filter, which releases all unused memory.

System_CAPS_protmethodWriteXPath(XmlWriter, IXmlNamespaceResolver)

Serializes the XPath filter to an XmlWriter.

System_CAPS_pubmethodWriteXPathTo(XmlWriter, String, String, String, Boolean)

Writes the XML XPath element with a specified XML writer.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIXmlSerializable.GetSchema()

An explicit interface implementation that gets the current schema.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIXmlSerializable.ReadXml(XmlReader)

An explicit interface implementation that reads the current XML node.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIXmlSerializable.WriteXml(XmlWriter)

An explicit interface implementation that writes an XML node using writer.

An XPathMessageFilter uses an XPath expression to determine whether an XML document contains specific elements, attributes, text, or other XML syntactic constructs. Typically, an application uses an XPathMessageFilter at an endpoint to query the contents of a SOAP message and then takes the appropriate action based on the results of that query. A queuing process, for example, may use an XPath query to check the priority element of a known header to decide whether to move a message to the front of the queue.

The XML Path Language (XPath) provides a language for addressing parts of an XML document. The primary syntactic construct in XPath is an expression that defines how to traverse the logical structure of an XML document and address or identify an XPath data type. Specifically, XPath implementations evaluate an expression against the structure of an XML document to yield one of the four basic XPath data types: strings, numbers, Booleans, and node sets. They also support functions that convert an XPath data type to a string, number, or Boolean data type. If a method expects one of these three data types, the result of the expression evaluation is implicitly converted. Note that these three data types cannot be converted to a node-set type. The XML Path language is fully described in the W3C XML Path Language 1.0 specification.

Numbers in XPath expressions are expressed as double-precision 64-bit values. Therefore XPath expressions that involve testing numbers with many significant digits can return incorrect results due to floating point precision issues. For more information, seeXML Path Language (XPath) Version 1.0, section 3.5.

.NET Framework
Available since 3.0

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

Return to top
Show: