File

[Raku LibXML Project] / [LibXML-Writer Module] / Writer :: File

class LibXML::Writer::File

Stream to an external file

Synopsis

use LibXML::Writer::File;
use File::Temp;
my (Str:D $file) = tempfile();
my LibXML::Writer::File $writer .= new: :$file;

$writer.startDocument();
$writer.startElement('Baz');
$writer.endElement;
$writer.endDocument;
$writer.close;
my $io = $file.IO;
say $io.lines.join;  # <?xml version="1.0" encoding="UTF-8"?><Baz/>;

Description

This output class enables efficient low-memory streaming of an XML document directly to a file.

LibXML::Writer v0.0.1

Raku bindings to the libxml2 streaming writer

Authors

  • David Warring

License

Artistic-2.0

Dependencies

LibXML:ver<0.9.5+>

Test Dependencies

Provides

  • LibXML::Raw::TextWriter
  • LibXML::Writer
  • LibXML::Writer::Buffer
  • LibXML::Writer::Document
  • LibXML::Writer::File
  • LibXML::Writer::Node
  • LibXML::Writer::PushParser

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.