Issue #14007: implement doctype() method calling in XMLParser of _elementtree.
Includes exposing a doctype handler from expat through pyexpat.
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index fb02329..a500a1e 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1904,6 +1904,7 @@
capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler;
capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler;
capi.SetUserData = XML_SetUserData;
+ capi.SetStartDoctypeDeclHandler = XML_SetStartDoctypeDeclHandler;
/* export using capsule */
capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL);