Catmandu::Fix::xml_read - parse XML to MicroXML
# parse XML string given in field 'xml' xml_read(xml) xml_read(xml, simple: 1) xml_read(xml, attributes: 0)
This Catmandu::Fix parses XML strings into MicroXML or simple XML with XML::Struct.
Parsing can be configured with the following options of XML::Struct::Reader:
Include XML attributes (enabled by default)
Define processing of XML namespaces (keep by default)
keep
Include ignorable whitespace as text elements (disabled by default)
Convert to simple key-value structure, as known from XML::Simple
Keep (and possibly rename) root element when converting to simple form
simple
Only transform to a given depth with option simple
Parse only given elements (and all of its child elements) and return as array. For instance path => "p" in an XHTML document would return a list of parsed paragraphs (<p>...</p>). This option overrides option root.
path => "p"
<p>...</p>
root
Name of text content when converting to simple form
Catmandu::Fix::xml_write, Catmandu::Fix::xml_simple Catmandu::Fix::xml_transform
To install Catmandu::XML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::XML
CPAN shell
perl -MCPAN -e shell install Catmandu::XML
For more information on module installation, please visit the detailed CPAN module installation guide.