System::Xml::XmlConvert Class Reference

Static Public Member Functions

static ASPOSECPP_SHARED_API String EncodeName (const String &name)
 
static ASPOSECPP_SHARED_API String EncodeLocalName (const String &name)
 
static ASPOSECPP_SHARED_API String DecodeName (const String &name)
 
static ASPOSECPP_SHARED_API String ToString (bool value)
 
static ASPOSECPP_SHARED_API String ToString (char16_t value)
 
static ASPOSECPP_SHARED_API String ToString (int8_t value)
 
static ASPOSECPP_SHARED_API String ToString (uint8_t value)
 
static ASPOSECPP_SHARED_API String ToString (int16_t value)
 
static ASPOSECPP_SHARED_API String ToString (uint16_t value)
 
static ASPOSECPP_SHARED_API String ToString (int32_t value)
 
static ASPOSECPP_SHARED_API String ToString (uint32_t value)
 
static ASPOSECPP_SHARED_API String ToString (int64_t value)
 
static ASPOSECPP_SHARED_API String ToString (uint64_t value)
 
static ASPOSECPP_SHARED_API String ToString (double value)
 
static ASPOSECPP_SHARED_API String ToString (float value)
 
static ASPOSECPP_SHARED_API String ToString (const System::Guid &value)
 
static ASPOSECPP_SHARED_API String ToString (DateTime value, const String &format=u"yyyy-MM-ddTHH:mm:ss.fffffffzzzzzz")
 
static ASPOSECPP_SHARED_API String ToString (const Decimal &value)
 
static ASPOSECPP_SHARED_API char_t ToChar (const String &s)
 
static ASPOSECPP_SHARED_API int8_t ToSByte (const String &s)
 
static ASPOSECPP_SHARED_API uint8_t ToByte (const String &s)
 
static ASPOSECPP_SHARED_API bool ToBoolean (const String &s)
 
static ASPOSECPP_SHARED_API double ToDouble (const String &s)
 
static ASPOSECPP_SHARED_API float ToSingle (const String &s)
 
static ASPOSECPP_SHARED_API int16_t ToInt16 (const String &s)
 
static ASPOSECPP_SHARED_API uint16_t ToUInt16 (const String &s)
 
static ASPOSECPP_SHARED_API int ToInt32 (const String &s)
 
static ASPOSECPP_SHARED_API uint32_t ToUInt32 (const String &s)
 
static ASPOSECPP_SHARED_API int64_t ToInt64 (const String &s)
 
static ASPOSECPP_SHARED_API uint64_t ToUInt64 (const String &s)
 
static ASPOSECPP_SHARED_API System::Guid ToGuid (const String &s)
 
static ASPOSECPP_SHARED_API System::DateTime ToDateTime (const String &s)
 
static ASPOSECPP_SHARED_API System::DateTime ToDateTime (const String &s, XmlDateTimeSerializationMode mode)
 
static ASPOSECPP_SHARED_API System::DateTime ToDateTime (const String &s, const String &format)
 
static ASPOSECPP_SHARED_API System::DateTime ToDateTime (const String &s, const SharedPtr< Array< String >> &formats)
 
static ASPOSECPP_SHARED_API System::TimeSpan ToTimeSpan (const String &s)
 
static ASPOSECPP_SHARED_API System::TimeSpan ToTimeSpan (const String &s, const String &format)
 
static ASPOSECPP_SHARED_API System::Decimal ToDecimal (const String &s)
 

Detailed Description

Contains methods for encoding and decoding XML names and methods for converting between C++ types and XSD types. This is a static type with no instance services. You should never create instances of it by any means.

Member Function Documentation

◆ DecodeName()

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::DecodeName ( const String name)
static

Decodes the specified name by unescaping the escaped characters.

Parameters
nameThe name to decode
Returns
The decoded name

◆ EncodeLocalName()

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::EncodeLocalName ( const String name)
static

Converts the specified name into valid XML local name by escaping all invalid characters.

Parameters
nameThe name to be converted
Returns
The valid XML local name with all invalid characters escaped

◆ EncodeName()

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::EncodeName ( const String name)
static

Converts the specified name into valid XML name by escaping all invalid characters.

Parameters
nameThe name to be converted
Returns
The valid XML name with all invalid characters escaped

◆ ToBoolean()

static ASPOSECPP_SHARED_API bool System::Xml::XmlConvert::ToBoolean ( const String s)
static

Converts the string representation of a boolean value to equivalent boolean value.

Parameters
sThe string representation of a boolean value
Returns
True if the specified string contains "true", "True" or "1"; false if the specified string contains "false", "False" or "0"

◆ ToByte()

static ASPOSECPP_SHARED_API uint8_t System::Xml::XmlConvert::ToByte ( const String s)
static

Converts the string representation of an unsigned 8-bit integer value to equivalent unsigned 8-bit integer value.

Parameters
sThe string representation of an unsigned 8-bit integer value
Returns
An unsigned 8-bit integer value equivalent to the string representation in s

◆ ToChar()

static ASPOSECPP_SHARED_API char_t System::Xml::XmlConvert::ToChar ( const String s)
static

Returns the first character of the specified string.

Parameters
sThe string
Returns
The first character of the s or 0 if the length of s is 0.

◆ ToDateTime() [1/4]

static ASPOSECPP_SHARED_API System::DateTime System::Xml::XmlConvert::ToDateTime ( const String s)
static

NOT IMPLEMENTED

Exceptions
NotImplementedException

◆ ToDateTime() [2/4]

static ASPOSECPP_SHARED_API System::DateTime System::Xml::XmlConvert::ToDateTime ( const String s,
XmlDateTimeSerializationMode  mode 
)
static

NOT IMPLEMENTED

Exceptions
NotImplementedException

◆ ToDateTime() [3/4]

static ASPOSECPP_SHARED_API System::DateTime System::Xml::XmlConvert::ToDateTime ( const String s,
const String format 
)
static

Converts the specified string representation of date and time to equivalent DateTime object using the specified string format.

Parameters
sThe string representation of date and time to convert
formatThe string format to use when parsing the string s
Returns
The DateTime object representing the date and time represented by s

◆ ToDateTime() [4/4]

static ASPOSECPP_SHARED_API System::DateTime System::Xml::XmlConvert::ToDateTime ( const String s,
const SharedPtr< Array< String >> &  formats 
)
static

Converts the specified string representation of date and time to equivalent DateTime object using one of the specified string formats.

Parameters
sThe string representation of date and time to convert
formatsArray of string formats to use when parsing the string s
Returns
The DateTime object representing the date and time represented by s

◆ ToDecimal()

static ASPOSECPP_SHARED_API System::Decimal System::Xml::XmlConvert::ToDecimal ( const String s)
static

Converts the specified string representation of a decimal number to equivalent Decimal object.

Parameters
sThe string to convert
Returns
The Decimal object representing the decimal value equivalent to the one represented by s

◆ ToDouble()

static ASPOSECPP_SHARED_API double System::Xml::XmlConvert::ToDouble ( const String s)
static

Converts the string representation of a double-precision floating point value to equivalent double-precision floating point value value.

Parameters
sThe string representation of a double-precision floating point value
Returns
A double-precision floating point value equivalent to the string representation in s

◆ ToGuid()

static ASPOSECPP_SHARED_API System::Guid System::Xml::XmlConvert::ToGuid ( const String s)
static

Converts the string representation of a GUID to equivalent Guid object.

Parameters
sThe string representation of a GUID
Returns
A Guid object representing the GUID equivalent to the string representation in s

◆ ToInt16()

static ASPOSECPP_SHARED_API int16_t System::Xml::XmlConvert::ToInt16 ( const String s)
static

Converts the string representation of a 16-bit integer value to equivalent 16-bit integer value.

Parameters
sThe string representation of a 16-bit integer value
Returns
A 16-bit integer value equivalent to the string representation in s

◆ ToInt32()

static ASPOSECPP_SHARED_API int System::Xml::XmlConvert::ToInt32 ( const String s)
static

Converts the string representation of a 32-bit integer value to equivalent 32-bit integer value.

Parameters
sThe string representation of a 32-bit integer value
Returns
A 32-bit integer value equivalent to the string representation in s

◆ ToInt64()

static ASPOSECPP_SHARED_API int64_t System::Xml::XmlConvert::ToInt64 ( const String s)
static

Converts the string representation of a 64-bit integer value to equivalent 64-bit integer value.

Parameters
sThe string representation of a 64-bit integer value
Returns
A 64-bit integer value equivalent to the string representation in s

◆ ToSByte()

static ASPOSECPP_SHARED_API int8_t System::Xml::XmlConvert::ToSByte ( const String s)
static

Converts the string representation of an 8-bit integer value to equivalent 8-bit integer value.

Parameters
sThe string representation of an 8-bit integer value
Returns
An 8-bit integer value equivalent to the string representation in s

◆ ToSingle()

static ASPOSECPP_SHARED_API float System::Xml::XmlConvert::ToSingle ( const String s)
static

Converts the string representation of a single-precision floating point value to equivalent single-precision floating point value.

Parameters
sThe string representation of a single-precision floating point value
Returns
A single-precision floating point value equivalent to the string representation in s

◆ ToString() [1/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( bool  value)
static

Converts the specified boolean value to its string representation.

Parameters
valueThe boolean value to convert
Returns
"true" if value = true, otherwise - "false"

◆ ToString() [2/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( char16_t  value)
static

Converts the specified char value to its string representation.

Parameters
valueThe char16_t value to convert
Returns
The string representation of value

◆ ToString() [3/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( int8_t  value)
static

Converts the specified 8-bit integer value to its string representation.

Parameters
valueAn 8-bit integer value to convert
Returns
The string representation of value

◆ ToString() [4/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( uint8_t  value)
static

Converts the specified unsigned 8-bit integer value to its string representation.

Parameters
valueAn unsigned 8-bit integer value to convert
Returns
The string representation of value

◆ ToString() [5/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( int16_t  value)
static

Converts the specified 16-bit integer value to its string representation.

Parameters
valueA 16-bit integer value to convert
Returns
The string representation of value

◆ ToString() [6/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( uint16_t  value)
static

Converts the specified unsigned 16-bit integer value to its string representation.

Parameters
valueAn unsigned 16-bit integer value to convert
Returns
The string representation of value

◆ ToString() [7/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( int32_t  value)
static

Converts the specified 32-bit integer value to its string representation.

Parameters
valueA 32-bit integer value to convert
Returns
The string representation of value

◆ ToString() [8/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( uint32_t  value)
static

Converts the specified unsigned 32-bit integer value to its string representation.

Parameters
valueAn unsigned 32-bit integer value to convert
Returns
The string representation of value

◆ ToString() [9/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( int64_t  value)
static

Converts the specified 64-bit integer value to its string representation.

Parameters
valueA 64-bit integer value to convert
Returns
The string representation of value

◆ ToString() [10/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( uint64_t  value)
static

Converts the specified unsigned 64-bit integer value to its string representation.

Parameters
valueAn unsigned 64-bit integer value to convert
Returns
The string representation of value

◆ ToString() [11/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( double  value)
static

Converts the specified double-precision floating point value to its string representation.

Parameters
valueA double-precision floating point value to convert
Returns
The string representation of value

◆ ToString() [12/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( float  value)
static

Converts the specified single-precision floating point value to its string representation.

Parameters
valueA single-precision floating point value to convert
Returns
The string representation of value

◆ ToString() [13/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( const System::Guid value)
static

Converts the specified Guid object to its string representation.

Parameters
valueA Guid objet to convert
Returns
The string representation of value

◆ ToString() [14/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( DateTime  value,
const String format = u"yyyy-MM-ddTHH:mm:ss.fffffffzzzzzz" 
)
static

Converts the specified DateTime object to its string representation using the specified string format.

Parameters
valueAn 8-bit integer value to convert
formatThe string format
Returns
The string representation of value in format format

◆ ToString() [15/15]

static ASPOSECPP_SHARED_API String System::Xml::XmlConvert::ToString ( const Decimal value)
static

Converts the specified Decimal object to its string representation.

Parameters
valueA Decimal object to convert
Returns
The string representation of value

◆ ToTimeSpan() [1/2]

static ASPOSECPP_SHARED_API System::TimeSpan System::Xml::XmlConvert::ToTimeSpan ( const String s)
static

Converts the specified string representation of a time interval to equivalent TimeSpan object.

Parameters
sThe string to convert
Returns
The TimeSpan object representing the time interval represented by s

◆ ToTimeSpan() [2/2]

static ASPOSECPP_SHARED_API System::TimeSpan System::Xml::XmlConvert::ToTimeSpan ( const String s,
const String format 
)
static

NOT IMPLEMENTED

Exceptions
NotImplementedException

◆ ToUInt16()

static ASPOSECPP_SHARED_API uint16_t System::Xml::XmlConvert::ToUInt16 ( const String s)
static

Converts the string representation of an unsigned 16-bit integer value to equivalent unsigned 16-bit integer value.

Parameters
sThe string representation of an unsigned 16-bit integer value
Returns
An unsigned 16-bit integer value equivalent to the string representation in s

◆ ToUInt32()

static ASPOSECPP_SHARED_API uint32_t System::Xml::XmlConvert::ToUInt32 ( const String s)
static

Converts the string representation of an unsigned 32-bit integer value to equivalent unsigned 32-bit integer value.

Parameters
sThe string representation of an unsigned 32-bit integer value
Returns
An unsigned 32-bit integer value equivalent to the string representation in s

◆ ToUInt64()

static ASPOSECPP_SHARED_API uint64_t System::Xml::XmlConvert::ToUInt64 ( const String s)
static

Converts the string representation of an unsigned 64-bit integer value to equivalent unsigned 64-bit integer value.

Parameters
sThe string representation of an unsigned 64-bit integer value
Returns
An unsigned 64-bit integer value equivalent to the string representation in s