The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
XmlConvert::VerifyTOKEN Method (String^)
.NET Framework (current version)
Verifies that the string is a valid token according to the W3C XML Schema Part2: Datatypes recommendation.
Assembly: System.Xml (in System.Xml.dll)
Parameters
- token
-
Type:
System::String^
The string value you wish to verify.
| Exception | Condition |
|---|---|
| XmlException | The string value is not a valid token. |
This method ensures that the name token follows the proper syntax for a valid token. It can be used in the following manner:
try {
writer.WriteStartElement(XmlConvert.VerifyTOKEN("abc"),"book");
}
catch(Exception e) {
Console.WriteLine("error");
}
For more information on tokens, see http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#token.
.NET Framework
Available since 2.0
Available since 2.0
Show: