in reply to Xml::Xslt Examples

If at all possible, I would use XML::LibXSLT, not XML::XSLT. What sort of example do you need? How to use the module, or how to write XSLT? There is an example at Re^5: Removing XML comments with regex. I've also used it as a component of a SAX filter via XML::Filter::XSLT and XML::SAX::Machines.

Replies are listed 'Best First'.
Re^2: Xml::Xslt Examples
by Anonymous Monk on Jan 08, 2008 at 04:17 UTC
    Thanks for replay
    may i know how to use the module
    i already wrote xslt for the xml file i need
    but i dont know how to use it with perl modules
    Thanks

      hi

      If you already installed LibXML and LibXSLT modules, try this

      use strict; use XML::LibXML; use XML::LibXSLT; my $parse = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $xml = $parse->parse_file("test.xml"); my $input = $parse->parse_file ("test.xslt"); my $xslt = $xslt->parse_stylesheet($input); my $result = $xslt->transform($xml); my $html = $xslt->output_string($result); open (REPORT, "> test.html") or die "Can't open test.html $!\n"; print REPORT $html; close (REPORT);

      regards
      Balaji. M