26. libxml/tree.h
struct _xmlDoc {
void
*_private;/*
xmlElementType type;
char
*name;
/*
struct _xmlNode *children;
struct _xmlNode *last;
/*
struct _xmlNode *parent; /*
struct _xmlNode *next;
/*
struct _xmlNode *prev;
/*
struct _xmlDoc *doc;
/*
!
};
application data */
/* XML_DOCUMENT_NODE, must be second ! */
name/filename/URI of the document */
/* the document tree */
last child link */
child->parent link */
next sibling link */
previous sibling link */
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 */
int
parseFlags; /* set of xmlParserOption used to parse the
document */
int
properties; /* set of xmlDocProperties for this document
set at the end of parsing */
26
27. libxml/tree.h
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 */
};
27
29. libxml/xpath.h
struct _xmlXPathContext {
xmlDocPtr doc;
xmlNodePtr node;
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
};
/* The current document */
/* The current node */
int nb_variables_unused;
int max_variables_unused;
xmlHashTablePtr varHash;
/* unused (hash table) */
/* unused (hash table) */
/* Hash table of defined variables */
int nb_types;
int max_types;
xmlXPathTypePtr types;
/* number of defined types */
/* max number of types */
/* Array of defined types */
int nb_funcs_unused;
int max_funcs_unused;
xmlHashTablePtr funcHash;
/* unused (hash table) */
/* unused (hash table) */
/* Hash table of defined funcs */
int nb_axis;
int max_axis;
xmlXPathAxisPtr axis;
/* number of defined axis */
/* max number of axis */
/* Array of defined axis */
/* the namespace nodes of the context node */
xmlNsPtr *namespaces;
/* Array of namespaces */
int nsNr;
/* number of namespace in scope */
void *user;
/* function to free */
/* extra variables */
int contextSize;
int proximityPosition;
/* the context size */
/* the proximity position */
/* extra stuff for XPointer */
int xptr;
xmlNodePtr here;
xmlNodePtr origin;
/* is this an XPointer context? */
/* for here() */
/* for origin() */
/* the set of namespace declarations in scope for the expression */
xmlHashTablePtr nsHash;
/* The namespaces hash table */
xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
void *varLookupData;
/* variable lookup data */
/* Possibility to link in an extra item */
void *extra;
/* needed for XSLT */
/* The function name and URI when calling a function */
const xmlChar *function;
const xmlChar *functionURI;
/* function lookup function and data */
xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
void *funcLookupData;
/* function lookup data */
/* temporary namespace lists kept for walking the namespace axis */
xmlNsPtr *tmpNsList;
/* Array of namespaces */
int tmpNsNr;
/* number of namespaces in scope */
/* error reporting mechanism */
void *userData;
/* user specific data block */
xmlStructuredErrorFunc error;
/* the callback in case of errors */
xmlError lastError;
/* the last error */
xmlNodePtr debugNode;
/* the source node XSLT */
/* dictionary */
xmlDictPtr dict;
/* dictionary if any */
int flags;
/* flags to control compilation */
/* Cache for reusal of XPath objects */
void *cache;
29