GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SVG::Parser::SAX(3) User Contributed Perl Documentation SVG::Parser::SAX(3)

SVG::Parser::SAX - XML SAX Parser for SVG documents

  #!/usr/bin/perl -w
  use strict;
  use SVG::Parser::SAX;

  die "Usage: $0 <file>\n" unless @ARGV;

  my $xml;
  {
      local $/=undef;
      $xml=<>;
  }

  my $parser=new SVG::Parser::SAX(-debug => 1);

  my $svg=$parser->parse($xml);

  print $svg->xmlify;

SVG::Parser::SAX is the SAX-based parser module used by SVG::Parser when an underlying XML::SAX-based parser is selected. It may also be used directly, as shown in the synopsis above.

Use SVG::Parser to retain maximum flexibility as to which underlying parser is chosen. Use SVG::Parser::SAX to supply SAX-specific parser options or where the presence of a functional XML::SAX parser is known and/or preferred.

None. However, a preferred SAX parser implementations can be specified by passing the package name to SVG::Parser::SAX in the import list. For example:

    use SVG::Parser::SAX qw(XML::LibXML::SAX::Parser);

A minimum version number may be additionally suppied as a second import item:

    use SVG::Parser::SAX (XML::LibXML::SAX::Parser => 1.40);

This overrides the automatic selection of a suitable SAX parser. To try several different parsers in turn, use the SVG::Parser module instead and restrict it to only try SAX-based parsers. To make use of the automatic selection mechanism, omit the import list.

When loaded via SVG::Parser, this parent class may be specified by placing it after the '=' in a parser specification:

See SVG::Parser for more details.

See "svgsaxparse" in the examples directory of the distribution.

Peter Wainwright, peter.wainwright@cybrid.net

SVG, SVG::Parser, SVG::Parser::Expat, XML::SAX
2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.