in reply to Re: Xml::Xslt Examples
in thread Xml::Xslt Examples

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

Replies are listed 'Best First'.
Re^3: Xml::Xslt Examples
by msbalaji (Chaplain) on Jan 08, 2008 at 04:38 UTC

    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