XBinder C# Runtime Library
2.8
|
Helper class for dealing with XML simple types. More...
Static Public Member Functions | |
static System.String | formatBase64BinaryToString (XBByteArray bytes) |
static void | formatBase64BinaryToStream (XBByteArray bytes, System.IO.StreamWriter stream) |
static System.String | formatDecimal (System.Decimal value_Renamed) |
Format the Decimal into a string without leading or trailing zeros. More... | |
static System.String | formatDecimal (System.Decimal decValue, int totalMaxDigits, int fractionMaxDigits, int fractionMinDigits, int integerMinDigits, bool signAlwaysPresent, bool pointAlwaysPresent, bool validate) |
Format the Decimal according to caller's detailed instructions More... | |
static XBByteArray | parseBase64Binary (System.String text) |
Decode given base64Binary XML text into new XBByteArray. More... | |
static XBByteArray | parseBase64Binary (System.String text, XBByteArray bytes) |
Decode given base64Binary XML text into give bytes object. More... | |
static bool | parseBoolean (System.String text) |
Convert text to a boolean value. Whitespace processing should have already been applied. More... | |
static System.Decimal | parseDecimal (System.String text) |
Convert XML text to a decimal value. Whitespace processing should have already been applied. More... | |
static System.Decimal | parseDecimalAndValidate (System.String text, int totalDigits, int fractionDigits) |
Parses an xsd:decimal value and validates the given facets. This behaves the same as parseDecimal(text), except for the additional validation of the facets. More... | |
static double | parseDouble (System.String text) |
Convert XML text to a double value. Whitespace processing should have already been applied. More... | |
static float | parseSingle (System.String text) |
Convert XML text to a float value. Whitespace processing should have already been applied. More... | |
static sbyte | parseSByte (System.String value_Renamed) |
Parses a String into a byte. The string may have a leading +/-, otherwise all characters must be '0' - '9'. Leading zeros are acceptable. More... | |
static byte | parseByte (System.String value_Renamed) |
Parses a String into a byte. The string may have a leading +, otherwise all characters must be '0' - '9'. Leading zeros are acceptable. More... | |
static int | parseInt32 (System.String value_Renamed) |
Parses a String into an int The string may have a leading +/-, otherwise all characters must be '0' - '9'. Leading zeros are acceptable. More... | |
static uint | parseUInt32 (System.String value_Renamed) |
Parses a String into a uint The string may have a leading +, otherwise all characters must be '0' - '9'. Leading zeros are acceptable. More... | |
static ulong | parseUInt64 (System.String value_Renamed) |
Parses a String into a ulong The string may have a leading +, otherwise all characters must be '0' - '9'. Leading zeros are acceptable. More... | |
static long | parseInt64 (System.String value_Renamed) |
Parses a String into a long The string may have a leading +/-, otherwise all characters must be '0' - '9'. Leading zeros are acceptable. More... | |
static short | parseInt16 (System.String value_Renamed) |
Parses a String into a short. The string may have a leading +/-, otherwise all characters must be '0' - '9'. Leading zeros are acceptable. More... | |
static ushort | parseUInt16 (System.String value_Renamed) |
Parses a String into a ushort. The string may have a leading +, otherwise all characters must be '0' - '9'. Leading zeros are acceptable. More... | |
static System.String | whitespaceReplace (System.String value_Renamed) |
Apply the whitespace="replace" facet. This rule replaces any with a space. More... | |
static System.String | whitespaceCollapse (System.String value_Renamed) |
Apply the whitespace="collapse" facet. This rule replaces with space. It then replaces multiple spaces with a single space, and removes leading and trailing spaces. More... | |
Helper class for dealing with XML simple types.
<author> Kevin
</author>
|
static |
Format the Decimal into a string without leading or trailing zeros.
value |
|
static |
Format the Decimal according to caller's detailed instructions
decValue | The decimal value to format |
totalMaxDigits | The maximum totalDigits. Values less than 1 are ignored. If validate is false, totalDigits may be exceeded, but if so, no fraction part will show. If validate is true, and the given number of totalDigits is exceeded, an exception will be thrown. Leading zeros in the integer part are not counted. Trailing zeros in the fraction part are not counted. |
fractionMaxDigits | The maximum number of fraction digits. Values less than 0 are ignored. Extra fraction digits are rounded off. Trailing zeros are not counted. |
fractionMinDigits | Minimum digits in fraction. Trailing zeros will be added if needed. |
integerMinDigits | Minimum digits in integer part. Leading zeros will be added if needed. |
signPresent | If true, a positive sign is shown. |
pointPresent | If true, the decimal point will be shown. |
validate | If true, an exception occurs if totalDigits is violated. |
value |
|
static |
|
static |
Decode given base64Binary XML text into give bytes object.
text | |
bytes | XBByteArray to decode into, starting at 0 offset. If null, a new object will be created to decode into. |
|
static |
Convert text to a boolean value. Whitespace processing should have already been applied.
text | A valid XML Schema lexical representation of a boolean. |
|
static |
Parses a String into a byte. The string may have a leading +, otherwise all characters must be '0' - '9'. Leading zeros are acceptable.
Whitespace is not allowed.
value |
<throws> XBNumberFormatException if any of the following: </throws>
The string represents an integer out of range of a byte. The string is otherwise not valid, as described above.
|
static |
Convert XML text to a decimal value. Whitespace processing should have already been applied.
|
static |
Parses an xsd:decimal value and validates the given facets. This behaves the same as parseDecimal(text), except for the additional validation of the facets.
<totalDigits> Values < 1 are ignored </totalDigits> <fractionDigits> Values < 0 are ignored </fractionDigits>
|
static |
Convert XML text to a double value. Whitespace processing should have already been applied.
This method accepts strings that are legal lexical representations of the XML Schema double data type. Note the following:
|
static |
Parses a String into a short. The string may have a leading +/-, otherwise all characters must be '0' - '9'. Leading zeros are acceptable.
Whitespace is not allowed.
value |
<throws> XBNumberFormatException if any of the following: </throws>
The string represents an integer out of range of a byte. The string is otherwise not valid, as described above.
|
static |
Parses a String into an int The string may have a leading +/-, otherwise all characters must be '0' - '9'. Leading zeros are acceptable.
Whitespace is not allowed.
value |
<throws> XBNumberFormatException if any of the following: </throws>
The string represents an integer out of range of a byte. The string is otherwise not valid, as described above.
|
static |
Parses a String into a long The string may have a leading +/-, otherwise all characters must be '0' - '9'. Leading zeros are acceptable.
Whitespace is not allowed.
value |
<throws> XBNumberFormatException if any of the following: </throws>
The string represents an integer out of range of a byte. The string is otherwise not valid, as described above.
|
static |
Parses a String into a byte. The string may have a leading +/-, otherwise all characters must be '0' - '9'. Leading zeros are acceptable.
Whitespace is not allowed.
value |
<throws> XBNumberFormatException if any of the following: </throws>
The string represents an integer out of range of a byte. The string is otherwise not valid, as described above.
|
static |
Convert XML text to a float value. Whitespace processing should have already been applied.
This method accepts strings that are legal lexical representations of the XML Schema float data type. Some differences from the standard Java Float.valueOf are:
|
static |
Parses a String into a ushort. The string may have a leading +, otherwise all characters must be '0' - '9'. Leading zeros are acceptable.
Whitespace is not allowed.
value |
<throws> XBNumberFormatException if any of the following: </throws>
The string represents an integer out of range of a ushort. The string is otherwise not valid, as described above.
|
static |
Parses a String into a uint The string may have a leading +, otherwise all characters must be '0' - '9'. Leading zeros are acceptable.
Whitespace is not allowed.
value |
<throws> XBNumberFormatException if any of the following: </throws>
The string represents an integer out of range of a uint. The string is otherwise not valid, as described above.
|
static |
Parses a String into a ulong The string may have a leading +, otherwise all characters must be '0' - '9'. Leading zeros are acceptable.
Whitespace is not allowed.
value |
<throws> XBNumberFormatException if any of the following: </throws>
The string represents an integer out of range of a ulong. The string is otherwise not valid, as described above.
|
static |
Apply the whitespace="collapse" facet. This rule replaces
with space. It then replaces multiple spaces with a single space, and removes leading and trailing spaces.
value |
|
static |
Apply the whitespace="replace" facet. This rule replaces any
with a space.