1 #ifndef __PYX_HAVE__lxml__etree
2 #define __PYX_HAVE__lxml__etree
6 struct LxmlElementTree;
7 struct LxmlElementTagMatcher;
8 struct LxmlElementIterator;
9 struct LxmlElementBase;
10 struct LxmlElementClassLookup;
11 struct LxmlFallbackElementClassLookup;
13 /* "src/lxml/lxml.etree.pyx":290
14 * cdef class _BaseParser
16 * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<
18 * ################################################################################
20 typedef xmlNode *(*_node_to_node_function)(xmlNode *);
22 /* "src/lxml/lxml.etree.pyx":286
24 * # forward declarations
25 * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ] # <<<<<<<<<<<<<<
26 * cdef public class _Element [ type LxmlElementType, object LxmlElement ]
27 * cdef class _BaseParser
31 struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;
33 PyObject *_prefix_tail;
35 struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
38 /* "src/lxml/lxml.etree.pyx":287
39 * # forward declarations
40 * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]
41 * cdef public class _Element [ type LxmlElementType, object LxmlElement ] # <<<<<<<<<<<<<<
42 * cdef class _BaseParser
48 struct LxmlDocument *_doc;
53 /* "src/lxml/lxml.etree.pyx":1697
56 * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
57 * object LxmlElementTree ]:
60 struct LxmlElementTree {
62 struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;
63 struct LxmlDocument *_doc;
64 struct LxmlElement *_context_node;
67 /* "src/lxml/lxml.etree.pyx":2314
70 * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
71 * type LxmlElementTagMatcherType ]:
72 * cdef object _pystrings
74 struct LxmlElementTagMatcher {
76 struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;
83 /* "src/lxml/lxml.etree.pyx":2342
86 * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
87 * object LxmlElementIterator, type LxmlElementIteratorType ]:
88 * # we keep Python references here to control GC
90 struct LxmlElementIterator {
91 struct LxmlElementTagMatcher __pyx_base;
92 struct LxmlElement *_node;
93 _node_to_node_function _next_element;
96 /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":6
97 * # Custom Element classes
99 * cdef public class ElementBase(_Element) [ type LxmlElementBaseType, # <<<<<<<<<<<<<<
100 * object LxmlElementBase ]:
101 * u"""ElementBase(*children, attrib=None, nsmap=None, **_extra)
103 struct LxmlElementBase {
104 struct LxmlElement __pyx_base;
107 /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":184
108 * # Element class lookup
110 * ctypedef public object (*_element_class_lookup_function)(object, _Document, xmlNode*) # <<<<<<<<<<<<<<
112 * # class to store element class lookup functions
114 typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocument *, xmlNode *);
116 /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":187
118 * # class to store element class lookup functions
119 * cdef public class ElementClassLookup [ type LxmlElementClassLookupType, # <<<<<<<<<<<<<<
120 * object LxmlElementClassLookup ]:
121 * u"""ElementClassLookup(self)
123 struct LxmlElementClassLookup {
125 _element_class_lookup_function _lookup_function;
128 /* "/home/sbehnel/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":196
129 * self._lookup_function = NULL # use default lookup
131 * cdef public class FallbackElementClassLookup(ElementClassLookup) \ # <<<<<<<<<<<<<<
132 * [ type LxmlFallbackElementClassLookupType,
133 * object LxmlFallbackElementClassLookup ]:
135 struct LxmlFallbackElementClassLookup {
136 struct LxmlElementClassLookup __pyx_base;
137 struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtab;
138 struct LxmlElementClassLookup *fallback;
139 _element_class_lookup_function _fallback_function;
142 #ifndef __PYX_HAVE_API__lxml__etree
144 #ifndef __PYX_EXTERN_C
146 #define __PYX_EXTERN_C extern "C"
148 #define __PYX_EXTERN_C extern
152 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlDocumentType;
153 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementType;
154 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTreeType;
155 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTagMatcherType;
156 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementIteratorType;
157 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementBaseType;
158 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementClassLookupType;
159 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
161 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *deepcopyNodeToDocument(struct LxmlDocument *, xmlNode *);
162 __PYX_EXTERN_C DL_IMPORT(struct LxmlElementTree) *elementTreeFactory(struct LxmlElement *);
163 __PYX_EXTERN_C DL_IMPORT(struct LxmlElementTree) *newElementTree(struct LxmlElement *, PyObject *);
164 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *elementFactory(struct LxmlDocument *, xmlNode *);
165 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *makeElement(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
166 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *makeSubElement(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
167 __PYX_EXTERN_C DL_IMPORT(void) setElementClassLookupFunction(_element_class_lookup_function, PyObject *);
168 __PYX_EXTERN_C DL_IMPORT(PyObject) *lookupDefaultElementClass(PyObject *, PyObject *, xmlNode *);
169 __PYX_EXTERN_C DL_IMPORT(PyObject) *lookupNamespaceElementClass(PyObject *, PyObject *, xmlNode *);
170 __PYX_EXTERN_C DL_IMPORT(PyObject) *callLookupFallback(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *);
171 __PYX_EXTERN_C DL_IMPORT(int) tagMatches(xmlNode *, char *, char *);
172 __PYX_EXTERN_C DL_IMPORT(struct LxmlDocument) *documentOrRaise(PyObject *);
173 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *rootNodeOrRaise(PyObject *);
174 __PYX_EXTERN_C DL_IMPORT(int) hasText(xmlNode *);
175 __PYX_EXTERN_C DL_IMPORT(int) hasTail(xmlNode *);
176 __PYX_EXTERN_C DL_IMPORT(PyObject) *textOf(xmlNode *);
177 __PYX_EXTERN_C DL_IMPORT(PyObject) *tailOf(xmlNode *);
178 __PYX_EXTERN_C DL_IMPORT(int) setNodeText(xmlNode *, PyObject *);
179 __PYX_EXTERN_C DL_IMPORT(int) setTailText(xmlNode *, PyObject *);
180 __PYX_EXTERN_C DL_IMPORT(PyObject) *attributeValue(xmlNode *, xmlAttr *);
181 __PYX_EXTERN_C DL_IMPORT(PyObject) *attributeValueFromNsName(xmlNode *, char *, char *);
182 __PYX_EXTERN_C DL_IMPORT(PyObject) *getAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
183 __PYX_EXTERN_C DL_IMPORT(PyObject) *iterattributes(struct LxmlElement *, int);
184 __PYX_EXTERN_C DL_IMPORT(PyObject) *collectAttributes(xmlNode *, int);
185 __PYX_EXTERN_C DL_IMPORT(int) setAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
186 __PYX_EXTERN_C DL_IMPORT(int) delAttribute(struct LxmlElement *, PyObject *);
187 __PYX_EXTERN_C DL_IMPORT(int) delAttributeFromNsName(xmlNode *, char *, char *);
188 __PYX_EXTERN_C DL_IMPORT(int) hasChild(xmlNode *);
189 __PYX_EXTERN_C DL_IMPORT(xmlNode) *findChild(xmlNode *, Py_ssize_t);
190 __PYX_EXTERN_C DL_IMPORT(xmlNode) *findChildForwards(xmlNode *, Py_ssize_t);
191 __PYX_EXTERN_C DL_IMPORT(xmlNode) *findChildBackwards(xmlNode *, Py_ssize_t);
192 __PYX_EXTERN_C DL_IMPORT(xmlNode) *nextElement(xmlNode *);
193 __PYX_EXTERN_C DL_IMPORT(xmlNode) *previousElement(xmlNode *);
194 __PYX_EXTERN_C DL_IMPORT(void) appendChild(struct LxmlElement *, struct LxmlElement *);
195 __PYX_EXTERN_C DL_IMPORT(PyObject) *pyunicode(char *);
196 __PYX_EXTERN_C DL_IMPORT(PyObject) *utf8(PyObject *);
197 __PYX_EXTERN_C DL_IMPORT(PyObject) *getNsTag(PyObject *);
198 __PYX_EXTERN_C DL_IMPORT(PyObject) *getNsTagWithEmptyNs(PyObject *);
199 __PYX_EXTERN_C DL_IMPORT(PyObject) *namespacedName(xmlNode *);
200 __PYX_EXTERN_C DL_IMPORT(PyObject) *namespacedNameFromNsName(char *, char *);
201 __PYX_EXTERN_C DL_IMPORT(void) iteratorStoreNext(struct LxmlElementIterator *, struct LxmlElement *);
202 __PYX_EXTERN_C DL_IMPORT(void) initTagMatch(struct LxmlElementTagMatcher *, PyObject *);
203 __PYX_EXTERN_C DL_IMPORT(xmlNs) *findOrBuildNodeNsPrefix(struct LxmlDocument *, xmlNode *, char *, char *);
205 #endif /* !__PYX_HAVE_API__lxml__etree */
207 #if PY_MAJOR_VERSION < 3
208 PyMODINIT_FUNC initetree(void);
210 PyMODINIT_FUNC PyInit_etree(void);
213 #endif /* !__PYX_HAVE__lxml__etree */