XML::G...nonXML(3pm)

πŸ“¦
version 0.46alpha Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

XML::Grove::AsCanonXML β€” bestie, this one outputs XML objects in canonical XML. Periodt. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so here's the whole vibe, no cap:

use XML::Grove::AsCanonXML;

# Using as_canon_xml method on XML::Grove objects:
$string = $xml_object->as_canon_xml( OPTIONS );

# Using an XML::Grove::AsCanonXML instance:
$writer = XML::Grove::AsCanonXML->new( OPTIONS );

$string = $writer->as_canon_xml($xml_object);
$writer->as_canon_xml($xml_object, $file_handle);

Like… pick your lane, both slay πŸ’…


🌸 DESCRIPTION 🌸

So XML::Grove::AsCanonXML will hand you back a string or write a stream of canonical XML for an XML object and it's content (if any). It's giving ✨ output era ✨.

XML::Grove::AsCanonXML objects are literally just little containers holding the options used for writing the XML objects. You can supply those options when the object gets created:

$writer = XML::Grove::AsCanonXML->new( Comments => 1 );

…or you can change them at any time before writing an XML object by setting the option directly in the $writer hash. So flexible of her 🫢


✨ OPTIONS ✨

  • Comments β€” okay so by default, comments are not written to the output πŸ™ˆ. Setting comment to TRUE will include comments in the output. That's it, that's the whole toggle, iconic πŸ‘‘

πŸ‘‘ AUTHOR πŸ‘‘

Ken MacLeod, ken@bitsko.slc.ut.us πŸ’Œ


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, bestie!! this was perl v5.36.0, dated 2022-11-29, from the XML::G...nonXML(3pm) manual β€” love that for us πŸ’œπŸŽ€ byeee ✨

πŸ“¦ where this page comes from