Fast
NAME
XML::Fast - turn XML into a Raku hash in a cheap and cheerful fashion
SYNOPSIS
use JSON::Fast;
use XML::Fast;

my $xml = q:to/END_XML/;
<root>
<person>
<name>John</name>
<age>30</age>
</person>
<person>
<name>Jane</name>
<age>25</age>
</person>
</root>
END_XML

my $json = to-json(from-xml($xml));
say $json;
DESCRIPTION
This is a very simple way of turning XML data into a Raku data structure, it doesn't offer any control over how this is done. Please see the README for an explanation as to why it exists.
There is a single exported function from-xml
which takes either an XML string or a single LibXML::Element
.
There is no to-xml
as this would imply the ability to round-trip the data accurately, too much information is lost about the structure of the original XML to make this meaningful.