Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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;


Comment on Re: xml::writer and xml::LibXML
Download Code
Re^2: xml::writer and xml::LibXML
by fionbarr (Pilgrim) 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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2014-09-23 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (240 votes), past polls