Path: blob/master/venv/Lib/site-packages/lxml/lxml.etree.h
811 views
/* Generated by Cython 0.29.21 */12#ifndef __PYX_HAVE__lxml__etree3#define __PYX_HAVE__lxml__etree45#include "Python.h"6struct LxmlDocument;7struct LxmlElement;8struct LxmlElementTree;9struct LxmlElementTagMatcher;10struct LxmlElementIterator;11struct LxmlElementBase;12struct LxmlElementClassLookup;13struct LxmlFallbackElementClassLookup;1415/* "lxml/etree.pyx":32216*17* # type of a function that steps from node to node18* ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<19*20*21*/22typedef xmlNode *(*_node_to_node_function)(xmlNode *);2324/* "lxml/etree.pyx":33825* @cython.final26* @cython.freelist(8)27* cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<28* u"""Internal base class to reference a libxml document.29*30*/31struct LxmlDocument {32PyObject_HEAD33struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;34int _ns_counter;35PyObject *_prefix_tail;36xmlDoc *_c_doc;37struct __pyx_obj_4lxml_5etree__BaseParser *_parser;38};3940/* "lxml/etree.pyx":68741*42* @cython.no_gc_clear43* cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<<44* u"""Element class.45*46*/47struct LxmlElement {48PyObject_HEAD49struct LxmlDocument *_doc;50xmlNode *_c_node;51PyObject *_tag;52};5354/* "lxml/etree.pyx":185455*56*57* cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<58* object LxmlElementTree ]:59* cdef _Document _doc60*/61struct LxmlElementTree {62PyObject_HEAD63struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;64struct LxmlDocument *_doc;65struct LxmlElement *_context_node;66};6768/* "lxml/etree.pyx":259869*70*71* cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<72* type LxmlElementTagMatcherType ]:73* """74*/75struct LxmlElementTagMatcher {76PyObject_HEAD77struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;78PyObject *_pystrings;79int _node_type;80char *_href;81char *_name;82};8384/* "lxml/etree.pyx":262985* self._name = NULL86*87* cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<88* object LxmlElementIterator, type LxmlElementIteratorType ]:89* """90*/91struct LxmlElementIterator {92struct LxmlElementTagMatcher __pyx_base;93struct LxmlElement *_node;94_node_to_node_function _next_element;95};9697/* "src/lxml/classlookup.pxi":698* # Custom Element classes99*100* cdef public class ElementBase(_Element) [ type LxmlElementBaseType, # <<<<<<<<<<<<<<101* object LxmlElementBase ]:102* u"""ElementBase(*children, attrib=None, nsmap=None, **_extra)103*/104struct LxmlElementBase {105struct LxmlElement __pyx_base;106};107108/* "src/lxml/classlookup.pxi":210109* # Element class lookup110*111* ctypedef public object (*_element_class_lookup_function)(object, _Document, xmlNode*) # <<<<<<<<<<<<<<112*113* # class to store element class lookup functions114*/115typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocument *, xmlNode *);116117/* "src/lxml/classlookup.pxi":213118*119* # class to store element class lookup functions120* cdef public class ElementClassLookup [ type LxmlElementClassLookupType, # <<<<<<<<<<<<<<121* object LxmlElementClassLookup ]:122* u"""ElementClassLookup(self)123*/124struct LxmlElementClassLookup {125PyObject_HEAD126_element_class_lookup_function _lookup_function;127};128129/* "src/lxml/classlookup.pxi":221130*131*132* cdef public class FallbackElementClassLookup(ElementClassLookup) \ # <<<<<<<<<<<<<<133* [ type LxmlFallbackElementClassLookupType,134* object LxmlFallbackElementClassLookup ]:135*/136struct LxmlFallbackElementClassLookup {137struct LxmlElementClassLookup __pyx_base;138struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtab;139struct LxmlElementClassLookup *fallback;140_element_class_lookup_function _fallback_function;141};142143#ifndef __PYX_HAVE_API__lxml__etree144145#ifndef __PYX_EXTERN_C146#ifdef __cplusplus147#define __PYX_EXTERN_C extern "C"148#else149#define __PYX_EXTERN_C extern150#endif151#endif152153#ifndef DL_IMPORT154#define DL_IMPORT(_T) _T155#endif156157__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;165166__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 *);211212#endif /* !__PYX_HAVE_API__lxml__etree */213214/* 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. */216217#if PY_MAJOR_VERSION < 3218PyMODINIT_FUNC initetree(void);219#else220PyMODINIT_FUNC PyInit_etree(void);221#endif222223#endif /* !__PYX_HAVE__lxml__etree */224225226