How can I generate XML using Perl and XSLT?

I want to generate XML file using Perl and XSLT. Is it possible to achieve this by updating the XSLT dynamically by firing values ​​from a hash?

Or is there a better solution for wirting a simple XML file using Perl?

+2


a source to share


2 answers


The answer is "It depends", but in general "simple" XML can be printed directly from Perl data structures using the XML :: Simple module XMLOut.

For more complex use of XML :: Writer.



You can read more about XML processing in Perl (including printing it) in Perl and in the O'Reilly XML book - for examples see chapter 3 on the web (XML :: Writer part): http://oreilly.com/catalog/ perlxml / chapter / ch03.html

Also see the Perl-XML FAQ: http://perl-xml.sourceforge.net/faq/

+2


a source


XSLT is not meant to generate XML, but simply to transform XML. There compares the XML interfaces available to Perl on the O'Reily XML site



+1


a source







All Articles