class
XML::SAX
- XML::SAX
- Reference
- Object
Overview
Simple API for XML.
Parses XML documents using a push-parser; whenever something is reached, for example an element starts, or a comment is reached, a callback is called with details about the event. Custom handlers can then do anything they want using these information: stream the document while reacting to certain elements and skipping the rest, or build a complete DOM tree, or a partial tree without declarations, comments or processing instructions.
See Handlers for the list of methods that will be called during parsing.
TODO options to enable parsing entities, etc.
Included Modules
Defined in:
sax.crsax/attributes.cr
sax/element_decl.cr
sax/entities.cr
sax/error.cr
sax/handlers.cr
sax/reader.cr
Constructors
Instance Method Summary
- #base : String
- #base=(value : String | Nil)
- #base? : String | Nil
- #ignore_whitespace=(ignore_whitespace : Bool)
- #ignore_whitespace? : Bool
-
#location : Location
Returns the current location.
-
#parse : Nil
Parse IO as a XML document.
- #parse_version_info : String
- #version : Symbol
- #version=(value : Symbol)