System.ServiceModel 4.0.0.0 System.ServiceModel.Dispatcher.MessageFilter System.Xml.Serialization.IXmlSerializable System.Xml.Serialization.XmlRoot("XPathMessageFilter", Namespace="http://schemas.microsoft.com/serviceModel/2004/05/xpathfilter") System.Xml.Serialization.XmlSchemaProvider("StaticGetSchema")

An 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 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. crdefault XML Path Language (XPath) Version 1.0, section 3.5.

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

- Constructor
  4.0.0.0

  Initializes a new instance of the class with an empty XPath expression. An empty XPath expression always matches a well-formed XML document, so all objects satisfy the criteria of a filter defined by an empty XPath expression.

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

- Constructor
  4.0.0.0

  Use this constructor when there are no namespaces to manage.

  This constructor initializes the assigned to the property by using the default , so the XPath expression has access to the function library that the defines.

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

  A that contains an XPath 1.0 expression.
- Constructor
  4.0.0.0

  It is assumed that the reader is positioned at the start element of the serialized XPathMessageFilter. The name of the element is not validated before reading. When this method returns, the reader is positioned immediately after the serialized XPathMessageFilter. The constructor also automatically initializes the namespace manager by resolving all prefixes in the XPath expression as they were bound in the reader.

  This method can access any XML that can be created by the method.

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

  The to read the streamed XPath expression.
- Constructor
  4.0.0.0

  Use this constructor when XPath uses prefixes not defined in , or when you want to use your own . An instance of can be created and passed to this method.

  If the instances provided to this method are implementations, it is equivalent to calling the constructor.

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

  An XPath 1.0 expression.
  An that resolves any namespace prefixes in .
- Constructor
  4.0.0.0
  To be added.
  To be added.

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

  The XPath 1.0 expression for the filter.
- Constructor
  4.0.0.0

  Use this constructor when you want to use your own and to define the filter.

  It is assumed that the reader is positioned at the start element of the serialized XPathMessageFilter. The name of the element is not validated before reading. When this method returns, the reader is positioned immediately after the serialized XPathMessageFilter.

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

  The to read the streamed XPath expression.
  An that resolves any namespace prefixes in the XPath expression from . This can also be an that defines custom functions or variables.
- Constructor
  4.0.0.0
  To be added.

  Use this constructor when you want to use your own and to define the filter.

  It is assumed that the reader is positioned at the start element of the serialized XPathMessageFilter. The name of the element is not validated before reading. When this method returns, the reader is positioned immediately after the serialized XPathMessageFilter.

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

  The to read the streamed XPath expression.
- Method
  4.0.0.0
  System.ServiceModel.Dispatcher.IMessageFilterTable<FilterData>

  This method is called by . Users should create a filter table by calling a constructor for the filter table. This implementation returns an instance of .

  Creates an that has a specified type of data associated with it.

  An object to which filters associated with can be added.

  Data associated with the filters in the table.
- Method
  4.0.0.0
  System.Boolean ``

  Use the method to match elements from the body. An exception is thrown by this method if the engine attempts to access the message body in order to evaluate the XPath expression. This helps to ensure that the filter engine does not access the body stream.

  Tests whether a specified message satisfies the criteria of the XPath filter. This form is not allowed to access the body of the message.

  true if the satisfies the filter criteria; otherwise, false.

  The to test.
- Method
  4.0.0.0
  System.Boolean ``

  Use this overload of the method when a is available. This form is allowed to examine the body of the message.

  Determines whether a buffered message satisfies the query criteria of the XPath filter.

  true if the satisfies the filter criteria; otherwise false.

  The to test.
- Method
  4.0.0.0
  System.Boolean ``

  The class extends the class with methods that run queries more efficiently.

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

  true if the data from the satisfies the filter criteria; otherwise, false.

  The that provides data to test.
- Method
  4.0.0.0
  System.Boolean `` To be added.

  Evaluates the filter over the specified XPath navigator.

  true if the data from the satisfies the filter criteria; false otherwise.

  The that provides data to test.
- Property
  4.0.0.0
  System.Xml.XmlNamespaceManager To be added.

  The property can also be an that defines custom function or variables.

  Do not modify the namespace manager instance once the filter is created.

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

- Property
  4.0.0.0
  System.Int32 To be added.

  Some filters can be extremely expensive to evaluate or are very long running. Because filters operate on XML documents, the best way to set computational limits is to specify the maximum number of nodes that should be looked at during a filter evaluation.

  The quota is initially set to .

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

- Method
  4.0.0.0
  System.Xml.Schema.XmlSchema To be added.

  Gets the schema for the current XML document.

  The that represents the current document.

- Method
  4.0.0.0
  System.Void `` To be added.

  Reads the current XML node.

  The used to read the XML document.
- Method
  4.0.0.0
  System.Void `` To be added.

  Writes a node using .

  The used to write the node.
- Method
  4.0.0.0
  System.Void `` ``

  The namespace manager instance can be an that is used to resolve functions and variables.

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

  The used to deserialize the XPath filter. The used to manage the namespaces being read from.
- Method
  4.0.0.0
  System.Xml.Schema.XmlSchemaType `` To be added.

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

  The used to serialize the XPath filter.

  The that contains the cache of XML Schema definition language (XSD) schemas.
- Method
  4.0.0.0
  System.Xml.Schema.XmlSchema To be added.

  An explicit interface implementation that gets the current schema.

  The that represents the current document.

- Method
  4.0.0.0
  System.Void `` To be added.

  An explicit interface implementation that reads the current XML node.

  The used to read the XML document.
- Method
  4.0.0.0
  System.Void `` To be added.

  An explicit interface implementation that writes an XML node using .

  The used to write the node.
- Method
  4.0.0.0
  System.Void

  This operation is similar to the resizing of an array so that it has no unused elements.

  Compacts the XPath filter, which releases all unused memory.

- Method
  4.0.0.0
  System.Void `` ``

  The must be in the Start state. Otherwise an exception is thrown.

  Serializes the XPath filter to an .

  The used to serialize the XPath filter. The used to resolve any namespace conflict for the XPath filter.
- Method
  4.0.0.0
  System.Void `` `` `` `` ``

  The must be in the Start state. Otherwise an exception is thrown.

  Writes the XML XPath element with a specified XML writer.

  The used to write the . The namespace prefix of the XPath XML element. The local name of the XPath XML element. The namespace URI to associate with the XML element. true if namespaces should be serialized out separately as attributes; otherwise, false.
- Property
  4.0.0.0
  System.String To be added. To be added.

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