Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: xml::writer and xml::LibXML

by runrig (Abbot)
on May 15, 2013 at 16:14 UTC ( #1033708=note: print w/replies, xml ) Need Help??

in reply to xml::writer and xml::LibXML

Doesn't make sense to me. Something else is going on. Try the simplest thing possible:
use strict; use warnings; use XML::Writer; open(my $fh, ">", "tmp.xml") or die "Err: $!"; my $w = XML::Writer->new( OUTPUT => $fh, ); $w->emptyTag('root'); $w->end(); close $fh;

Replies are listed 'Best First'.
Re^2: xml::writer and xml::LibXML
by fionbarr (Friar) on May 15, 2013 at 16:27 UTC
    I don't get the ctrl-z with your file open's what I'm using
    $xml_out = new IO::File(">$filename"); # 'OUTPUT' writes to this file # 'DATA_MODE' writes <CRLF> after each line # 'DATA_INDENT' indents each level four spaces $xml_writer = new XML::Writer( OUTPUT => $xml_out, DATA_MODE => 'true', DATA_INDENT => 4 );
    I'll give your open routine a shot....thanks
      it looks like that did it! Thank you.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033708]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2017-12-18 21:07 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (498 votes). Check out past polls.