XML::Handler::CanonXMLWriter(3pm)

XML::Handler::CanonXMLWriter3pm

Output xml in canonical xml format

Usage

 use XML::Handler::CanonXMLWriter;
 $writer = XML::Handler::CanonXMLWriter OPTIONS;
 $parser->parse(Handler => $writer);

Overview

"XML::Handler::CanonXMLWriter" is a PerlSAX handler that will return a string or write a stream of canonical XML for an XML instance and it's content.

"XML::Handler::CanonXMLWriter" objects hold the options used for writing the XML objects. Options can be supplied when the the object is created,

    $writer = new XML::Handler::CanonXMLWriter PrintComments => 1;

or modified at any time before calling the parser's `parse()' method:

    $writer->{PrintComments} = 0;

Options

IOHandle

IOHandle contains a handle for writing the canonical XML to. If an IOHandle is not provided, the canonical XML string will be returned from `parse()'.

PrintComments

By default comments are not written to the output. Setting comment to a true value will include comments in the output.

Releases

14 releases since Debian 2.2 (Potato); the text changed 7 times.

  1. 2.2
  2. 3.0
  3. 3.1–5.0
  4. 6.0–9
  5. 10
  6. 11
  7. 12–13
  8. Arch

Author

Ken MacLeod, [email protected]

From libxml-perl 0.08-9 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.