// Breaks down single XML string to multiple lines for easier readability.
public string ParseXML(byte[] Data)
{
try
{
string msg = Encoding.ASCII.GetString(Data, 0, Data.Length);
string message = "";
int i=0;
while (i<Data.Length)
{
int i1;
i1 = msg.IndexOf("\0", i);
if (i1<0)
i1 = Data.Length-1;
string text = msg.Substring(i, i1-i);
i=i1+1;
message += Environment.NewLine + text;
}
return message;
}
catch(Exception e)
{
MessageBox.Show(e.Message);
return "";
}
}