use XML::Xalan; my $tr = new XML::Xalan::Transformer; # parse an XML string: my $parsed = $tr->parse_string(<<"XML"); Hello XML # compile a stylesheet string: my $compiled = $tr->compile_stylesheet_string(<<"XSLT"); XSLT my $res = $tr->transform_to_data($parsed, $compiled);