diff -r a3cc83281bb8 -r 4570d6616c99 doc/us/manual.html --- a/doc/us/manual.html Thu Jun 02 16:27:59 2011 +0100 +++ b/doc/us/manual.html Thu Jun 02 16:29:50 2011 +0100 @@ -175,6 +175,13 @@
Set the encoding to be used by the parser. There are four built-in encodings, passed as strings: "US-ASCII", "UTF-8", "UTF-16", and "ISO-8859-1".
+ +
parser:stop()
+
Abort the parser and prevent it from parsing any further + through the data it was last passed. Use to halt parsing the + document when an error is discovered inside a callback, for + example. The parser object cannot accept more data after + this call.

Callbacks

@@ -198,7 +205,8 @@ ExternalEntityRef, NotStandalone, NotationDecl, ProcessingInstruction, StartCDataSection, StartElement, -StartNamespaceDecl, and UnparsedEntityDecl.

+StartNamespaceDecl, UnparsedEntityDecl +and StartDoctypeDecl.

These indices can be references to functions with specific signatures, as seen below. The parser constructor also @@ -337,6 +345,15 @@ For this example the publicId parameter would be nil. The base parameter would be whatever has been set with parser:setbase. If not set, it would be nil. + +

callbacks.StartDoctypeDecl = function(parser, name, sysid, pubid, has_internal_subset)
+
Called when the parser detects the beginning of an XML + DTD (DOCTYPE) section. These precede the XML root element and take + the form: +
+<!DOCTYPE root_elem PUBLIC "example">
+
+

The separator character