1 /* Generated by Cython 0.29.18 */
3 #ifndef __PYX_HAVE__lxml__etree
4 #define __PYX_HAVE__lxml__etree
9 struct LxmlElementTree;
10 struct LxmlElementTagMatcher;
11 struct LxmlElementIterator;
12 struct LxmlElementBase;
13 struct LxmlElementClassLookup;
14 struct LxmlFallbackElementClassLookup;
16 /* "lxml/etree.pyx":322
18 * # type of a function that steps from node to node
19 * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<
23 typedef xmlNode *(*_node_to_node_function)(xmlNode *);
25 /* "lxml/etree.pyx":338
28 * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
29 * u"""Internal base class to reference a libxml document.
34 struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;
36 PyObject *_prefix_tail;
38 struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
41 /* "lxml/etree.pyx":687
44 * cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<<
50 struct LxmlDocument *_doc;
55 /* "lxml/etree.pyx":1854
58 * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
59 * object LxmlElementTree ]:
62 struct LxmlElementTree {
64 struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;
65 struct LxmlDocument *_doc;
66 struct LxmlElement *_context_node;
69 /* "lxml/etree.pyx":2598
72 * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
73 * type LxmlElementTagMatcherType ]:
76 struct LxmlElementTagMatcher {
78 struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;
85 /* "lxml/etree.pyx":2629
88 * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
89 * object LxmlElementIterator, type LxmlElementIteratorType ]:
92 struct LxmlElementIterator {
93 struct LxmlElementTagMatcher __pyx_base;
94 struct LxmlElement *_node;
95 _node_to_node_function _next_element;
98 /* "src/lxml/classlookup.pxi":6
99 * # Custom Element classes
101 * cdef public class ElementBase(_Element) [ type LxmlElementBaseType, # <<<<<<<<<<<<<<
102 * object LxmlElementBase ]:
103 * u"""ElementBase(*children, attrib=None, nsmap=None, **_extra)
105 struct LxmlElementBase {
106 struct LxmlElement __pyx_base;
109 /* "src/lxml/classlookup.pxi":210
110 * # Element class lookup
112 * ctypedef public object (*_element_class_lookup_function)(object, _Document, xmlNode*) # <<<<<<<<<<<<<<
114 * # class to store element class lookup functions
116 typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocument *, xmlNode *);
118 /* "src/lxml/classlookup.pxi":213
120 * # class to store element class lookup functions
121 * cdef public class ElementClassLookup [ type LxmlElementClassLookupType, # <<<<<<<<<<<<<<
122 * object LxmlElementClassLookup ]:
123 * u"""ElementClassLookup(self)
125 struct LxmlElementClassLookup {
127 _element_class_lookup_function _lookup_function;
130 /* "src/lxml/classlookup.pxi":221
133 * cdef public class FallbackElementClassLookup(ElementClassLookup) \ # <<<<<<<<<<<<<<
134 * [ type LxmlFallbackElementClassLookupType,
135 * object LxmlFallbackElementClassLookup ]:
137 struct LxmlFallbackElementClassLookup {
138 struct LxmlElementClassLookup __pyx_base;
139 struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtab;
140 struct LxmlElementClassLookup *fallback;
141 _element_class_lookup_function _fallback_function;
144 #ifndef __PYX_HAVE_API__lxml__etree
146 #ifndef __PYX_EXTERN_C
148 #define __PYX_EXTERN_C extern "C"
150 #define __PYX_EXTERN_C extern
155 #define DL_IMPORT(_T) _T
158 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlDocumentType;
159 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementType;
160 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTreeType;
161 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTagMatcherType;
162 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementIteratorType;
163 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementBaseType;
164 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementClassLookupType;
165 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
167 __PYX_EXTERN_C struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *, xmlNode *);
168 __PYX_EXTERN_C struct LxmlElementTree *elementTreeFactory(struct LxmlElement *);
169 __PYX_EXTERN_C struct LxmlElementTree *newElementTree(struct LxmlElement *, PyObject *);
170 __PYX_EXTERN_C struct LxmlElementTree *adoptExternalDocument(xmlDoc *, PyObject *, int);
171 __PYX_EXTERN_C struct LxmlElement *elementFactory(struct LxmlDocument *, xmlNode *);
172 __PYX_EXTERN_C struct LxmlElement *makeElement(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
173 __PYX_EXTERN_C struct LxmlElement *makeSubElement(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
174 __PYX_EXTERN_C void setElementClassLookupFunction(_element_class_lookup_function, PyObject *);
175 __PYX_EXTERN_C PyObject *lookupDefaultElementClass(PyObject *, PyObject *, xmlNode *);
176 __PYX_EXTERN_C PyObject *lookupNamespaceElementClass(PyObject *, PyObject *, xmlNode *);
177 __PYX_EXTERN_C PyObject *callLookupFallback(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *);
178 __PYX_EXTERN_C int tagMatches(xmlNode *, const xmlChar *, const xmlChar *);
179 __PYX_EXTERN_C struct LxmlDocument *documentOrRaise(PyObject *);
180 __PYX_EXTERN_C struct LxmlElement *rootNodeOrRaise(PyObject *);
181 __PYX_EXTERN_C int hasText(xmlNode *);
182 __PYX_EXTERN_C int hasTail(xmlNode *);
183 __PYX_EXTERN_C PyObject *textOf(xmlNode *);
184 __PYX_EXTERN_C PyObject *tailOf(xmlNode *);
185 __PYX_EXTERN_C int setNodeText(xmlNode *, PyObject *);
186 __PYX_EXTERN_C int setTailText(xmlNode *, PyObject *);
187 __PYX_EXTERN_C PyObject *attributeValue(xmlNode *, xmlAttr *);
188 __PYX_EXTERN_C PyObject *attributeValueFromNsName(xmlNode *, const xmlChar *, const xmlChar *);
189 __PYX_EXTERN_C PyObject *getAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
190 __PYX_EXTERN_C PyObject *iterattributes(struct LxmlElement *, int);
191 __PYX_EXTERN_C PyObject *collectAttributes(xmlNode *, int);
192 __PYX_EXTERN_C int setAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
193 __PYX_EXTERN_C int delAttribute(struct LxmlElement *, PyObject *);
194 __PYX_EXTERN_C int delAttributeFromNsName(xmlNode *, const xmlChar *, const xmlChar *);
195 __PYX_EXTERN_C int hasChild(xmlNode *);
196 __PYX_EXTERN_C xmlNode *findChild(xmlNode *, Py_ssize_t);
197 __PYX_EXTERN_C xmlNode *findChildForwards(xmlNode *, Py_ssize_t);
198 __PYX_EXTERN_C xmlNode *findChildBackwards(xmlNode *, Py_ssize_t);
199 __PYX_EXTERN_C xmlNode *nextElement(xmlNode *);
200 __PYX_EXTERN_C xmlNode *previousElement(xmlNode *);
201 __PYX_EXTERN_C void appendChild(struct LxmlElement *, struct LxmlElement *);
202 __PYX_EXTERN_C int appendChildToElement(struct LxmlElement *, struct LxmlElement *);
203 __PYX_EXTERN_C PyObject *pyunicode(const xmlChar *);
204 __PYX_EXTERN_C PyObject *utf8(PyObject *);
205 __PYX_EXTERN_C PyObject *getNsTag(PyObject *);
206 __PYX_EXTERN_C PyObject *getNsTagWithEmptyNs(PyObject *);
207 __PYX_EXTERN_C PyObject *namespacedName(xmlNode *);
208 __PYX_EXTERN_C PyObject *namespacedNameFromNsName(const xmlChar *, const xmlChar *);
209 __PYX_EXTERN_C void iteratorStoreNext(struct LxmlElementIterator *, struct LxmlElement *);
210 __PYX_EXTERN_C void initTagMatch(struct LxmlElementTagMatcher *, PyObject *);
211 __PYX_EXTERN_C xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *);
213 #endif /* !__PYX_HAVE_API__lxml__etree */
215 /* WARNING: the interface of the module init function changed in CPython 3.5. */
216 /* It now returns a PyModuleDef instance instead of a PyModule instance. */
218 #if PY_MAJOR_VERSION < 3
219 PyMODINIT_FUNC initetree(void);
221 PyMODINIT_FUNC PyInit_etree(void);
224 #endif /* !__PYX_HAVE__lxml__etree */