cpython
d636e3c0 - gh-44871: Improve DOM Level 1 conformance of xml.dom.minidom (#155641)

Commit
12 days ago
gh-44871: Improve DOM Level 1 conformance of xml.dom.minidom (#155641) * The factory methods now raise InvalidCharacterErr if the name is not a valid XML name. * Inserting or setting a node created by another document now raises WrongDocumentErr. * Setting an attribute node which belongs to another element now raises InuseAttributeErr. * Inserting a node into itself or its descendant now raises HierarchyRequestErr. * A document can have only one element child and only one document type child, and a document fragment can no longer have notation children. * Removing an absent attribute now has no effect instead of raising NotFoundErr. * Attributes defaulted in the DTD are no longer omitted when parsing, and Attr.specified now reports whether the attribute was given in the start tag. This needs the new pyexpat method GetSpecifiedAttributeCount(). * EntityReference nodes and Document.createEntityReference() are now implemented. * The exceptions required by the DOM are now documented, and minidom specific differences are described in the minidom documentation. Co-authored-by: Jason Orendorff <283361+jorendorff@users.noreply.github.com>
Parents
Loading