Catman...er::XML(3pm)

πŸ“¦
version 0.17 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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