📄 tree.h
字号:
};/** * xmlID: * * An XML ID instance. */typedef struct _xmlID xmlID;typedef xmlID *xmlIDPtr;struct _xmlID { struct _xmlID *next; /* next ID */ const xmlChar *value; /* The ID name */ xmlAttrPtr attr; /* The attribute holding it */ const xmlChar *name; /* The attribute if attr is not available */ int lineno; /* The line number if attr is not available */ struct _xmlDoc *doc; /* The document holding the ID */};/** * xmlRef: * * An XML IDREF instance. */typedef struct _xmlRef xmlRef;typedef xmlRef *xmlRefPtr;struct _xmlRef { struct _xmlRef *next; /* next Ref */ const xmlChar *value; /* The Ref name */ xmlAttrPtr attr; /* The attribute holding it */ const xmlChar *name; /* The attribute if attr is not available */ int lineno; /* The line number if attr is not available */};/** * xmlNode: * * A node in an XML tree. */typedef struct _xmlNode xmlNode;typedef xmlNode *xmlNodePtr;struct _xmlNode { void *_private; /* application data */ xmlElementType type; /* type number, must be second ! */ const xmlChar *name; /* the name of the node, or the entity */ struct _xmlNode *children; /* parent->childs link */ struct _xmlNode *last; /* last child link */ struct _xmlNode *parent; /* child->parent link */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* the containing document */ /* End of common part */ xmlNs *ns; /* pointer to the associated namespace */ xmlChar *content; /* the content */ struct _xmlAttr *properties;/* properties list */ xmlNs *nsDef; /* namespace definitions on this node */ void *psvi; /* for type/PSVI informations */ unsigned short line; /* line number */ unsigned short extra; /* extra data for XPath/XSLT */};/** * XML_GET_CONTENT: * * Macro to extract the content pointer of a node. */#define XML_GET_CONTENT(n) \ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)/** * XML_GET_LINE: * * Macro to extract the line number of an element node. */#define XML_GET_LINE(n) \ (xmlGetLineNo(n))/** * xmlDoc: * * An XML document. */typedef struct _xmlDoc xmlDoc;typedef xmlDoc *xmlDocPtr;struct _xmlDoc { void *_private; /* application data */ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ char *name; /* name/filename/URI of the document */ struct _xmlNode *children; /* the document tree */ struct _xmlNode *last; /* last child link */ struct _xmlNode *parent; /* child->parent link */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* autoreference to itself */ /* End of common part */ int compression;/* level of zlib compression */ int standalone; /* standalone document (no external refs) 1 if standalone="yes" 0 if standalone="no" -1 if there is no XML declaration -2 if there is an XML declaration, but no standalone attribute was specified */ struct _xmlDtd *intSubset; /* the document internal subset */ struct _xmlDtd *extSubset; /* the document external subset */ struct _xmlNs *oldNs; /* Global namespace, the old way */ const xmlChar *version; /* the XML version string */ const xmlChar *encoding; /* external initial encoding, if any */ void *ids; /* Hash table for ID attributes if any */ void *refs; /* Hash table for IDREFs attributes if any */ const xmlChar *URL; /* The URI for that document */ int charset; /* encoding of the in-memory content actually an xmlCharEncoding */ struct _xmlDict *dict; /* dict used to allocate names or NULL */ void *psvi; /* for type/PSVI informations */};typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;/** * xmlDOMWrapAcquireNsFunction: * @ctxt: a DOM wrapper context * @node: the context node (element or attribute) * @nsName: the requested namespace name * @nsPrefix: the requested namespace prefix * * A function called to acquire namespaces (xmlNs) from the wrapper. * * Returns an xmlNsPtr or NULL in case of an error. */typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt, xmlNodePtr node, const xmlChar *nsName, const xmlChar *nsPrefix);/** * xmlDOMWrapCtxt: * * Context for DOM wrapper-operations. */struct _xmlDOMWrapCtxt { void * _private; /* * The type of this context, just in case we need specialized * contexts in the future. */ int type; /* * Internal namespace map used for various operations. */ void * namespaceMap; /* * Use this one to acquire an xmlNsPtr intended for node->ns. * (Note that this is not intended for elem->nsDef). */ xmlDOMWrapAcquireNsFunction getNsForNodeFunc;};/** * xmlChildrenNode: * * Macro for compatibility naming layer with libxml1. Maps * to "children." */#ifndef xmlChildrenNode#define xmlChildrenNode children#endif/** * xmlRootNode: * * Macro for compatibility naming layer with libxml1. Maps * to "children". */#ifndef xmlRootNode#define xmlRootNode children#endif/* * Variables. *//* * Some helper functions */#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)XMLPUBFUN int XMLCALL xmlValidateNCName (const xmlChar *value, int space);#endif#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)XMLPUBFUN int XMLCALL xmlValidateQName (const xmlChar *value, int space);XMLPUBFUN int XMLCALL xmlValidateName (const xmlChar *value, int space);XMLPUBFUN int XMLCALL xmlValidateNMToken (const xmlChar *value, int space);#endifXMLPUBFUN xmlChar * XMLCALL xmlBuildQName (const xmlChar *ncname, const xmlChar *prefix, xmlChar *memory, int len);XMLPUBFUN xmlChar * XMLCALL xmlSplitQName2 (const xmlChar *name, xmlChar **prefix);XMLPUBFUN const xmlChar * XMLCALL xmlSplitQName3 (const xmlChar *name, int *len);/* * Handling Buffers. */XMLPUBFUN void XMLCALL xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlGetBufferAllocationScheme(void);XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreate (void);XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreateSize (size_t size);XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreateStatic (void *mem, size_t size);XMLPUBFUN int XMLCALL xmlBufferResize (xmlBufferPtr buf, unsigned int size);XMLPUBFUN void XMLCALL xmlBufferFree (xmlBufferPtr buf);XMLPUBFUN int XMLCALL xmlBufferDump (FILE *file, xmlBufferPtr buf);XMLPUBFUN int XMLCALL xmlBufferAdd (xmlBufferPtr buf, const xmlChar *str, int len);XMLPUBFUN int XMLCALL xmlBufferAddHead (xmlBufferPtr buf, const xmlChar *str, int len);XMLPUBFUN int XMLCALL xmlBufferCat (xmlBufferPtr buf, const xmlChar *str);XMLPUBFUN int XMLCALL xmlBufferCCat (xmlBufferPtr buf, const char *str);XMLPUBFUN int XMLCALL xmlBufferShrink (xmlBufferPtr buf, unsigned int len);XMLPUBFUN int XMLCALL xmlBufferGrow (xmlBufferPtr buf, unsigned int len);XMLPUBFUN void XMLCALL xmlBufferEmpty (xmlBufferPtr buf);XMLPUBFUN const xmlChar* XMLCALL xmlBufferContent (const xmlBufferPtr buf);XMLPUBFUN void XMLCALL xmlBufferSetAllocationScheme(xmlBufferPtr buf, xmlBufferAllocationScheme scheme);XMLPUBFUN int XMLCALL xmlBufferLength (const xmlBufferPtr buf);/* * Creating/freeing new structures. */XMLPUBFUN xmlDtdPtr XMLCALL xmlCreateIntSubset (xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID);XMLPUBFUN xmlDtdPtr XMLCALL xmlNewDtd (xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID);XMLPUBFUN xmlDtdPtr XMLCALL xmlGetIntSubset (xmlDocPtr doc);XMLPUBFUN void XMLCALL xmlFreeDtd (xmlDtdPtr cur);#ifdef LIBXML_LEGACY_ENABLEDXMLPUBFUN xmlNsPtr XMLCALL xmlNewGlobalNs (xmlDocPtr doc, const xmlChar *href, const xmlChar *prefix);#endif /* LIBXML_LEGACY_ENABLED */XMLPUBFUN xmlNsPtr XMLCALL xmlNewNs (xmlNodePtr node, const xmlChar *href, const xmlChar *prefix);XMLPUBFUN void XMLCALL xmlFreeNs (xmlNsPtr cur);XMLPUBFUN void XMLCALL xmlFreeNsList (xmlNsPtr cur);XMLPUBFUN xmlDocPtr XMLCALL xmlNewDoc (const xmlChar *version);XMLPUBFUN void XMLCALL xmlFreeDoc (xmlDocPtr cur);XMLPUBFUN xmlAttrPtr XMLCALL xmlNewDocProp (xmlDocPtr doc, const xmlChar *name, const xmlChar *value);#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ defined(LIBXML_SCHEMAS_ENABLED)XMLPUBFUN xmlAttrPtr XMLCALL xmlNewProp (xmlNodePtr node, const xmlChar *name, const xmlChar *value);#endifXMLPUBFUN xmlAttrPtr XMLCALL xmlNewNsProp (xmlNodePtr node, xmlNsPtr ns, const xmlChar *name, const xmlChar *value);XMLPUBFUN xmlAttrPtr XMLCALL xmlNewNsPropEatName (xmlNodePtr node, xmlNsPtr ns, xmlChar *name, const xmlChar *value);XMLPUBFUN void XMLCALL xmlFreePropList (xmlAttrPtr cur);XMLPUBFUN void XMLCALL xmlFreeProp (xmlAttrPtr cur);XMLPUBFUN xmlAttrPtr XMLCALL xmlCopyProp (xmlNodePtr target, xmlAttrPtr cur);XMLPUBFUN xmlAttrPtr XMLCALL xmlCopyPropList (xmlNodePtr target, xmlAttrPtr cur);#ifdef LIBXML_TREE_ENABLEDXMLPUBFUN xmlDtdPtr XMLCALL xmlCopyDtd (xmlDtdPtr dtd);#endif /* LIBXML_TREE_ENABLED */#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)XMLPUBFUN xmlDocPtr XMLCALL xmlCopyDoc (xmlDocPtr doc, int recursive);#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) *//* * Creating new nodes. */XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNode (xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content);XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNodeEatName (xmlDocPtr doc, xmlNsPtr ns, xmlChar *name, const xmlChar *content);XMLPUBFUN xmlNodePtr XMLCALL xmlNewNode (xmlNsPtr ns, const xmlChar *name);XMLPUBFUN xmlNodePtr XMLCALL xmlNewNodeEatName (xmlNsPtr ns, xmlChar *name);#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)XMLPUBFUN xmlNodePtr XMLCALL xmlNewChild (xmlNodePtr parent, xmlNsPtr ns, const xmlChar *name, const xmlChar *content);#endifXMLPUBFUN xmlNodePtr XMLCALL xmlNewDocText (xmlDocPtr doc, const xmlChar *content);XMLPUBFUN xmlNodePtr XMLCALL xmlNewText (const xmlChar *content);XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocPI (xmlDocPtr doc, const xmlChar *name, const xmlChar *content);XMLPUBFUN xmlNodePtr XMLCALL xmlNewPI (const xmlChar *name, const xmlChar *content);XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocTextLen (xmlDocPtr doc, const xmlChar *content, int len);XMLPUBFUN xmlNodePtr XMLCALL xmlNewTextLen (const xmlChar *content, int len);XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocComment (xmlDocPtr doc, const xmlChar *content);XMLPUBFUN xmlNodePtr XMLCALL xmlNewComment (const xmlChar *content);XMLPUBFUN xmlNodePtr XMLCALL xmlNewCDataBlock (xmlDocPtr doc, const xmlChar *content, int len);XMLPUBFUN xmlNodePtr XMLCALL xmlNewCharRef (xmlDocPtr doc,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -