Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2016-10-23 08:15 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (300 votes). Check out past polls.