XPathMessageFilter.WriteXPathTo Method

Definition

Writes the XML XPath element with a specified XML writer.

public:
 void WriteXPathTo(System::Xml::XmlWriter ^ writer, System::String ^ prefix, System::String ^ localName, System::String ^ ns, bool writeNamespaces);
public void WriteXPathTo (System.Xml.XmlWriter writer, string prefix, string localName, string ns, bool writeNamespaces);
member this.WriteXPathTo : System.Xml.XmlWriter * string * string * string * bool -> unit
Public Sub WriteXPathTo (writer As XmlWriter, prefix As String, localName As String, ns As String, writeNamespaces As Boolean)

Parameters

writer
XmlWriter

The XmlWriter used to write the XPathMessageFilter.

prefix
String

The namespace prefix of the XPath XML element.

localName
String

The local name of the XPath XML element.

ns
String

The namespace URI to associate with the XML element.

writeNamespaces
Boolean

true if namespaces should be serialized out separately as attributes; otherwise, false.

Exceptions

writer or localName is null.

localName has length = 0.

Remarks

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

Applies to