DOM serialization

use XML;
use XML::Writer;

say my $document = XML::Document.new(
    XML::Writer.serialize( :root[ :element['Some text here', ], ] )
);
<?xml version="1.0"?><root><element>Some text here</element></root>

Last updated