21 Jan 2002 22:10:14 UTC
- Distribution: XML-Filter-XInclude
- Module version: 1.0
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- Testers (195 / 200 / 0)
- KwaliteeBus factor: 0
- 17.59% Coverage
- License: unknown
- Activity24 month
- Download (7.49KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionMSERGEANT Matt Sergeant
XML::Filter::XInclude - XInclude as a SAX Filter
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");
This module implements a simple SAX filter that provides XInclude support. It does NOT support XPointer.
XInclude is very simple, just include something like this in your XML document:
<xi:include href="foo.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
And it will load foo.xml and parse it in the current SAX stream.
If you specify the attribute parse="text", it will be treated as a plain text file, and inserted into the stream as a series of calls to the characters() method.
URI's are supported via LWP.
Currently encoding is not supported.
Matt Sergeant, email@example.com
This is free software, you may use it and distribute it under the same terms as Perl itself.
Module Install Instructions
To install XML::Filter::XInclude, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install XML::Filter::XInclude
For more information on module installation, please visit the detailed CPAN module installation guide.