struct xmlNotation {
const xmlChar *name; /* Notation name */
const xmlChar *PublicID; /* Public identifier, if any */
const xmlChar *SystemID; /* System identifier, if any */
};
struct xmlEnumeration {
struct _xmlEnumeration *next; /* next one */
const xmlChar *name; /* Enumeration name */
};
xmlEnumerationPtr
typedef xmlEnumeration *xmlEnumerationPtr;
struct xmlAttribute
struct xmlAttribute {
const xmlChar *elem; /* Element holding the attribute */
const xmlChar *name; /* Attribute name */
struct _xmlAttribute *next; /* list of attributes of an element */
xmlAttributeType type; /* The type */
xmlAttributeDefault def; /* the default */
const xmlChar *defaultValue;/* or the default value */
xmlEnumerationPtr tree; /* or the enumeration tree if any */
const xmlChar *prefix; /* the namespace prefix if any */
};
struct xmlElementContent {
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
const xmlChar *name; /* Element name */
struct _xmlElementContent *c1; /* first child */
struct _xmlElementContent *c2; /* second child */
};
struct xmlElement {
const xmlChar *name; /* Element name */
xmlElementTypeVal type; /* The type */
xmlElementContentPtr content; /* the allowed element content */
xmlAttributePtr attributes; /* List of the declared attributes */
};
xmlElementPtr
typedef xmlElement *xmlElementPtr;
enum xmlNsType
typedef enum {
XML_GLOBAL_NAMESPACE = 1, /* old style global namespace */
XML_LOCAL_NAMESPACE /* new style local scoping */
} xmlNsType;
struct xmlNs
struct xmlNs {
struct _xmlNs *next; /* next Ns link for this node */
xmlNsType type; /* global or local */
const xmlChar *href; /* URL for the namespace */
const xmlChar *prefix; /* prefix for the namespace */
};
xmlNsPtr
typedef xmlNs *xmlNsPtr;
struct xmlDtd
struct xmlDtd {
const xmlChar *name; /* Name of the DTD */
const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
void *notations; /* Hash table for notations if any */
void *elements; /* Hash table for elements if any */
void *attributes; /* Hash table for attributes if any */
void *entities; /* Hash table for entities if any */
/* struct xmlDtd *next; * next link for this document */
};
xmlDtdPtr
typedef xmlDtd *xmlDtdPtr;
struct xmlAttr
struct xmlAttr {
#ifndef XML_WITHOUT_CORBA
void *_private; /* for Corba, must be first ! */
void *vepv; /* for Corba, must be next ! */
#endif
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */
struct _xmlNode *node; /* attr->node link */
struct _xmlAttr *next; /* attribute list link */
const xmlChar *name; /* the name of the property */
struct _xmlNode *val; /* the value of the property */
xmlNs *ns; /* pointer to the associated namespace */
};
xmlAttrPtr
typedef xmlAttr *xmlAttrPtr;
struct xmlID
struct xmlID {
struct _xmlID *next; /* next ID */
const xmlChar *value; /* The ID name */
xmlAttrPtr attr; /* The attribut holding it */
};
xmlIDPtr
typedef xmlID *xmlIDPtr;
struct xmlRef
struct xmlRef {
struct _xmlRef *next; /* next Ref */
const xmlChar *value; /* The Ref name */
xmlAttrPtr attr; /* The attribut holding it */
};
struct xmlBuffer {
xmlChar *content; /* The buffer content UTF8 */
unsigned int use; /* The buffer size used */
unsigned int size; /* The buffer size */
xmlBufferAllocationScheme alloc; /* The realloc method */
};
xmlBufferPtr
typedef xmlBuffer *xmlBufferPtr;
struct xmlNode
struct xmlNode {
#ifndef XML_WITHOUT_CORBA
void *_private; /* for Corba, must be first ! */
void *vepv; /* for Corba, must be next ! */
#endif
xmlElementType type; /* type number in the DTD, must be third ! */
struct _xmlDoc *doc; /* the containing document */
struct _xmlNode *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlNode *childs; /* parent->childs link */
struct _xmlNode *last; /* last child link */
struct _xmlAttr *properties;/* properties list */
const xmlChar *name; /* the name of the node, or the entity */
xmlNs *ns; /* pointer to the associated namespace */
xmlNs *nsDef; /* namespace definitions on this node */
#ifndef XML_USE_BUFFER_CONTENT
xmlChar *content; /* the content */
#else
xmlBufferPtr content; /* the content in a buffer */
#endif
};
xmlNodePtr
typedef xmlNode *xmlNodePtr;
struct xmlDoc
struct xmlDoc {
#ifndef XML_WITHOUT_CORBA
void *_private; /* for Corba, must be first ! */
void *vepv; /* for Corba, must be next ! */
#endif
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
char *name; /* name/filename/URI of the document */
const xmlChar *version; /* the XML version string */
const xmlChar *encoding; /* encoding, if any */
int compression;/* level of zlib compression */
int standalone; /* standalone document (no external refs) */
struct _xmlDtd *intSubset; /* the document internal subset */
struct _xmlDtd *extSubset; /* the document external subset */
struct _xmlNs *oldNs; /* Global namespace, the old way */
struct _xmlNode *root; /* the document tree */
void *ids; /* Hash table for ID attributes if any */
void *refs; /* Hash table for IDREFs attributes if any */
};
xmlDocPtr
typedef xmlDoc *xmlDocPtr;
xmlChildrenNode
#define xmlChildrenNode childs
xmlRootNode
#define xmlRootNode root
baseDTD
extern xmlNsPtr baseDTD;
oldXMLWDcompatibility
extern int oldXMLWDcompatibility;/* maintain compatibility with old WD */
xmlIndentTreeOutput
extern int xmlIndentTreeOutput; /* try to indent the tree dumps */
xmlBufferAllocScheme
extern xmlBufferAllocationScheme xmlBufferAllocScheme; /* alloc scheme to use */
xmlSaveNoEmptyTags
extern int xmlSaveNoEmptyTags; /* save empty tags as <empty></empty> */
Creation of a Namespace, the old way using PI and without scoping
DEPRECATED !!!
It now create a namespace on the root element of the document if found.
Creation of a new node element within a document. ns and content
are optionnal (NULL).
NOTE: content is supposed to be a piece of XML CDATA, so it allow entities
references, but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't
need entities support.
Creation of a new node element. ns and content are optionnal (NULL).
If content is non NULL, a child list containing the TEXTs and
ENTITY_REFs node will be created.
Creation of a new child element, added at the end of parent childs list.
ns and content parameters are optionnal (NULL). If content is non NULL,
a child list containing the TEXTs and ENTITY_REFs node will be created.
NOTE: content is supposed to be a piece of XML CDATA, so it allow entities
references, but XML special chars need to be escaped first by using
xmlEncodeEntitiesReentrant(). Use xmlNewTextChild() if entities
support is not needed.
Creation of a new child element, added at the end of parent childs list.
ns and content parameters are optionnal (NULL). If content is non NULL,
a child TEXT node will be created containing the string content.
Unlink the old node from it's current context, prune the new one
at the same place. If cur was already inserted in a document it is
first unlinked from its existing context.
Add a new element elem to the list of siblings of cur
If the new element was already inserted in a document it is
first unlinked from its existing context.
Add a new element elem as the previous siblings of cur
If the new element was already inserted in a document it is
first unlinked from its existing context.
Add a new element elem as the next siblings of cur
If the new element was already inserted in a document it is
first unlinked from its existing context.
Search a Ns registered under a given name space for a document.
recurse on the parents until it finds the defined namespace
or return NULL otherwise.
nameSpace can be NULL, this is a search for the default namespace.
Search and get the value of an attribute associated to a node
This does the entity substitution.
This function looks in DTD attribute declaration for FIXED or
default declaration values unless DTD use has been turned off.
node :
the node
name :
the attribute name
Returns :
the attribute value or NULL if not found.
It's up to the caller to free the memory.
Search and get the value of an attribute associated to a node
This attribute has to be anchored in the namespace specified.
This does the entity substitution.
This function looks in DTD attribute declaration for FIXED or
default declaration values unless DTD use has been turned off.
node :
the node
name :
the attribute name
nameSpace :
the URI of the namespace
Returns :
the attribute value or NULL if not found.
It's up to the caller to free the memory.
Read the value of a node, this can be either the text carried
directly by this node if it's a TEXT node or the aggregate string
of the values carried by this node child's (TEXT and ENTITY_REF).
Entity references are substitued.
cur :
the node being read
Returns :
a new xmlChar * or NULL if no content is available.
It's up to the caller to free the memory.
routine which manage and grows an output buffer. This one writes
a quoted or double quoted xmlChar string, checking first if it holds
quote or double-quotes internally
buf :
the XML buffer output
string :
the string to add
xmlDocDumpMemory ()
void xmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
Dump an XML document in memory and return the xmlChar * and it's size.
It's up to the caller to free the memory.