Template::XML(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::XML β€” XML plugins for the Template Toolkit πŸ¦‹

okay bestie, so this is Template::XML, and it lives in the User Contributed Perl Documentation section of the manual (that's the 3pm part, iykyk). it's giving "i have a whole little ecosystem of XML plugins and i'm gonna tell you about every single one." πŸ’–


✨ SYNOPSIS ✨

[% USE XML;

   dom    = XML.dom('foo.xml');
   xpath  = XML.xpath('bar.xml');
   simple = XML.simple('baz.xml');
   rss    = XML.simple('news.rdf');
%]

look at that. five lines and you're already doing the most. 🫢


🌸 DESCRIPTION 🌸

so the Template-XML distribution ships a whole lil' friend group of Template Toolkit plugin modules for working with XML. no cap.

Template::Plugin::XML is the front-end β€” the main character, honestly πŸ‘‘ β€” that hooks you up with all the other XML plugin modules. through it you can access XML files, and even whole directories of XML files, via Template::Plugin::XML::File and Template::Plugin::XML::Directory (and bestie, those two subclass from Template::Plugin::File and Template::Plugin::Directory respectively, just so you know the family tree).

and then, once you've got your hands on some XML, you can:

  • build a Document Object Model (DOM) out of an XML file with Template::Plugin::XML::DOM
  • poke around inside it using XPath queries with Template::Plugin::XML::XPath
  • turn it into a plain ol' Perl data structure with Template::Plugin::XML::Simple
  • or just parse it as an RSS (RDF Site Summary) file. slay.
πŸ’€ history lesson time, because it's actually kind of iconic: the basic XML plugins used to be bundled inside the Template Toolkit itself, all the way up until version 2.15, which dropped in May 2006. at that point they got extracted out into this separate Template-XML distribution, and an alpha version of this very Template::Plugin::XML front-end module got added to the mix. glow-up era. ✨

πŸ’œ AUTHORS πŸ’œ

give it up for the whole squad, fr fr:

  • Andy Wardley wrote the Template Toolkit plugin modules β€” with assistance from Simon Matthews in the case of the XML::DOM plugin. 🫢
  • Matt Sergeant</c> wrote the XML::XPath module.
  • Enno Derksen and Clark Cooper wrote the XML::DOM module.
  • Jonathan Eisenzopf wrote the XML::RSS module.
  • Grant McLean wrote the XML::Simple module.
  • Clark Cooper and Larry Wall wrote the XML::Parser module.
  • James Clark wrote the expat library. πŸ”₯

Copyright (C) 1996-2006 Andy Wardley. All Rights Reserved.

this module is free software, bestie β€” you can redistribute it and/or modify it under the same terms as Perl itself. so go off. πŸ’…


🌈 SEE ALSO 🌈

the whole extended universe, go read them all:

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

and that's the page, babe πŸ¦‹ this one was perl v5.34.0 flavored and dated 2022-07-04 β€” so if your install says otherwise, don't come for me, that's just what the footer said. mwah. πŸ’–βœ¨

πŸ“¦ where this page comes from