XML

Overview

XML format backend for Qwiratry, powered by XML.

Defines Qwiratry::Format::XML::Parse and Qwiratry::Format::XML::Render implementations loaded through Qwiratry::Format.make.

The parser returns an XML::Document tree (elements, text, attributes, and related node types). Invalid XML fails hard (throws) so callers and the format conformance kit can treat parse errors uniformly.

Tree queries over those documents use Qwiratry::Tree::Navigator::XML, which this distribution also provides: element children via < āŖŖ >, attributes via ā„·, and parents via the XML node model.

The renderer accepts XML::Document or XML::Element values and emits XML text. %options<encoding> sets the XML declaration encoding (for example UTF-8); when omitted, an existing document encoding is preserved.

Methods

parse(Str $input-string)

Parse XML text into an XML::Document using XML.

render(Mu $data, Associative :%options)

Render an XML::Document or XML::Element to XML text.

%options<encoding> optionally sets the XML declaration encoding. Element inputs are wrapped in a document so the output includes an XML declaration.

Qwiratry::Format::XML v0.0.1

XML format backend for Qwiratry using XML

Authors

    License

    Dependencies

    Test Dependencies

    Provides

    • Qwiratry::Format::XML
    • Qwiratry::Tree::Navigator::XML

    Documentation

    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.