XmlConvert Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encodes and decodes XML names, and provides methods for converting between common language runtime types and XML Schema definition language (XSD) types. When converting data types, the values returned are locale-independent.
public ref class XmlConvert abstract sealed
public ref class XmlConvert
public static class XmlConvert
public class XmlConvert
type XmlConvert = class
Public Class XmlConvert
- Inheritance
-
XmlConvert
Remarks
For more information about this API, see Supplemental API remarks for XmlConvert.
Constructors
XmlConvert() |
Initializes a new instance of the XmlConvert class. |
Methods
DecodeName(String) |
Decodes a name. This method does the reverse of the EncodeName(String) and EncodeLocalName(String) methods. |
EncodeLocalName(String) |
Converts the name to a valid XML local name. |
EncodeName(String) |
Converts the name to a valid XML name. |
EncodeNmToken(String) |
Verifies the name is valid according to the XML specification. |
IsNCNameChar(Char) |
Checks whether the passed-in character is a valid non-colon character type. |
IsPublicIdChar(Char) |
Returns the passed-in character instance if the character in the argument is a valid public id character, otherwise |
IsStartNCNameChar(Char) |
Checks if the passed-in character is a valid Start Name Character type. |
IsWhitespaceChar(Char) |
Checks if the passed-in character is a valid XML whitespace character. |
IsXmlChar(Char) |
Checks if the passed-in character is a valid XML character. |
IsXmlSurrogatePair(Char, Char) |
Checks if the passed-in surrogate pair of characters is a valid XML character. |
ToBoolean(String) | |
ToByte(String) | |
ToChar(String) | |
ToDateTime(String, String) | |
ToDateTime(String, String[]) | |
ToDateTime(String, XmlDateTimeSerializationMode) |
Converts the String to a DateTime using the XmlDateTimeSerializationMode specified. |
ToDateTime(String) |
Obsolete.
Obsolete.
|
ToDateTimeOffset(String, String) |
Converts the supplied String to a DateTimeOffset equivalent. |
ToDateTimeOffset(String, String[]) |
Converts the supplied String to a DateTimeOffset equivalent. |
ToDateTimeOffset(String) |
Converts the supplied String to a DateTimeOffset equivalent. |
ToDecimal(String) | |
ToDouble(String) | |
ToGuid(String) | |
ToInt16(String) | |
ToInt32(String) | |
ToInt64(String) | |
ToSByte(String) | |
ToSingle(String) | |
ToString(Boolean) | |
ToString(Byte) | |
ToString(Char) | |
ToString(DateTime, String) | |
ToString(DateTime, XmlDateTimeSerializationMode) |
Converts the DateTime to a String using the XmlDateTimeSerializationMode specified. |
ToString(DateTime) |
Obsolete.
Obsolete.
|
ToString(DateTimeOffset, String) |
Converts the supplied DateTimeOffset to a String in the specified format. |
ToString(DateTimeOffset) |
Converts the supplied DateTimeOffset to a String. |
ToString(Decimal) | |
ToString(Double) | |
ToString(Guid) | |
ToString(Int16) | |
ToString(Int32) | |
ToString(Int64) | |
ToString(SByte) | |
ToString(Single) | |
ToString(TimeSpan) | |
ToString(UInt16) | |
ToString(UInt32) | |
ToString(UInt64) | |
ToTimeSpan(String) | |
ToUInt16(String) | |
ToUInt32(String) | |
ToUInt64(String) | |
VerifyName(String) |
Verifies that the name is a valid name according to the W3C Extended Markup Language recommendation. |
VerifyNCName(String) |
Verifies that the name is a valid |
VerifyNMTOKEN(String) |
Verifies that the string is a valid NMTOKEN according to the W3C XML Schema Part2: Datatypes recommendation. |
VerifyPublicId(String) |
Returns the passed in string instance if all the characters in the string argument are valid public id characters. |
VerifyTOKEN(String) |
Verifies that the string is a valid token according to the W3C XML Schema Part2: Datatypes recommendation. |
VerifyWhitespace(String) |
Returns the passed-in string instance if all the characters in the string argument are valid whitespace characters. |
VerifyXmlChars(String) |
Returns the passed-in string if all the characters and surrogate pair characters in the string argument are valid XML characters, otherwise an |