exarkun at divmod.com
Thu Jan 25 22:08:35 EST 2007
On Thu, 25 Jan 2007 21:57:32 -0500, Lee Connell <lee.a.connell at gmail.com> wrote:
>I have been looking all night and I can’t find any examples of using simple
>xml to write my own xml protocol for a chat server I intend to build. All I
>want to do is generate XML from commands and send it across the socket and
>receive it on the other end and unpack it. Any recommendations on what to
>use and any tutorials or examples on how to do it. I don’t know a whole lot
>about XML programming, just it’s basic structure.
Rather than developing a new protocol, have you considered using an existing
general purpose protocol to accomplish your goals?
For example, XMPP is an XML-based protocol which is already implemented in
Twisted. You could use it to send messages.
Also, why are you interested in XML specifically? Netstrings, AMP, or PB
might also be suitable.
Almost certainly, at least one of these is suited for the problem you are
trying to solve, and it is always beneficial to avoid implementing a new
protocol when possible.
More information about the Twisted-Python