-
Notifications
You must be signed in to change notification settings - Fork 0
SaxPushParser
libxmljs provides a SAX2 push parser interface that accepts chunks of data. SaxPush parser inherits from EventEmitter to emit parse events.
Instantiate a new SaxParser
Push a chunk of data into the parserreturn: boolean. true if no errors, false otherwise
args string - a string representing the document to parse
Emitted at the start of a document
Emitted at the end of the document parse
Emitted on an open element tag
args elem - a string representing the element name attrs - an array of arrays:
[[key, prefix, uri, value]]prefix - a string representing the namespace prefix of the element uri - the namespace URI of the element namespaces - an array of arrays:[[prefix, uri]]
Emitted at the close of an element
args elem - a string representing the element name prefix - a string representing the namespace prefix of the element uri - the namespace URI of the element
Emitted when a set of content characters is encountered
args chars - a string of characters
Emitted when a CDATA is encountered
args cdata - a string representing the CDATA
Emitted when a comment is encountered
args msg - a string representing the comment
Emitted when a warning is encountered
args msg - a string representing the warning message
Emitted when an error is encountered
args msg - a string representing the error message