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 procedure....here'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.