SVG::Parser 1.01 review
DownloadSVG::Parser is a Perl module with XML Parser for SVG documents. SYNOPSIS #!/usr/bin/perl -w use strict; use SVG::Parser; d
|
|
SVG::Parser is a Perl module with XML Parser for SVG documents.
SYNOPSIS
#!/usr/bin/perl -w
use strict;
use SVG::Parser;
die "Usage: $0 n" unless @ARGV;
my $xml;
{
local $/=undef;
$xml=;
}
my $parser=new SVG::Parser(-debug => 1);
my $svg=$parser->parse($xml);
print $svg->xmlify;
and:
#!/usr/bin/perl -w
use strict;
use SVG::Parser qw(SAX=XML::LibXML::Parser::SAX Expat SAX);
die "Usage: $0 n" unless @ARGV;
my $svg=SVG::Parser->new()->parsefile($ARGV[0]);
print $svg->xmlify;
SVG::Parser is an XML parser for SVG Documents. It takes XML as input and produces an SVG object as its output.
SVG::Parser supports both XML::SAX and XML::Parser (Expat) parsers, with SAX preferred by default. Only one of these needs to be installed for SVG::Parser to function.
A list of preferred parsers may be specified in the import list - SVG::Parser will use the first parser that successfully loads. Some basic measures are taken to provide cross-compatability. Applications requiring more advanced parser features should use the relevant parser module directly; see SVG::Parser::Expat and SVG::Parser::SAX
Requirements:
Perl
SVG::Parser 1.01 keywords