Share via


XmlSchemaValidator.ValidateWhitespace 方法

定義

驗證在目前元素內容中是否允許空白字元,並在目前元素具有簡單內容的情況下,彙總空白字元以進行驗證。

多載

ValidateWhitespace(String)

驗證在目前項目內容中是否允許指定之 string 中的空白區,並在目前項目具有簡單內容的情況下,彙總空白區以進行驗證。

ValidateWhitespace(XmlValueGetter)

驗證在目前項目內容中是否允許指定之 XmlValueGetter 物件傳回的空白區,並在目前項目具有簡單內容的情況下,彙總空白區以進行驗證。

ValidateWhitespace(String)

Source:
XmlSchemaValidator.cs
Source:
XmlSchemaValidator.cs
Source:
XmlSchemaValidator.cs

驗證在目前項目內容中是否允許指定之 string 中的空白區,並在目前項目具有簡單內容的情況下,彙總空白區以進行驗證。

public:
 void ValidateWhitespace(System::String ^ elementValue);
public void ValidateWhitespace (string elementValue);
member this.ValidateWhitespace : string -> unit
Public Sub ValidateWhitespace (elementValue As String)

參數

elementValue
String

要在目前項目內容中驗證的空白區 string

例外狀況

在目前項目內容中不允許空白區。

未按正確的順序呼叫 ValidateWhitespace 方法。 例如,在呼叫 ValidateWhitespace 之後呼叫 ValidateAttribute 方法。

適用於

ValidateWhitespace(XmlValueGetter)

Source:
XmlSchemaValidator.cs
Source:
XmlSchemaValidator.cs
Source:
XmlSchemaValidator.cs

驗證在目前項目內容中是否允許指定之 XmlValueGetter 物件傳回的空白區,並在目前項目具有簡單內容的情況下,彙總空白區以進行驗證。

public:
 void ValidateWhitespace(System::Xml::Schema::XmlValueGetter ^ elementValue);
public void ValidateWhitespace (System.Xml.Schema.XmlValueGetter elementValue);
member this.ValidateWhitespace : System.Xml.Schema.XmlValueGetter -> unit
Public Sub ValidateWhitespace (elementValue As XmlValueGetter)

參數

elementValue
XmlValueGetter

XmlValueGetterdelegate,用於將空白字元值當做與屬性之 XML 結構描述定義語言 (XSD) 類型相容的 Common Language Runtime (CLR) 類型進行傳遞。

例外狀況

在目前項目內容中不允許空白區。

未按正確的順序呼叫 ValidateWhitespace 方法。 例如,在呼叫 ValidateWhitespace 之後呼叫 ValidateAttribute 方法。

另請參閱

適用於