XmlConvert.VerifyTOKEN(String) 메서드

정의

W3C XML 스키마 파트2: Datatypes 권장 사항에 따라 문자열이 유효한 토큰인지 확인합니다.

public:
 static System::String ^ VerifyTOKEN(System::String ^ token);
public static string? VerifyTOKEN(string? token);
public static string VerifyTOKEN(string token);
static member VerifyTOKEN : string -> string
Public Shared Function VerifyTOKEN (token As String) As String

매개 변수

token
String

확인하려는 문자열 값입니다.

반품

토큰(유효한 토큰인 경우)입니다.

예외

문자열 값이 유효한 토큰이 아닙니다.

설명

이 메서드는 이름 토큰이 유효한 토큰에 대한 적절한 구문을 따르는지 확인합니다. 다음과 같은 방식으로 사용할 수 있습니다.

try {
  writer.WriteStartElement(XmlConvert.VerifyTOKEN("abc"),"book");
}
catch(Exception e) {
  Console.WriteLine("error");
}

토큰에 대한 자세한 내용은 NMTOKEN을 참조하세요.

적용 대상