Asn1XmlUtil Class Reference

List of all members.

Static Public Member Functions

static void EncodeDouble (Asn1XmlEncoder buffer, double data)
static void EncodeDouble (Asn1XmlEncoder buffer, double data, System.String elemName, System.String nsPrefix)
static void EncodeNSAttrs (Asn1XmlEncoder buffer, Asn1XmlNamespace[] nsArray)
static double GetMinusZero ()
static System.String GetXMLString (System.String data)
static bool IsMinusZero (double value)
static void KeepNullsInString (bool keep)

Detailed Description

This class contains some general purpose static utility functions for XML encoding or decoding.


Member Function Documentation

static void EncodeDouble ( Asn1XmlEncoder  buffer,
double  data 
) [static]

This method encodes an ASN.1 real value using the XML encoding (non-XER).

Parameters:
buffer Encode message buffer object
value Value to be encoded.
static void EncodeDouble ( Asn1XmlEncoder  buffer,
double  data,
System.String  elemName,
System.String  nsPrefix 
) [static]

This method encodes an ASN.1 real value using the XML encoding (non-XER).

Parameters:
buffer Encode message buffer object
value Value to be encoded.
elemName Element name
nsPrefix Element namespace prefix value
static void EncodeNSAttrs ( Asn1XmlEncoder  buffer,
Asn1XmlNamespace[]  nsArray 
) [static]

This method encodes XML namespace attributes in the form 'xmlns[:prefix]="uri"'.

Parameters:
nsArray Array of XML namespace prefix/URI mappings.
static double GetMinusZero (  )  [static]

This method returns double value for "minus zero" (-0) special XML value.

Returns:
double value for "-0".
static System.String GetXMLString ( System.String  data  )  [static]

This method will convert the given string value into XML character content by escaping special characters in the sting such as ampersand (&), left angle bracket (>), etc.

Parameters:
data String to convert
Returns:
Converted string value
static bool IsMinusZero ( double  value  )  [static]

This method will return true, if value is "minus zero" (-0) special XML value.

Parameters:
value value to test
Returns:
true, if this value is "-0".
static void KeepNullsInString ( bool  keep  )  [static]

This method allows users to toggle the output of a null entity code in XML strings. Null bytes are not permitted in any XML document, but are permissible in ASN.1 strings. When converting, users may elect to retain null bytes as entities (&x0;) by passing

true

to this function. By default, null bytes are dropped.

Parameters:
keep Boolean switch to keep or ignore null bytes.