GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


NAME

       XML::SAX2Perl -- translate Java/CORBA style SAX methods to Perl methods

SYNOPSIS

        use XML::SAX2Perl;

        $sax2perl = XML::SAX2Perl(Handler => $my_handler);
        $sax->setDocumentHandler($sax2perl);

DESCRIPTION

       "XML::SAX2Perl" is a SAX filter that translates Java/CORBA style SAX
       methods to Perl style method calls.  This man page summarizes the
       specific options, handlers, and properties supported by
       "XML::SAX2Perl"; please refer to the Perl SAX standard "XML::SAX" for
       general usage information.

METHODS

       new Creates a new parser object.  Default options for parsing,
           described below, are passed as key-value pairs or as a single hash.
           Options may be changed directly in the parser object unless stated
           otherwise.  Options passed to `"parse()"' override the default
           options in the parser object for the duration of the parse.

       parse
           Parses a document.  Options, described below, are passed as key-
           value pairs or as a single hash.  Options passed to `"parse()"'
           override default options in the parser object.

       location
           Returns the location as a hash:

             ColumnNumber    The column number of the parse.
             LineNumber      The line number of the parse.
             PublicId        A string containing the public identifier, or undef
                             if none is available.
             SystemId        A string containing the system identifier, or undef
                             if none is available.

       SAX DocumentHandler Methods
           The following methods are DocumentHandler methods that the SAX 1.0
           parser will call and "XML::SAX2Perl" will translate to Perl SAX
           methods calls.  See SAX 1.0 for details.

            setDocumentLocator(locator)
            startDocument()
            endDocument()
            startElement(name, atts)
            endElement(name)
            characters(ch, start, length)
            ignorableWhitespace(ch, start, length)
            processingInstruction(target, data)

OPTIONS

       The following options are supported by "XML::SAX2Perl":

        Handler          default handler to receive events
        DocumentHandler  handler to receive document events
        DTDHandler       handler to receive DTD events
        ErrorHandler     handler to receive error events
        EntityResolver   handler to resolve entities
        Locale           locale to provide localisation for errors
        Source           hash containing the input source for parsing

       If no handlers are provided then all events will be silently ignored,
       except for `"fatal_error()"' which will cause a `"die()"' to be called
       after calling `"end_document()"'.

       If a single string argument is passed to the `"parse()"' method, it is
       treated as if a `"Source"' option was given with a `"String"'
       parameter.

       The `"Source"' hash may contain the following parameters:

        ByteStream       The raw byte stream (file handle) containing the
                         document.
        String           A string containing the document.
        SystemId         The system identifier (URI) of the document.
        PublicId         The public identifier.
        Encoding         A string describing the character encoding.

       If more than one of `"ByteStream"', `"String"', or `"SystemId"', then
       preference is given first to `"ByteStream"', then `"String"', then
       `"SystemId"'.

HANDLERS

       The following handlers and properties are supported by "XML::SAX2Perl":

   DocumentHandler methods
       start_document
           Receive notification of the beginning of a document.

            Locator          An object that can return the location of any SAX
                             document event.

       end_document
           Receive notification of the end of a document.

           No properties defined.

       start_element
           Receive notification of the beginning of an element.

            Name             The element type name.
            Attributes       Attributes attached to the element, if any.

           ALPHA WARNING: The `"Attributes"' value is not translated from the
           SAX 1.0 value, so it will contain an AttributeList object.

       end_element
           Receive notification of the end of an element.

            Name             The element type name.

       characters
           Receive notification of character data.

            Data             The characters from the XML document.

       ignorable_whitespace
           Receive notification of ignorable whitespace in element content.

            Data             The characters from the XML document.

       processing_instruction
           Receive notification of a processing instruction.

            Target           The processing instruction target.
            Data             The processing instruction data, if any.

AUTHOR

       Ken MacLeod <ken@bitsko.slc.ut.us>

SEE ALSO

       perl(1), XML::Perl2SAX(3).

        Extensible Markup Language (XML) <http://www.w3c.org/XML/>
        Simple API for XML (SAX) <http://www.megginson.com/SAX/>



  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to webmaster@gnu.wiki.
Page load time: 0.123 seconds. Last modified: November 04 2018 12:49:43.