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`.