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, IO::Handle $ioh) = tempfile();
my LibXML::Writer::File $writer .= new: :$file;

$writer.startDocument();
$writer.startElement('Baz');
$writer.endElement;
$writer.endDocument;
$writer.close;
say $ioh.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.

Note that if '-' is used as a filename, output is streamed to standard-output.

LibXML::Writer v0.0.5

Raku bindings to the libxml2 streaming writer

Authors

  • David Warring

License

Artistic-2.0

Dependencies

LibXML:ver<0.11.0+>

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.

Built with Podlite — the markup and publishing tools behind this site.