Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Do you know where your variables are?
 
PerlMonks  

Re^3: Unwanted <?xml> tags with Lib::XSLT

by aeolai (Initiate)
on Jul 05, 2012 at 22:53 UTC ( #980176=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Unwanted <?xml> tags with Lib::XSLT
in thread Unwanted <?xml> tags with Lib::XSLT

Eventually found the answer. Storing the result of $stylesheet->transform() and using $stylesheet->output_file() fixes this issue, e.g:

use Lib::XSLT; my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $source = XML::LibXML->load_xml(location => "$xmlFile"); my $style_doc = $parser->parse_file(Path::Class::File->new("$xsltFile" +)); my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source); $stylesheet->output_file($results, $outputFile);


Comment on Re^3: Unwanted <?xml> tags with Lib::XSLT
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://980176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2013-06-19 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many continents have you visited?









    Results (675 votes), past polls