Several statements in the documentation of xml.sax do not match the behaviour, and a part of the API is not documented.
- The keyword argument of
parse() and parseString() is errorHandler, not error_handler, so the documented name raises TypeError.
- The default value of the parser_list argument of
make_parser() is (), not [].
- The source of
parse() can also be a system identifier, which is opened as a URL if it does not refer to an existing file.
- The type of the declaration-handler property is given as
xml.sax.sax2lib.DeclHandler, which does not exist, and the type of the dom-node property as the Java org.w3c.dom.Node.
- Names are interned in a dictionary, not with a built-in
intern function, which Python 3 does not have.
IncrementalParser is said to add three methods, but it adds four, and its parse() implementation uses prepareParser(), feed() and close(), not reset().
default_parser_list, SAXReaderNotAvailable, property_encoding, property_interning_dict, IncrementalParser.prepareParser(), XMLFilterBase.getParent() and setParent() are not documented.
- It is not said that the parser based on Expat does not support the namespace-prefixes, validation and external-parameter-entities features, nor the declaration-handler, dom-node and encoding properties.
parse(), parseString(), AttributesImpl and XMLGenerator have no docstrings.
Linked PRs
Several statements in the documentation of
xml.saxdo not match the behaviour, and a part of the API is not documented.parse()andparseString()iserrorHandler, noterror_handler, so the documented name raisesTypeError.make_parser()is(), not[].parse()can also be a system identifier, which is opened as a URL if it does not refer to an existing file.xml.sax.sax2lib.DeclHandler, which does not exist, and the type of the dom-node property as the Javaorg.w3c.dom.Node.internfunction, which Python 3 does not have.IncrementalParseris said to add three methods, but it adds four, and itsparse()implementation usesprepareParser(),feed()andclose(), notreset().default_parser_list,SAXReaderNotAvailable,property_encoding,property_interning_dict,IncrementalParser.prepareParser(),XMLFilterBase.getParent()andsetParent()are not documented.parse(),parseString(),AttributesImplandXMLGeneratorhave no docstrings.Linked PRs