lxml 5.3.2__cp313-cp313-macosx_10_13_universal2.whl → 6.0.0__cp313-cp313-macosx_10_13_universal2.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lxml/__init__.py +1 -1
- lxml/_elementpath.cpython-313-darwin.so +0 -0
- lxml/_elementpath.py +3 -1
- lxml/apihelpers.pxi +25 -17
- lxml/builder.cpython-313-darwin.so +0 -0
- lxml/builder.py +11 -0
- lxml/debug.pxi +0 -54
- lxml/etree.cpython-313-darwin.so +0 -0
- lxml/etree.h +24 -28
- lxml/etree.pyx +154 -33
- lxml/etree_api.h +59 -50
- lxml/extensions.pxi +3 -6
- lxml/html/__init__.py +7 -3
- lxml/html/_difflib.cpython-313-darwin.so +0 -0
- lxml/html/_difflib.py +2106 -0
- lxml/html/builder.py +40 -0
- lxml/html/defs.py +3 -3
- lxml/html/diff.cpython-313-darwin.so +0 -0
- lxml/html/diff.py +406 -312
- lxml/includes/etree_defs.h +6 -6
- lxml/includes/libexslt/exsltconfig.h +3 -3
- lxml/includes/libxml/HTMLparser.h +41 -45
- lxml/includes/libxml/HTMLtree.h +1 -0
- lxml/includes/libxml/SAX.h +2 -186
- lxml/includes/libxml/SAX2.h +2 -3
- lxml/includes/libxml/c14n.h +1 -12
- lxml/includes/libxml/catalog.h +1 -0
- lxml/includes/libxml/debugXML.h +0 -138
- lxml/includes/libxml/encoding.h +131 -59
- lxml/includes/libxml/entities.h +12 -20
- lxml/includes/libxml/globals.h +0 -16
- lxml/includes/libxml/hash.h +19 -0
- lxml/includes/libxml/list.h +2 -2
- lxml/includes/libxml/nanoftp.h +3 -173
- lxml/includes/libxml/nanohttp.h +17 -0
- lxml/includes/libxml/parser.h +505 -256
- lxml/includes/libxml/parserInternals.h +26 -98
- lxml/includes/libxml/relaxng.h +7 -2
- lxml/includes/libxml/threads.h +0 -6
- lxml/includes/libxml/tree.h +61 -97
- lxml/includes/libxml/uri.h +11 -0
- lxml/includes/libxml/valid.h +49 -14
- lxml/includes/libxml/xinclude.h +12 -0
- lxml/includes/libxml/xlink.h +4 -0
- lxml/includes/libxml/xmlIO.h +33 -35
- lxml/includes/libxml/xmlautomata.h +19 -2
- lxml/includes/libxml/xmlerror.h +32 -18
- lxml/includes/libxml/xmlexports.h +61 -15
- lxml/includes/libxml/xmlmemory.h +27 -64
- lxml/includes/libxml/xmlmodule.h +4 -0
- lxml/includes/libxml/xmlreader.h +13 -3
- lxml/includes/libxml/xmlregexp.h +7 -106
- lxml/includes/libxml/xmlsave.h +15 -1
- lxml/includes/libxml/xmlschemas.h +10 -5
- lxml/includes/libxml/xmlunicode.h +3 -190
- lxml/includes/libxml/xmlversion.h +15 -194
- lxml/includes/libxml/xmlwriter.h +1 -0
- lxml/includes/libxml/xpath.h +9 -15
- lxml/includes/libxml/xpathInternals.h +9 -3
- lxml/includes/libxml/xpointer.h +1 -91
- lxml/includes/libxslt/xsltconfig.h +6 -6
- lxml/includes/lxml-version.h +1 -1
- lxml/includes/tree.pxd +10 -12
- lxml/includes/xmlparser.pxd +46 -8
- lxml/lxml.etree.h +24 -28
- lxml/lxml.etree_api.h +59 -50
- lxml/objectify.cpython-313-darwin.so +0 -0
- lxml/objectify.pyx +11 -7
- lxml/parser.pxi +106 -47
- lxml/sax.cpython-313-darwin.so +0 -0
- lxml/sax.py +11 -0
- lxml/saxparser.pxi +14 -14
- lxml/schematron.pxi +8 -3
- lxml/serializer.pxi +71 -3
- lxml/xslt.pxi +10 -3
- lxml-6.0.0.dist-info/METADATA +163 -0
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/RECORD +81 -79
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/WHEEL +2 -1
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSE.txt +3 -1
- lxml-5.3.2.dist-info/METADATA +0 -100
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSES.txt +0 -0
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/top_level.txt +0 -0
lxml/etree_api.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Generated by Cython 3.
|
1
|
+
/* Generated by Cython 3.1.2 */
|
2
2
|
|
3
3
|
#ifndef __PYX_HAVE_API__lxml__etree
|
4
4
|
#define __PYX_HAVE_API__lxml__etree
|
@@ -98,19 +98,26 @@ static void (*__pyx_api_f_4lxml_5etree_initTagMatch)(struct LxmlElementTagMatche
|
|
98
98
|
#define initTagMatch __pyx_api_f_4lxml_5etree_initTagMatch
|
99
99
|
static xmlNs *(*__pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix)(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *) = 0;
|
100
100
|
#define findOrBuildNodeNsPrefix __pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix
|
101
|
-
|
102
|
-
|
103
|
-
|
101
|
+
static int __Pyx_ImportFunction_3_1_2(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
|
102
|
+
|
103
|
+
#ifndef __PYX_HAVE_RT_ImportFunction_3_1_2
|
104
|
+
#define __PYX_HAVE_RT_ImportFunction_3_1_2
|
105
|
+
static int __Pyx_ImportFunction_3_1_2(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
|
104
106
|
PyObject *d = 0;
|
105
107
|
PyObject *cobj = 0;
|
106
108
|
union {
|
107
109
|
void (*fp)(void);
|
108
110
|
void *p;
|
109
111
|
} tmp;
|
110
|
-
d = PyObject_GetAttrString(module,
|
112
|
+
d = PyObject_GetAttrString(module, "__pyx_capi__");
|
111
113
|
if (!d)
|
112
114
|
goto bad;
|
115
|
+
#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000)
|
116
|
+
PyDict_GetItemStringRef(d, funcname, &cobj);
|
117
|
+
#else
|
113
118
|
cobj = PyDict_GetItemString(d, funcname);
|
119
|
+
Py_XINCREF(cobj);
|
120
|
+
#endif
|
114
121
|
if (!cobj) {
|
115
122
|
PyErr_Format(PyExc_ImportError,
|
116
123
|
"%.200s does not export expected C function %.200s",
|
@@ -128,9 +135,11 @@ static int __Pyx_ImportFunction_3_0_12(PyObject *module, const char *funcname, v
|
|
128
135
|
if (!(*f))
|
129
136
|
goto bad;
|
130
137
|
Py_DECREF(d);
|
138
|
+
Py_DECREF(cobj);
|
131
139
|
return 0;
|
132
140
|
bad:
|
133
141
|
Py_XDECREF(d);
|
142
|
+
Py_XDECREF(cobj);
|
134
143
|
return -1;
|
135
144
|
}
|
136
145
|
#endif
|
@@ -140,51 +149,51 @@ static int import_lxml__etree(void) {
|
|
140
149
|
PyObject *module = 0;
|
141
150
|
module = PyImport_ImportModule("lxml.etree");
|
142
151
|
if (!module) goto bad;
|
143
|
-
if (
|
144
|
-
if (
|
145
|
-
if (
|
146
|
-
if (
|
147
|
-
if (
|
148
|
-
if (
|
149
|
-
if (
|
150
|
-
if (
|
151
|
-
if (
|
152
|
-
if (
|
153
|
-
if (
|
154
|
-
if (
|
155
|
-
if (
|
156
|
-
if (
|
157
|
-
if (
|
158
|
-
if (
|
159
|
-
if (
|
160
|
-
if (
|
161
|
-
if (
|
162
|
-
if (
|
163
|
-
if (
|
164
|
-
if (
|
165
|
-
if (
|
166
|
-
if (
|
167
|
-
if (
|
168
|
-
if (
|
169
|
-
if (
|
170
|
-
if (
|
171
|
-
if (
|
172
|
-
if (
|
173
|
-
if (
|
174
|
-
if (
|
175
|
-
if (
|
176
|
-
if (
|
177
|
-
if (
|
178
|
-
if (
|
179
|
-
if (
|
180
|
-
if (
|
181
|
-
if (
|
182
|
-
if (
|
183
|
-
if (
|
184
|
-
if (
|
185
|
-
if (
|
186
|
-
if (
|
187
|
-
if (
|
152
|
+
if (__Pyx_ImportFunction_3_1_2(module, "deepcopyNodeToDocument", (void (**)(void))&__pyx_api_f_4lxml_5etree_deepcopyNodeToDocument, "struct LxmlElement *(struct LxmlDocument *, xmlNode *)") < 0) goto bad;
|
153
|
+
if (__Pyx_ImportFunction_3_1_2(module, "elementTreeFactory", (void (**)(void))&__pyx_api_f_4lxml_5etree_elementTreeFactory, "struct LxmlElementTree *(struct LxmlElement *)") < 0) goto bad;
|
154
|
+
if (__Pyx_ImportFunction_3_1_2(module, "newElementTree", (void (**)(void))&__pyx_api_f_4lxml_5etree_newElementTree, "struct LxmlElementTree *(struct LxmlElement *, PyObject *)") < 0) goto bad;
|
155
|
+
if (__Pyx_ImportFunction_3_1_2(module, "adoptExternalDocument", (void (**)(void))&__pyx_api_f_4lxml_5etree_adoptExternalDocument, "struct LxmlElementTree *(xmlDoc *, PyObject *, int)") < 0) goto bad;
|
156
|
+
if (__Pyx_ImportFunction_3_1_2(module, "elementFactory", (void (**)(void))&__pyx_api_f_4lxml_5etree_elementFactory, "struct LxmlElement *(struct LxmlDocument *, xmlNode *)") < 0) goto bad;
|
157
|
+
if (__Pyx_ImportFunction_3_1_2(module, "makeElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_makeElement, "struct LxmlElement *(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *)") < 0) goto bad;
|
158
|
+
if (__Pyx_ImportFunction_3_1_2(module, "makeSubElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_makeSubElement, "struct LxmlElement *(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *)") < 0) goto bad;
|
159
|
+
if (__Pyx_ImportFunction_3_1_2(module, "setElementClassLookupFunction", (void (**)(void))&__pyx_api_f_4lxml_5etree_setElementClassLookupFunction, "void (_element_class_lookup_function, PyObject *)") < 0) goto bad;
|
160
|
+
if (__Pyx_ImportFunction_3_1_2(module, "lookupDefaultElementClass", (void (**)(void))&__pyx_api_f_4lxml_5etree_lookupDefaultElementClass, "PyObject *(PyObject *, PyObject *, xmlNode *)") < 0) goto bad;
|
161
|
+
if (__Pyx_ImportFunction_3_1_2(module, "lookupNamespaceElementClass", (void (**)(void))&__pyx_api_f_4lxml_5etree_lookupNamespaceElementClass, "PyObject *(PyObject *, PyObject *, xmlNode *)") < 0) goto bad;
|
162
|
+
if (__Pyx_ImportFunction_3_1_2(module, "callLookupFallback", (void (**)(void))&__pyx_api_f_4lxml_5etree_callLookupFallback, "PyObject *(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *)") < 0) goto bad;
|
163
|
+
if (__Pyx_ImportFunction_3_1_2(module, "tagMatches", (void (**)(void))&__pyx_api_f_4lxml_5etree_tagMatches, "int (xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
|
164
|
+
if (__Pyx_ImportFunction_3_1_2(module, "documentOrRaise", (void (**)(void))&__pyx_api_f_4lxml_5etree_documentOrRaise, "struct LxmlDocument *(PyObject *)") < 0) goto bad;
|
165
|
+
if (__Pyx_ImportFunction_3_1_2(module, "rootNodeOrRaise", (void (**)(void))&__pyx_api_f_4lxml_5etree_rootNodeOrRaise, "struct LxmlElement *(PyObject *)") < 0) goto bad;
|
166
|
+
if (__Pyx_ImportFunction_3_1_2(module, "hasText", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasText, "int (xmlNode *)") < 0) goto bad;
|
167
|
+
if (__Pyx_ImportFunction_3_1_2(module, "hasTail", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasTail, "int (xmlNode *)") < 0) goto bad;
|
168
|
+
if (__Pyx_ImportFunction_3_1_2(module, "textOf", (void (**)(void))&__pyx_api_f_4lxml_5etree_textOf, "PyObject *(xmlNode *)") < 0) goto bad;
|
169
|
+
if (__Pyx_ImportFunction_3_1_2(module, "tailOf", (void (**)(void))&__pyx_api_f_4lxml_5etree_tailOf, "PyObject *(xmlNode *)") < 0) goto bad;
|
170
|
+
if (__Pyx_ImportFunction_3_1_2(module, "setNodeText", (void (**)(void))&__pyx_api_f_4lxml_5etree_setNodeText, "int (xmlNode *, PyObject *)") < 0) goto bad;
|
171
|
+
if (__Pyx_ImportFunction_3_1_2(module, "setTailText", (void (**)(void))&__pyx_api_f_4lxml_5etree_setTailText, "int (xmlNode *, PyObject *)") < 0) goto bad;
|
172
|
+
if (__Pyx_ImportFunction_3_1_2(module, "attributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_attributeValue, "PyObject *(xmlNode *, xmlAttr *)") < 0) goto bad;
|
173
|
+
if (__Pyx_ImportFunction_3_1_2(module, "attributeValueFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_attributeValueFromNsName, "PyObject *(xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
|
174
|
+
if (__Pyx_ImportFunction_3_1_2(module, "getAttributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_getAttributeValue, "PyObject *(struct LxmlElement *, PyObject *, PyObject *)") < 0) goto bad;
|
175
|
+
if (__Pyx_ImportFunction_3_1_2(module, "iterattributes", (void (**)(void))&__pyx_api_f_4lxml_5etree_iterattributes, "PyObject *(struct LxmlElement *, int)") < 0) goto bad;
|
176
|
+
if (__Pyx_ImportFunction_3_1_2(module, "collectAttributes", (void (**)(void))&__pyx_api_f_4lxml_5etree_collectAttributes, "PyObject *(xmlNode *, int)") < 0) goto bad;
|
177
|
+
if (__Pyx_ImportFunction_3_1_2(module, "setAttributeValue", (void (**)(void))&__pyx_api_f_4lxml_5etree_setAttributeValue, "int (struct LxmlElement *, PyObject *, PyObject *)") < 0) goto bad;
|
178
|
+
if (__Pyx_ImportFunction_3_1_2(module, "delAttribute", (void (**)(void))&__pyx_api_f_4lxml_5etree_delAttribute, "int (struct LxmlElement *, PyObject *)") < 0) goto bad;
|
179
|
+
if (__Pyx_ImportFunction_3_1_2(module, "delAttributeFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_delAttributeFromNsName, "int (xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
|
180
|
+
if (__Pyx_ImportFunction_3_1_2(module, "hasChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_hasChild, "int (xmlNode *)") < 0) goto bad;
|
181
|
+
if (__Pyx_ImportFunction_3_1_2(module, "findChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChild, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
|
182
|
+
if (__Pyx_ImportFunction_3_1_2(module, "findChildForwards", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChildForwards, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
|
183
|
+
if (__Pyx_ImportFunction_3_1_2(module, "findChildBackwards", (void (**)(void))&__pyx_api_f_4lxml_5etree_findChildBackwards, "xmlNode *(xmlNode *, Py_ssize_t)") < 0) goto bad;
|
184
|
+
if (__Pyx_ImportFunction_3_1_2(module, "nextElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_nextElement, "xmlNode *(xmlNode *)") < 0) goto bad;
|
185
|
+
if (__Pyx_ImportFunction_3_1_2(module, "previousElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_previousElement, "xmlNode *(xmlNode *)") < 0) goto bad;
|
186
|
+
if (__Pyx_ImportFunction_3_1_2(module, "appendChild", (void (**)(void))&__pyx_api_f_4lxml_5etree_appendChild, "void (struct LxmlElement *, struct LxmlElement *)") < 0) goto bad;
|
187
|
+
if (__Pyx_ImportFunction_3_1_2(module, "appendChildToElement", (void (**)(void))&__pyx_api_f_4lxml_5etree_appendChildToElement, "int (struct LxmlElement *, struct LxmlElement *)") < 0) goto bad;
|
188
|
+
if (__Pyx_ImportFunction_3_1_2(module, "pyunicode", (void (**)(void))&__pyx_api_f_4lxml_5etree_pyunicode, "PyObject *(const xmlChar *)") < 0) goto bad;
|
189
|
+
if (__Pyx_ImportFunction_3_1_2(module, "utf8", (void (**)(void))&__pyx_api_f_4lxml_5etree_utf8, "PyObject *(PyObject *)") < 0) goto bad;
|
190
|
+
if (__Pyx_ImportFunction_3_1_2(module, "getNsTag", (void (**)(void))&__pyx_api_f_4lxml_5etree_getNsTag, "PyObject *(PyObject *)") < 0) goto bad;
|
191
|
+
if (__Pyx_ImportFunction_3_1_2(module, "getNsTagWithEmptyNs", (void (**)(void))&__pyx_api_f_4lxml_5etree_getNsTagWithEmptyNs, "PyObject *(PyObject *)") < 0) goto bad;
|
192
|
+
if (__Pyx_ImportFunction_3_1_2(module, "namespacedName", (void (**)(void))&__pyx_api_f_4lxml_5etree_namespacedName, "PyObject *(xmlNode *)") < 0) goto bad;
|
193
|
+
if (__Pyx_ImportFunction_3_1_2(module, "namespacedNameFromNsName", (void (**)(void))&__pyx_api_f_4lxml_5etree_namespacedNameFromNsName, "PyObject *(const xmlChar *, const xmlChar *)") < 0) goto bad;
|
194
|
+
if (__Pyx_ImportFunction_3_1_2(module, "iteratorStoreNext", (void (**)(void))&__pyx_api_f_4lxml_5etree_iteratorStoreNext, "void (struct LxmlElementIterator *, struct LxmlElement *)") < 0) goto bad;
|
195
|
+
if (__Pyx_ImportFunction_3_1_2(module, "initTagMatch", (void (**)(void))&__pyx_api_f_4lxml_5etree_initTagMatch, "void (struct LxmlElementTagMatcher *, PyObject *)") < 0) goto bad;
|
196
|
+
if (__Pyx_ImportFunction_3_1_2(module, "findOrBuildNodeNsPrefix", (void (**)(void))&__pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix, "xmlNs *(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *)") < 0) goto bad;
|
188
197
|
Py_DECREF(module); module = 0;
|
189
198
|
return 0;
|
190
199
|
bad:
|
lxml/extensions.pxi
CHANGED
@@ -42,12 +42,9 @@ cdef class _BaseContext:
|
|
42
42
|
cdef _ExceptionContext _exc
|
43
43
|
cdef _ErrorLog _error_log
|
44
44
|
|
45
|
-
def __cinit__(self):
|
46
|
-
self._xpathCtxt = NULL
|
47
|
-
|
48
45
|
def __init__(self, namespaces, extensions, error_log, enable_regexp,
|
49
46
|
build_smart_strings):
|
50
|
-
cdef _ExsltRegExp _regexp
|
47
|
+
cdef _ExsltRegExp _regexp
|
51
48
|
cdef dict new_extensions
|
52
49
|
cdef list ns
|
53
50
|
self._utf_refs = {}
|
@@ -213,11 +210,11 @@ cdef class _BaseContext:
|
|
213
210
|
xpath.xmlXPathRegisterNs(self._xpathCtxt,
|
214
211
|
_xcstr(prefix_utf), NULL)
|
215
212
|
del self._global_namespaces[:]
|
216
|
-
|
213
|
+
|
217
214
|
cdef void _unregisterNamespace(self, prefix_utf) noexcept:
|
218
215
|
xpath.xmlXPathRegisterNs(self._xpathCtxt,
|
219
216
|
_xcstr(prefix_utf), NULL)
|
220
|
-
|
217
|
+
|
221
218
|
# extension functions
|
222
219
|
|
223
220
|
cdef int _addLocalExtensionFunction(self, ns_utf, name_utf, function) except -1:
|
lxml/html/__init__.py
CHANGED
@@ -70,7 +70,7 @@ _forms_xpath = etree.XPath("descendant-or-self::form|descendant-or-self::x:form"
|
|
70
70
|
#_class_xpath = etree.XPath(r"descendant-or-self::*[regexp:match(@class, concat('\b', $class_name, '\b'))]", {'regexp': 'http://exslt.org/regular-expressions'})
|
71
71
|
_class_xpath = etree.XPath("descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), concat(' ', $class_name, ' '))]")
|
72
72
|
_id_xpath = etree.XPath("descendant-or-self::*[@id=$id]")
|
73
|
-
_collect_string_content = etree.XPath("string()")
|
73
|
+
_collect_string_content = etree.XPath("string()", smart_strings=False)
|
74
74
|
_iter_css_urls = re.compile(r'url\(('+'["][^"]*["]|'+"['][^']*[']|"+r'[^)]*)\)', re.I).finditer
|
75
75
|
_iter_css_imports = re.compile(r'@import "(.*?)"').finditer
|
76
76
|
_label_xpath = etree.XPath("//label[@for=$id]|//x:label[@for=$id]",
|
@@ -263,7 +263,9 @@ class HtmlMixin:
|
|
263
263
|
Return the <body> element. Can be called from a child element
|
264
264
|
to get the document's head.
|
265
265
|
"""
|
266
|
-
|
266
|
+
for element in self.getroottree().iter("body", f"{{{XHTML_NAMESPACE}}}body"):
|
267
|
+
return element
|
268
|
+
return None
|
267
269
|
|
268
270
|
@property
|
269
271
|
def head(self):
|
@@ -271,7 +273,9 @@ class HtmlMixin:
|
|
271
273
|
Returns the <head> element. Can be called from a child
|
272
274
|
element to get the document's head.
|
273
275
|
"""
|
274
|
-
|
276
|
+
for element in self.getroottree().iter("head", f"{{{XHTML_NAMESPACE}}}head"):
|
277
|
+
return element
|
278
|
+
return None
|
275
279
|
|
276
280
|
@property
|
277
281
|
def label(self):
|
Binary file
|