Templa...L::File(3pm)

πŸ“¦
version 2.17 Β· 2 versions
  • 2.17 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 2.17 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ Template::Plugin::XML::File ✨

ok so bestie, this is a Template Toolkit plugin for XML files πŸ’– β€” it's Template::Plugin::XML::File from the User Contributed Perl Documentation, and honestly? she's giving "the XML file just vibes in your template" and we're obsessed πŸŽ€


🌸 SYNOPSIS 🌸

so there's like... multiple ways to hand her an XML file name, and she does not judge, she accepts them all 🫢

# different want to specify an XML file name
[% USE xf = XML.File( filename ) %]
[% USE xf = XML.File( file     = filename ) %]
[% USE xf = XML.File( name     = filename ) %]
[% USE xf = XML.File( xml_file = filename ) %]

and if you're more of a file-handle girlie, she's got you too πŸ’…

# different want to specify an XML file handle
[% USE xf = XML.File( handle ) %]
[% USE xf = XML.File( fh       = handle ) %]
[% USE xf = XML.File( handle   = handle ) %]
[% USE xf = XML.File( xml_fh   = handle ) %]

and then you can just... peek at what she's holding πŸ‘€

[% xf.type   %]   # 'name' or 'handle'
[% xf.name   %]   # filename (if defined)
[% xf.handle %]   # file handle (if defined)

like, xf.type tells you whether she's running on a 'name' or a 'handle', xf.name gives you the filename if defined, and xf.handle gives you the file handle if defined. slay. 🌟


πŸ¦‹ DESCRIPTION πŸ¦‹

TODO

ngl bestie the docs said TODO here, so that's literally all there is. no cap. πŸ™ˆ

πŸ’… METHODS πŸ’…

TODO

yeah... also TODO. the author said "figure it out" and honestly? iconic behaviour. ✨

πŸ‘‘ AUTHORS πŸ‘‘

Andy Wardley, Mark Fowler and others... πŸ’–

we love a collaborative moment fr fr 🫢


TODO

yes, another TODO. it's giving "left as an exercise for the reader". 😭

⭐ SEE ALSO ⭐

go off and read these too, they're all part of the same little family 🌈

  • Template
  • Template::Plugins
  • Template::Plugin::XML::DOM
  • Template::Plugin::XML::RSS
  • Template::Plugin::XML::Simple
  • Template::Plugin::XML::XPath

and that's the whole thing bestie πŸ’œ this lil page came from perl v5.34.0 and was last touched on 2022-07-04 β€” go forth and parse some XML, you main character πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from