XPathMessageFilter.WriteXPathTo 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
用指定的 XML 寫入器寫入 XML XPath 元素。
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)
參數
- writer
- XmlWriter
他們 XmlWriter 過去會寫 XPathMessageFilter。
- prefix
- String
XPath XML 元素的命名空間前綴。
- localName
- String
XPath XML 元素的本地名稱。
- ns
- String
命名空間 URI 來關聯 XML 元素。
- writeNamespaces
- Boolean
true若命名空間應分別序列化為屬性;否則,。 false
例外狀況
writer 或 localName 為 null。
localName 長度 = 0。
備註
必須 writer 處於 起始 狀態。 否則會拋出例外。