string pubcommand = "CHAT|" + clientname +": "+ChatOut.Text + "\r\n";
Byte[] outbytes = System.Text.Encoding.ASCII.GetBytes(pubcommand.ToCharArray());
ns.Write(outbytes,0,outbytes.Length);
ChatOut.Text = "";
--------------------------------------------
Byte[] buffer = new Byte[2048];
ns.Read(buffer,0,buffer.Length);
string chatter = System.Text.Encoding.ASCII.GetString(buffer);
string[] tokens = chatter.Split(new Char[]{'|'});
--------------------------------------------
如果我在发送端采用XML格式,如:
string  pubcommand  =  "  <message  >  <note  >  "  +  chat  +    "  </note  >  <name  >  "  +  clientname  +    "  </name  >  <text  >  "  +  chatout.Text  +    "  </text  >  </message  >;  
那么在接受端如何解析?麻烦大家根据上面的代码,给个详细说明,谢谢
 "