XML::Fi...XInclude(3)

πŸ“¦
version 1.0 Β· 2 versions
, in fedora 43

✨ NAME ✨

XML::Filter::XInclude β€” bestie, it's XInclude but as a SAX Filter πŸ’… (this is the XML::Fi...XInclude(3) page, yes the title got squished, we move)


πŸŽ€ SYNOPSIS πŸŽ€

okay so here's the whole vibe, copy it exactly:

use XML::SAX;
use XML::SAX::Writer;
use XML::Filter::XInclude;

my $parser = XML::SAX::ParserFactory->parser(
    Handler => XML::Filter::XInclude->new(
        Handler => XML::SAX::Writer->new()
    )
);
$parser->parse_uri("foo.xml");

πŸ¦‹ DESCRIPTION πŸ¦‹

So this module is a simple SAX filter that gives you XInclude support. That's the whole job. It does NOT support XPointer β€” not even a little bit, don't ask her πŸ’€

XInclude is genuinely so simple, you just drop something like this into your XML document:

<xi:include href="foo.xml"
  xmlns:xi="http://www.w3.org/2001/XInclude"/>

and boom πŸ’₯ it will load foo.xml and parse it right into the current SAX stream. main character behaviour fr fr.

If you specify the attribute parse="text", then it gets treated as a plain text file instead, and it gets inserted into the stream as a series of calls to the characters() method. yes, a whole series, one after another, that's the move ✨

URI's are supported via LWP 🫢

Currently encoding is not supported. 😭 just so you know going in, no cap.

πŸ‘‘ AUTHOR πŸ‘‘

Matt Sergeant, matt@sergeant.org β€” iconic, we love, periodt πŸ’–


🌈 LICENSE 🌈

This is free software, you may use it and distribute it under the same terms as Perl itself. slay πŸŽ€


and that's the page bestie!! brought to you by perl v5.42.0, dated 2025-07-25 β€” go forth and include ur files, iykyk πŸ¦‹πŸ’œπŸŒΈ

πŸ“¦ where this page comes from