Verifies that the string is a valid NMTOKEN according to the W3C XML Schema Part2: Datatypes recommendation
The name token, if it is a valid NMTOKEN.
This method ensures that the name token follows the proper syntax for a valid NMTOKEN. It can be used in the following manner:
Example
try { writer.WriteStartElement(XmlConvert.VerifyNMTOKEN("abc"),"book"); } catch(Exception e) { Console.WriteLine("error"); }
For more information on the NMTOKEN data type, see http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#NMTOKEN.