XmlWriter.WriteName(String) メソッド
定義
派生クラスでオーバーライドされると、指定した名前を書き込み、その名前が W3C 勧告『XML 1.0』(https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name)) に準拠した有効な名前であるようにします。When overridden in a derived class, writes out the specified name, ensuring it is a valid name according to the W3C XML 1.0 recommendation (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name).
public:
virtual void WriteName(System::String ^ name);
public:
abstract void WriteName(System::String ^ name);
public virtual void WriteName (string name);
public abstract void WriteName (string name);
abstract member WriteName : string -> unit
override this.WriteName : string -> unit
abstract member WriteName : string -> unit
Public Overridable Sub WriteName (name As String)
Public MustOverride Sub WriteName (name As String)
パラメーター
- name
- String
書き込む名前。The name to write.
例外
name
が有効な XML 名ではありません。または、name
が null
または String.Empty
です。name
is not a valid XML name; or name
is either null
or String.Empty
.
先行の非同期操作が完了する前に、XmlWriter メソッドが呼び出されました。An XmlWriter method was called before a previous asynchronous operation finished. この場合、「非同期操作が既に実行されています」というメッセージと共に InvalidOperationException がスローされます。In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."
注釈
Namespacesがに設定されている場合 true
、は、 WriteName
XML 勧告の W3C 名前空間に従っても名前が有効であることを確認します。If Namespaces is set to true
, WriteName
also checks that the name is also valid according to the W3C Namespaces in XML recommendation.
このメソッドの非同期バージョンについては、「」を参照してください WriteNameAsync 。For the asynchronous version of this method, see WriteNameAsync.