XmlReader.IsNameToken Method (String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a value indicating whether or not the string argument is a valid XML name token.

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

static member IsNameToken : 
        str:string -> bool

Parameters

str
Type: System.String

The name token to validate.

Return Value

Type: System.Boolean

true if it is a valid name token; otherwise false.

Exception Condition
ArgumentNullException

The str value is null.

This method uses the W3C XML 1.0 Recommendation to determine whether the name token is valid.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: