I don't think anybody here is forgetting that MXP isn't XML, just lamenting the fact that Zugg knew of XML's existence and yet still chose to ignore some of the most important parts, before then writing an inconsistent spec to describe his creation.
My current plan is to buffer data as it comes in, and flush it after every new line, every ANSI sequence, and the end of every block of data read from the network. The last one isn't technically correct but is necessary since few muds I'm aware of will send a Go-Ahead for their prompts by default. I'll then attempt to process MXP tags in the buffer before committing the results to the output window.
Or maybe I'll just abandon MXP support altogether if that doesn't work out well enough! ZMP is easier to implement and to extend to cover everything that MXP does.
|