Windows apps
Collapse the table of content
Expand the table of content
Information
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^)

 

Verifies that the string is a valid token according to the W3C XML Schema Part2: Datatypes recommendation.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

public:
static String^ VerifyTOKEN(
	String^ token
)

Parameters

token
Type: System::String^

The string value you wish to verify.

Return Value

Type: System::String^

The token, if it is a valid token.

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
Return to top
Show:
© 2017 Microsoft