Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/libxml-raku/libxml-writer-raku
Raku bindings to the libxml2 streaming writer
https://github.com/libxml-raku/libxml-writer-raku
Last synced: about 2 months ago
JSON representation
Raku bindings to the libxml2 streaming writer
- Host: GitHub
- URL: https://github.com/libxml-raku/libxml-writer-raku
- Owner: libxml-raku
- License: artistic-2.0
- Created: 2023-02-02T17:21:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T20:56:02.000Z (4 months ago)
- Last Synced: 2024-09-14T11:55:29.556Z (4 months ago)
- Language: Raku
- Size: 85 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
LibXML-Writer-raku
=======Synopsis
-------
```raku
use LibXML::Writer::Buffer; # String or buffer output
my LibXML::Writer::Buffer:D $writer .= new;$writer.startDocument( :enc , :version<1.0>, :standalone);
$writer.startElement('Test');
$writer.writeAttribute('id', 'abc123');
$writer.writeText('Hello world!');
$writer.endElement();
$writer.endDocument();
say $writer.Str;
#
# Hello world!# write an AST fragment
$writer .= new;
$writer.write: "Test" => [:id, 'Hello world!'];
say $writer.Str;
# Hello world!
```Description
------This module binds to the libxml2 Writer interface. It can be used to construct full XML
documents or XML fragments.It offers:
- an alternative to the W3C DOM for constructing XML documents
- the ability to stream to files, buffers or strings without the need to create an intermediate XML document
- fast concurrent construction of LibXML document fragments and sub-treesThe API is documented in [LibXML::Writer](https://libxml-raku.github.io/LibXML-Writer-raku/Writer)
Classes
----This module has several output classes:
* [LibXML::Writer::Buffer](https://libxml-raku.github.io/LibXML-Writer-raku/Writer/Buffer) - String or buffer output
* [LibXML::Writer::Document](https://libxml-raku.github.io/LibXML-Writer-raku/Writer/Document) - Construction of LibXML Documents
* [LibXML::Writer::Node](https://libxml-raku.github.io/LibXML-Writer-raku/Writer/Node) - Construction of Document Sub-trees or Fragments
* [LibXML::Writer::PushParser](https://libxml-raku.github.io/LibXML-Writer-raku/Writer/PushParser) - Construction of LibXML documents via LibXML::PushParser
* [LibXML::Writer::File](https://libxml-raku.github.io/LibXML-Writer-raku/Writer/File) - Direct file output