Hydrogen Framework  1.3.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Hydrogen.XML Class Reference

Additional static functions used to extend existing XML support inside of Unity. More...

Static Public Member Functions

static Byte[] StringToUTF8ByteArray (String pXmlString)
 Converts the String to UTF8 Byte array and is used in Deserialization. More...
 
static String UTF8ByteArrayToString (Byte[] characters)
 To convert a Byte Array of Unicode values (UTF-8 encoded) to a complete String. More...
 

Detailed Description

Additional static functions used to extend existing XML support inside of Unity.

Definition at line 36 of file XML.cs.

Member Function Documentation

static Byte [] Hydrogen.XML.StringToUTF8ByteArray ( String  pXmlString)
static

Converts the String to UTF8 Byte array and is used in Deserialization.

Returns
A byte array.
Parameters
pXmlStringThe source string.

Definition at line 43 of file XML.cs.

44  {
45  var encoding = new System.Text.UTF8Encoding ();
46  return encoding.GetBytes (pXmlString);
47  }
static String Hydrogen.XML.UTF8ByteArrayToString ( Byte[]  characters)
static

To convert a Byte Array of Unicode values (UTF-8 encoded) to a complete String.

Returns
String converted from Unicode Byte Array.
Parameters
charactersUnicode Byte Array to be converted to String.

Definition at line 54 of file XML.cs.

55  {
56  var encoding = new System.Text.UTF8Encoding ();
57  return encoding.GetString (characters);
58  }