XmlReader.IsNameToken(String) 方法
定义
返回一个值,该值指示该字符串自变量是否是有效的 XML 名称标记。Returns a value indicating whether or not the string argument is a valid XML name token.
public:
static bool IsNameToken(System::String ^ str);
public static bool IsNameToken (string str);
static member IsNameToken : string -> bool
Public Shared Function IsNameToken (str As String) As Boolean
参数
- str
- String
要验证的名称标记。The name token to validate.
返回
如果它是有效的名称标记,则为 true
;否则为 false
。true
if it is a valid name token; otherwise false
.
例外
str
值为 null
。The str
value is null
.
注解
此方法使用 W3C XML 1.0 建议 来确定名称令牌是否有效。This method uses the W3C XML 1.0 Recommendation to determine whether the name token is valid.