Catman...er::XML(3pm)
π Catmandu::Exporter::XML π
okay bestie, so this is a Perl manual page (a 3pm one, from the User Contributed Perl Documentation collection) and it's all about Catmandu::Exporter::XML. Yes the title up top looks like somebody sat on the keyboard, but it's literally just Catmandu::Exporter::XML(3pm). We move. π«Ά
β¨ NAME β¨
Catmandu::Exporter::XML β serialize and export XML documents π
πΈ DESCRIPTION πΈ
This Catmandu::Exporter exports items that have been serialized as XML. The serialization is implemented on top of XML::Struct::Writer::Stream. And by default? Every single item gets written straight to STDOUT. No cap. β¨
π CONFIGURATION π
attributes
xmldecl
encoding
version
standalone
pretty
okay so all six of those up there π get passed along to XML::Struct::Writer. And the target β which is the option called "to" β is based on Catmandu::Exporter's own option "fh" or "file". iykyk π
field
This one takes XML from a given field of each item. Like, say you've got field "xml", then it looks like this:
{ xml => [ root => { xmlns => 'http://example.org/' }, [ ... ] ] }
slay. π¦
directory
Serialize to multiple files inside a given directory. very main character energy, one file per item, obsessed. π
filename
This is the field to take filenames from if option "directory" is set. It defaults to "_id". And heads up bestie: the file extension ".xml" gets appended unless it's already given. β
fr fr, don't forget: the extension thing only kicks in when you haven't already put one there. π
and that's the whole page, bestie! this lil doc is from perl v5.36.0, dated 2022-09-15, and it lives under the Catmandu::Exporter::XML(3pm) banner in the User Contributed Perl Documentation. periodt. ππ
π¦ where this page comes from
- ubuntu noble: libcatmandu-xml-perl 0.17-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-xml-perl 0.17-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-xml-perl 0.17-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms