------------------------------------------------ On 28 Aug 2003 07:13:38 -0500, Joe Mecklin <[EMAIL PROTECTED]> wrote:
> I'm beginning my studies of XML and am looking for a Perl module(s) that > allows me to be able to dynamically generate the XML along with any data > and display it on the fly, as I now do with HTML. What I've seen so far > seems to require writing the XML and associated data to an external file > - an additional step I'd rather not have to do. > > If i try to simply write the XML in print statements, the browser > parsers can't seem to interpret it correctly, presumably because the > "<xml ..." is not the very first line in the Perl program. > > Any leads as to which modules would be best will be greatly appreciated. > Most of my XML needs to date have been satisfied with the XML::Simple module. It allows the conversion from complex Perl structures to XML and back again using files or filehandles. There are a lot of options for controlling how the XML is generated, what is quoted, what becomes tags, etc. I am not sure about the document type line, but in most cases you should be able to print that standalone and then have the rest follow it... In general it builds on other more complex modules XML::Parser, XML::SAX, etc. so if you don't find the functionality you need with it check out one of those. There is also an excellent O'Reilly book designed specifically around this topic and it covers the major XML parsers, though it might be out of date as fast as they change. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]