1 /* Generated by Cython 0.28.3 */
3 #ifndef __PYX_HAVE__lxml__etree
4 #define __PYX_HAVE__lxml__etree
8 struct LxmlElementTree;
9 struct LxmlElementTagMatcher;
10 struct LxmlElementIterator;
11 struct LxmlElementBase;
12 struct LxmlElementClassLookup;
13 struct LxmlFallbackElementClassLookup;
15 /* "lxml/etree.pyx":320
17 * # type of a function that steps from node to node
18 * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<
22 typedef xmlNode *(*_node_to_node_function)(xmlNode *);
24 /* "lxml/etree.pyx":336
27 * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
28 * u"""Internal base class to reference a libxml document.
33 struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;
35 PyObject *_prefix_tail;
37 struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
40 /* "lxml/etree.pyx":685
43 * cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<<
49 struct LxmlDocument *_doc;
54 /* "lxml/etree.pyx":1849
57 * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
58 * object LxmlElementTree ]:
61 struct LxmlElementTree {
63 struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;
64 struct LxmlDocument *_doc;
65 struct LxmlElement *_context_node;
68 /* "lxml/etree.pyx":2576
71 * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
72 * type LxmlElementTagMatcherType ]:
75 struct LxmlElementTagMatcher {
77 struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;
84 /* "lxml/etree.pyx":2607
87 * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
88 * object LxmlElementIterator, type LxmlElementIteratorType ]:
91 struct LxmlElementIterator {
92 struct LxmlElementTagMatcher __pyx_base;
93 struct LxmlElement *_node;
94 _node_to_node_function _next_element;
97 /* "src/lxml/classlookup.pxi":6
98 * # Custom Element classes
100 * cdef public class ElementBase(_Element) [ type LxmlElementBaseType, # <<<<<<<<<<<<<<
101 * object LxmlElementBase ]:
102 * u"""ElementBase(*children, attrib=None, nsmap=None, **_extra)
104 struct LxmlElementBase {
105 struct LxmlElement __pyx_base;
108 /* "src/lxml/classlookup.pxi":210
109 * # Element class lookup
111 * ctypedef public object (*_element_class_lookup_function)(object, _Document, xmlNode*) # <<<<<<<<<<<<<<
113 * # class to store element class lookup functions
115 typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocument *, xmlNode *);
117 /* "src/lxml/classlookup.pxi":213
119 * # class to store element class lookup functions
120 * cdef public class ElementClassLookup [ type LxmlElementClassLookupType, # <<<<<<<<<<<<<<
121 * object LxmlElementClassLookup ]:
122 * u"""ElementClassLookup(self)
124 struct LxmlElementClassLookup {
126 _element_class_lookup_function _lookup_function;
129 /* "src/lxml/classlookup.pxi":221
132 * cdef public class FallbackElementClassLookup(ElementClassLookup) \ # <<<<<<<<<<<<<<
133 * [ type LxmlFallbackElementClassLookupType,
134 * object LxmlFallbackElementClassLookup ]:
136 struct LxmlFallbackElementClassLookup {
137 struct LxmlElementClassLookup __pyx_base;
138 struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtab;
139 struct LxmlElementClassLookup *fallback;
140 _element_class_lookup_function _fallback_function;
143 #ifndef __PYX_HAVE_API__lxml__etree
145 #ifndef __PYX_EXTERN_C
147 #define __PYX_EXTERN_C extern "C"
149 #define __PYX_EXTERN_C extern
154 #define DL_IMPORT(_T) _T
157 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlDocumentType;
158 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementType;
159 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTreeType;
160 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTagMatcherType;
161 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementIteratorType;
162 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementBaseType;
163 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementClassLookupType;
164 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
166 __PYX_EXTERN_C struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *, xmlNode *);
167 __PYX_EXTERN_C struct LxmlElementTree *elementTreeFactory(struct LxmlElement *);
168 __PYX_EXTERN_C struct LxmlElementTree *newElementTree(struct LxmlElement *, PyObject *);
169 __PYX_EXTERN_C struct LxmlElementTree *adoptExternalDocument(xmlDoc *, PyObject *, int);
170 __PYX_EXTERN_C struct LxmlElement *elementFactory(struct LxmlDocument *, xmlNode *);
171 __PYX_EXTERN_C struct LxmlElement *makeElement(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
172 __PYX_EXTERN_C struct LxmlElement *makeSubElement(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
173 __PYX_EXTERN_C void setElementClassLookupFunction(_element_class_lookup_function, PyObject *);
174 __PYX_EXTERN_C PyObject *lookupDefaultElementClass(PyObject *, PyObject *, xmlNode *);
175 __PYX_EXTERN_C PyObject *lookupNamespaceElementClass(PyObject *, PyObject *, xmlNode *);
176 __PYX_EXTERN_C PyObject *callLookupFallback(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *);
177 __PYX_EXTERN_C int tagMatches(xmlNode *, const xmlChar *, const xmlChar *);
178 __PYX_EXTERN_C struct LxmlDocument *documentOrRaise(PyObject *);
179 __PYX_EXTERN_C struct LxmlElement *rootNodeOrRaise(PyObject *);
180 __PYX_EXTERN_C int hasText(xmlNode *);
181 __PYX_EXTERN_C int hasTail(xmlNode *);
182 __PYX_EXTERN_C PyObject *textOf(xmlNode *);
183 __PYX_EXTERN_C PyObject *tailOf(xmlNode *);
184 __PYX_EXTERN_C int setNodeText(xmlNode *, PyObject *);
185 __PYX_EXTERN_C int setTailText(xmlNode *, PyObject *);
186 __PYX_EXTERN_C PyObject *attributeValue(xmlNode *, xmlAttr *);
187 __PYX_EXTERN_C PyObject *attributeValueFromNsName(xmlNode *, const xmlChar *, const xmlChar *);
188 __PYX_EXTERN_C PyObject *getAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
189 __PYX_EXTERN_C PyObject *iterattributes(struct LxmlElement *, int);
190 __PYX_EXTERN_C PyObject *collectAttributes(xmlNode *, int);
191 __PYX_EXTERN_C int setAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
192 __PYX_EXTERN_C int delAttribute(struct LxmlElement *, PyObject *);
193 __PYX_EXTERN_C int delAttributeFromNsName(xmlNode *, const xmlChar *, const xmlChar *);
194 __PYX_EXTERN_C int hasChild(xmlNode *);
195 __PYX_EXTERN_C xmlNode *findChild(xmlNode *, Py_ssize_t);
196 __PYX_EXTERN_C xmlNode *findChildForwards(xmlNode *, Py_ssize_t);
197 __PYX_EXTERN_C xmlNode *findChildBackwards(xmlNode *, Py_ssize_t);
198 __PYX_EXTERN_C xmlNode *nextElement(xmlNode *);
199 __PYX_EXTERN_C xmlNode *previousElement(xmlNode *);
200 __PYX_EXTERN_C void appendChild(struct LxmlElement *, struct LxmlElement *);
201 __PYX_EXTERN_C int appendChildToElement(struct LxmlElement *, struct LxmlElement *);
202 __PYX_EXTERN_C PyObject *pyunicode(const xmlChar *);
203 __PYX_EXTERN_C PyObject *utf8(PyObject *);
204 __PYX_EXTERN_C PyObject *getNsTag(PyObject *);
205 __PYX_EXTERN_C PyObject *getNsTagWithEmptyNs(PyObject *);
206 __PYX_EXTERN_C PyObject *namespacedName(xmlNode *);
207 __PYX_EXTERN_C PyObject *namespacedNameFromNsName(const xmlChar *, const xmlChar *);
208 __PYX_EXTERN_C void iteratorStoreNext(struct LxmlElementIterator *, struct LxmlElement *);
209 __PYX_EXTERN_C void initTagMatch(struct LxmlElementTagMatcher *, PyObject *);
210 __PYX_EXTERN_C xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *);
212 #endif /* !__PYX_HAVE_API__lxml__etree */
214 /* WARNING: the interface of the module init function changed in CPython 3.5. */
215 /* It now returns a PyModuleDef instance instead of a PyModule instance. */
217 #if PY_MAJOR_VERSION < 3
218 PyMODINIT_FUNC initetree(void);
220 PyMODINIT_FUNC PyInit_etree(void);
223 #endif /* !__PYX_HAVE__lxml__etree */