Continuing with my explorations of ajax, I was struck with the question of why to use xml as the message structure. It seems that there are two options.
Why not just have the server handle all of that and keep the client a bit dumb and just insert whatever it gets back from the server using element.innerHTML method. This makes development of ajax apps 1000% easier.
The downside of course is that it’s more difficult for other apps to work with the interfaces. If this is something that you want to do with your application, you should probably be looking to expose interfaces explicitly for this purpose. This will allow for monitoring and control of these interactions. Once you’re doing the formatting for html, it’s not that much harder to add a second one for xml on the server side.