Yes, very interesting idea. Came across these CPAN modules. They seem to be related to what your trying to do.
* CGI::ToXML
* XML::CGI
Good luck with it :)
Nelo
Smoothie, smoothie, hundre prosent naturlig!
Comment on Re: Going between XML and CGi by way of DTD