Writer

Methods

Indentation

When indentation is enabled, LibXML::Writer will output each element, followed by a newline and output the indentation text times the current indentation level before writing elements and strings.

The writeText() method does not output an extra new-line, but does output indentation text. You will need to ensure the text is followed by a new-line.

The default is a single space character ' '.

Document Methods

Element Methods

$bytes-written = $writer.writeText: 'A&B'; # output: A&B
$bytes-written = $writer.writeCDATA: 'A&B'; # output: <![CDATA[A&B]]>

DTD Methods

The methods below can then be used to add definitions for DTD Elements, Attribute Lists, Entities and Notations, before calling `endDTD`.

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 a trademark of the Yet Another Society. All rights reserved.

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