The following methods are defined by XML::Parser.
new(%option)
Constructor. Options are passed as keyword/value pairs. Recognized options are:
parse(source [, opt => opt_value [...]])
Parses the document. The source parameter should be either a string containing the entire XML document or an open IO::Handle. Options given as keyword/value pairs may follow the source parameter and will override any options or attributes passed from the XML::Parser instance.
parse exits with die if a parse error occurs or returns 1 with success.
parsefile(file [, opt => opt_value [...]])
Opens file for reading, then calls parse with the open handle. The file is closed no matter what parse returns. Returns what parse returns.
parse_start([ opt => opt_value [...]])
Creates and returns a new instance of XML::Parser::ExpatNB. If an init handler is specified, it is called before returning the ExpatNB object. Documents are parsed with incremental calls to the parse_more. A single call to the parse_done method of this object indicates that the document is finished. The parse_done method returns whatever is returned by the final handler.
parsestring
An alias for parse, for backwards compatibility.
setHandlers(type, handler [, type, handler [...]])
Registers handlers for various parser events. setHandlers overrides any previous handlers set in Style or Handler options or through earlier calls to setHandlers. Returns a list of type and handler pairs.
Copyright © 2002 O'Reilly & Associates. All rights reserved.