From 35925478d126676b7f9a0c51d17e2a1c79253df2 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 25 Feb 1999 08:46:07 +0000 Subject: [PATCH] Added parserInternals.h to Makefile.am and the generated HTML docs, Daniel. --- ChangeLog | 4 + Makefile.am | 1 + doc/gnome-xml.sgml | 25 + doc/html/book1.html | 124 + doc/html/gnome-xml-entities.html | 1687 ++++++ doc/html/gnome-xml-error.html | 390 ++ doc/html/gnome-xml-parser.html | 4894 +++++++++++++++ doc/html/gnome-xml-parserinternals.html | 4776 +++++++++++++++ doc/html/gnome-xml-tree.html | 7226 +++++++++++++++++++++++ doc/html/gnome-xml-valid.html | 2134 +++++++ doc/html/index.sgml | 232 + doc/html/libxml.html | 169 + 12 files changed, 21662 insertions(+) create mode 100644 doc/gnome-xml.sgml create mode 100644 doc/html/book1.html create mode 100644 doc/html/gnome-xml-entities.html create mode 100644 doc/html/gnome-xml-error.html create mode 100644 doc/html/gnome-xml-parser.html create mode 100644 doc/html/gnome-xml-parserinternals.html create mode 100644 doc/html/gnome-xml-tree.html create mode 100644 doc/html/gnome-xml-valid.html create mode 100644 doc/html/index.sgml create mode 100644 doc/html/libxml.html diff --git a/ChangeLog b/ChangeLog index 89481a51..b679c87f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Feb 25 09:44:52 CET 1999 Daniel Veillard + + * makefile.am : added parserInternals.h, oops. + Mon Feb 22 11:24:56 CET 1999 Daniel Veillard * parserInternals.h: added this header giving access to the parser diff --git a/Makefile.am b/Makefile.am index 3d9ee08a..4d9f75e5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,7 @@ xmlinc_HEADERS = \ entities.h \ encoding.h \ parser.h \ + parserInternals.h \ debugXML.h \ tree.h \ valid.h diff --git a/doc/gnome-xml.sgml b/doc/gnome-xml.sgml new file mode 100644 index 00000000..39ecb8e3 --- /dev/null +++ b/doc/gnome-xml.sgml @@ -0,0 +1,25 @@ + + + + + + +]> + + + + Gnome XML Library Reference Manual + + + + Gnome XML Library + &parser; The parser general interfaces + &tree; Manipulation the tree generated by the parser + &entities; Routines for handling entities + &valid; All the stuff defined in DTDs + &error; Callbacks in case of parsing error + &parserInternals; Access to the parser internal routines + + + diff --git a/doc/html/book1.html b/doc/html/book1.html new file mode 100644 index 00000000..02a4bd63 --- /dev/null +++ b/doc/html/book1.html @@ -0,0 +1,124 @@ +Gnome XML Library Reference Manual

Gnome XML Library Reference Manual


Table of Contents
1. Gnome XML Library
parser — one line description goes here.
tree — one line description goes here.
entities — one line description goes here.
valid — one line description goes here.
error — one line description goes here.
parserInternals — one line description goes here.

  Next
  Gnome XML Library
\ No newline at end of file diff --git a/doc/html/gnome-xml-entities.html b/doc/html/gnome-xml-entities.html new file mode 100644 index 00000000..1e9e7ed6 --- /dev/null +++ b/doc/html/gnome-xml-entities.html @@ -0,0 +1,1687 @@ +entities
Gnome XML Library Reference Manual
PrevNext

entities

Name

entities — one line description goes here.

Synopsis


+
+#define     XML_INTERNAL_GENERAL_ENTITY
+#define     XML_EXTERNAL_GENERAL_PARSED_ENTITY
+#define     XML_EXTERNAL_GENERAL_UNPARSED_ENTITY
+#define     XML_INTERNAL_PARAMETER_ENTITY
+#define     XML_EXTERNAL_PARAMETER_ENTITY
+#define     XML_INTERNAL_PREDEFINED_ENTITY
+typedef     xmlEntityPtr
+#define     XML_MIN_ENTITIES_TABLE
+typedef     xmlEntitiesTablePtr
+void        xmlAddDocEntity                 (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             int type,
+                                             const CHAR *ExternalID,
+                                             const CHAR *SystemID,
+                                             CHAR *content);
+void        xmlAddDtdEntity                 (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             int type,
+                                             const CHAR *ExternalID,
+                                             const CHAR *SystemID,
+                                             CHAR *content);
+xmlEntityPtr xmlGetPredefinedEntity         (const CHAR *name);
+xmlEntityPtr xmlGetDocEntity                (xmlDocPtr doc,
+                                             const CHAR *name);
+xmlEntityPtr xmlGetDtdEntity                (xmlDocPtr doc,
+                                             const CHAR *name);
+CHAR*       xmlEncodeEntities               (xmlDocPtr doc,
+                                             const CHAR *input);
+xmlEntitiesTablePtr xmlCreateEntitiesTable  (void);
+xmlEntitiesTablePtr xmlCopyEntitiesTable    (xmlEntitiesTablePtr table);
+void        xmlFreeEntitiesTable            (xmlEntitiesTablePtr table);
+void        xmlDumpEntitiesTable            (xmlEntitiesTablePtr table);
+xmlParserInputPtr xmlNewEntityInputStream   (xmlParserCtxtPtr ctxt,
+                                             xmlEntityPtr entity);

Description

Details


XML_INTERNAL_GENERAL_ENTITY

#define XML_INTERNAL_GENERAL_ENTITY		1


XML_EXTERNAL_GENERAL_PARSED_ENTITY

#define XML_EXTERNAL_GENERAL_PARSED_ENTITY	2


XML_EXTERNAL_GENERAL_UNPARSED_ENTITY

#define XML_EXTERNAL_GENERAL_UNPARSED_ENTITY	3


XML_INTERNAL_PARAMETER_ENTITY

#define XML_INTERNAL_PARAMETER_ENTITY		4


XML_EXTERNAL_PARAMETER_ENTITY

#define XML_EXTERNAL_PARAMETER_ENTITY		5


XML_INTERNAL_PREDEFINED_ENTITY

#define XML_INTERNAL_PREDEFINED_ENTITY		6


xmlEntityPtr

typedef xmlEntity *xmlEntityPtr;


XML_MIN_ENTITIES_TABLE

#define XML_MIN_ENTITIES_TABLE	32


xmlEntitiesTablePtr

typedef xmlEntitiesTable *xmlEntitiesTablePtr;


xmlAddDocEntity()

void        xmlAddDocEntity                 (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             int type,
+                                             const CHAR *ExternalID,
+                                             const CHAR *SystemID,
+                                             CHAR *content);

Register a new entity for this document.

doc : the document
name : the entity name
type : the entity type XML_xxx_yyy_ENTITY
ExternalID : the entity external ID if available
SystemID : the entity system ID if available
content : the entity content


xmlAddDtdEntity()

void        xmlAddDtdEntity                 (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             int type,
+                                             const CHAR *ExternalID,
+                                             const CHAR *SystemID,
+                                             CHAR *content);

Register a new entity for this document DTD.

doc : the document
name : the entity name
type : the entity type XML_xxx_yyy_ENTITY
ExternalID : the entity external ID if available
SystemID : the entity system ID if available
content : the entity content


xmlGetPredefinedEntity()

xmlEntityPtr xmlGetPredefinedEntity         (const CHAR *name);

Check whether this name is an predefined entity.

name : the entity name
Returns :NULL if not, othervise the entity


xmlGetDocEntity()

xmlEntityPtr xmlGetDocEntity                (xmlDocPtr doc,
+                                             const CHAR *name);

Do an entity lookup in the document entity hash table and +returns the corrsponding entity, otherwise a lookup is done +in the predefined entities too.

doc : the document referencing the entity
name : the entity name
Returns :A pointer to the entity structure or NULL if not found.


xmlGetDtdEntity()

xmlEntityPtr xmlGetDtdEntity                (xmlDocPtr doc,
+                                             const CHAR *name);

Do an entity lookup in the Dtd entity hash table and +returns the corresponding entity, if found.

doc : the document referencing the entity
name : the entity name
Returns :A pointer to the entity structure or NULL if not found.


xmlEncodeEntities()

CHAR*       xmlEncodeEntities               (xmlDocPtr doc,
+                                             const CHAR *input);

Do a global encoding of a string, replacing the predefined entities +and non ASCII values with their entities and CharRef counterparts.

TODO !!!! Once moved to UTF-8 internal encoding, the encoding of non-ascii +get erroneous.

TODO This routine is not reentrant and this will be changed, the interface +should not be modified though.

doc : the document containing the string
input : A string to convert to XML.
Returns :A newly allocated string with the substitution done.


xmlCreateEntitiesTable()

xmlEntitiesTablePtr xmlCreateEntitiesTable  (void);

create and initialize an empty entities hash table.

Returns :the xmlEntitiesTablePtr just created or NULL in case of error.


xmlCopyEntitiesTable()

xmlEntitiesTablePtr xmlCopyEntitiesTable    (xmlEntitiesTablePtr table);

Build a copy of an entity table.

table : An entity table
Returns :the new xmlEntitiesTablePtr or NULL in case of error.


xmlFreeEntitiesTable()

void        xmlFreeEntitiesTable            (xmlEntitiesTablePtr table);

Deallocate the memory used by an entities hash table.

table : An entity table


xmlDumpEntitiesTable()

void        xmlDumpEntitiesTable            (xmlEntitiesTablePtr table);

This will dump the content of the entity table as an XML DTD definition

NOTE: TODO an extra parameter allowing a reentant implementation will +be added.

table : An entity table


xmlNewEntityInputStream()

xmlParserInputPtr xmlNewEntityInputStream   (xmlParserCtxtPtr ctxt,
+                                             xmlEntityPtr entity);

Create a new input stream based on a memory buffer.

ctxt : an XML parser context
entity : an Entity pointer
Returns :the new input stream


PrevHomeNext
treeUpvalid
\ No newline at end of file diff --git a/doc/html/gnome-xml-error.html b/doc/html/gnome-xml-error.html new file mode 100644 index 00000000..1c09efbc --- /dev/null +++ b/doc/html/gnome-xml-error.html @@ -0,0 +1,390 @@ +error
Gnome XML Library Reference Manual
PrevNext

error

Name

error — one line description goes here.

Synopsis


+
+void        xmlParserError                  (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);
+void        xmlParserWarning                (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);

Description

Details


xmlParserError()

void        xmlParserError                  (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);

Display and format an error messages, gives file, line, position and +extra parameters.

ctxt : an XML parser context
msg : the message to display/transmit
... : extra parameters for the message display


xmlParserWarning()

void        xmlParserWarning                (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);

Display and format a warning messages, gives file, line, position and +extra parameters.

ctxt : an XML parser context
msg : the message to display/transmit
... : extra parameters for the message display


PrevHomeNext
validUpparserInternals
\ No newline at end of file diff --git a/doc/html/gnome-xml-parser.html b/doc/html/gnome-xml-parser.html new file mode 100644 index 00000000..c274be55 --- /dev/null +++ b/doc/html/gnome-xml-parser.html @@ -0,0 +1,4894 @@ +parser
Gnome XML Library Reference Manual
PrevNext

parser

Name

parser — one line description goes here.

Synopsis


+
+#define     XML_DEFAULT_VERSION
+typedef     xmlParserInputPtr
+typedef     xmlParserNodeInfo
+typedef     xmlParserNodeInfoSeq
+typedef     xmlParserNodeInfoSeqPtr
+typedef     xmlParserCtxt
+typedef     xmlParserCtxtPtr
+typedef     xmlSAXLocator
+typedef     xmlSAXLocatorPtr
+xmlParserInputPtr (*resolveEntitySAXFunc)   (xmlParserCtxtPtr ctxt,
+                                             const CHAR *publicId,
+                                             const CHAR *systemId);
+void        (*notationDeclSAXFunc)          (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name,
+                                             const CHAR *publicId,
+                                             const CHAR *systemId);
+void        (*unparsedEntityDeclSAXFunc)    (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name,
+                                             const CHAR *publicId,
+                                             const CHAR *systemId,
+                                             const CHAR *notationName);
+void        (*setDocumentLocatorSAXFunc)    (xmlParserCtxtPtr ctxt,
+                                             xmlSAXLocatorPtr loc);
+void        (*startDocumentSAXFunc)         (xmlParserCtxtPtr ctxt);
+void        (*endDocumentSAXFunc)           (xmlParserCtxtPtr ctxt);
+void        (*startElementSAXFunc)          (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name);
+void        (*endElementSAXFunc)            (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name);
+void        (*attributeSAXFunc)             (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name,
+                                             const CHAR *value);
+void        (*charactersSAXFunc)            (xmlParserCtxtPtr ctxt,
+                                             const CHAR *ch,
+                                             int start,
+                                             int len);
+void        (*ignorableWhitespaceSAXFunc)   (xmlParserCtxtPtr ctxt,
+                                             const CHAR *ch,
+                                             int start,
+                                             int len);
+void        (*processingInstructionSAXFunc) (xmlParserCtxtPtr ctxt,
+                                             const CHAR *target,
+                                             const CHAR *data);
+void        (*warningSAXFunc)               (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);
+void        (*errorSAXFunc)                 (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);
+void        (*fatalErrorSAXFunc)            (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);
+typedef     xmlSAXHandlerPtr
+CHAR*       xmlStrdup                       (const CHAR *cur);
+CHAR*       xmlStrndup                      (const CHAR *cur,
+                                             int len);
+CHAR*       xmlStrchr                       (const CHAR *str,
+                                             CHAR val);
+int         xmlStrcmp                       (const CHAR *str1,
+                                             const CHAR *str2);
+int         xmlStrncmp                      (const CHAR *str1,
+                                             const CHAR *str2,
+                                             int len);
+int         xmlStrlen                       (const CHAR *str);
+CHAR*       xmlStrcat                       (CHAR *cur,
+                                             const CHAR *add);
+CHAR*       xmlStrncat                      (CHAR *cur,
+                                             const CHAR *add,
+                                             int len);
+xmlDocPtr   xmlParseDoc                     (CHAR *cur);
+xmlDocPtr   xmlParseMemory                  (char *buffer,
+                                             int size);
+xmlDocPtr   xmlParseFile                    (const char *filename);
+xmlDocPtr   xmlRecoverDoc                   (CHAR *cur);
+xmlDocPtr   xmlRecoverMemory                (char *buffer,
+                                             int size);
+xmlDocPtr   xmlRecoverFile                  (const char *filename);
+int         xmlParseDocument                (xmlParserCtxtPtr ctxt);
+xmlDocPtr   xmlSAXParseDoc                  (xmlSAXHandlerPtr sax,
+                                             CHAR *cur,
+                                             int recovery);
+xmlDocPtr   xmlSAXParseMemory               (xmlSAXHandlerPtr sax,
+                                             char *buffer,
+                                             int size,
+                                             int recovery);
+xmlDocPtr   xmlSAXParseFile                 (xmlSAXHandlerPtr sax,
+                                             const char *filename,
+                                             int recovery);
+void        xmlInitParserCtxt               (xmlParserCtxtPtr ctxt);
+void        xmlClearParserCtxt              (xmlParserCtxtPtr ctxt);
+void        xmlSetupParserForBuffer         (xmlParserCtxtPtr ctxt,
+                                             const CHAR *buffer,
+                                             const char *filename);
+const xmlParserNodeInfo* xmlParserFindNodeInfo
+                                            (const xmlParserCtxt *ctxt,
+                                             const xmlNode *node);
+void        xmlInitNodeInfoSeq              (xmlParserNodeInfoSeqPtr seq);
+void        xmlClearNodeInfoSeq             (xmlParserNodeInfoSeqPtr seq);
+unsigned long xmlParserFindNodeInfoIndex    (const xmlParserNodeInfoSeq *seq,
+                                             const xmlNode *node);
+void        xmlParserAddNodeInfo            (xmlParserCtxtPtr ctxt,
+                                             const xmlParserNodeInfo *info);
+void        xmlDefaultSAXHandlerInit        (void);

Description

Details


XML_DEFAULT_VERSION

#define XML_DEFAULT_VERSION	"1.0"


xmlParserInputPtr

typedef xmlParserInput *xmlParserInputPtr;


xmlParserNodeInfo

typedef _xmlParserNodeInfo xmlParserNodeInfo;


xmlParserNodeInfoSeq

typedef _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;


xmlParserNodeInfoSeqPtr

typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;


xmlParserCtxt

typedef _xmlParserCtxt xmlParserCtxt;


xmlParserCtxtPtr

typedef xmlParserCtxt *xmlParserCtxtPtr;


xmlSAXLocator

typedef _xmlSAXLocator xmlSAXLocator;


xmlSAXLocatorPtr

typedef xmlSAXLocator *xmlSAXLocatorPtr;


resolveEntitySAXFunc()

xmlParserInputPtr (*resolveEntitySAXFunc)   (xmlParserCtxtPtr ctxt,
+                                             const CHAR *publicId,
+                                             const CHAR *systemId);

ctxt : 
publicId : 
systemId : 
Returns : 


notationDeclSAXFunc()

void        (*notationDeclSAXFunc)          (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name,
+                                             const CHAR *publicId,
+                                             const CHAR *systemId);

ctxt : 
name : 
publicId : 
systemId : 


unparsedEntityDeclSAXFunc()

void        (*unparsedEntityDeclSAXFunc)    (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name,
+                                             const CHAR *publicId,
+                                             const CHAR *systemId,
+                                             const CHAR *notationName);

ctxt : 
name : 
publicId : 
systemId : 
notationName : 


setDocumentLocatorSAXFunc()

void        (*setDocumentLocatorSAXFunc)    (xmlParserCtxtPtr ctxt,
+                                             xmlSAXLocatorPtr loc);

ctxt : 
loc : 


startDocumentSAXFunc()

void        (*startDocumentSAXFunc)         (xmlParserCtxtPtr ctxt);

ctxt : 


endDocumentSAXFunc()

void        (*endDocumentSAXFunc)           (xmlParserCtxtPtr ctxt);

ctxt : 


startElementSAXFunc()

void        (*startElementSAXFunc)          (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name);

ctxt : 
name : 


endElementSAXFunc()

void        (*endElementSAXFunc)            (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name);

ctxt : 
name : 


attributeSAXFunc()

void        (*attributeSAXFunc)             (xmlParserCtxtPtr ctxt,
+                                             const CHAR *name,
+                                             const CHAR *value);

ctxt : 
name : 
value : 


charactersSAXFunc()

void        (*charactersSAXFunc)            (xmlParserCtxtPtr ctxt,
+                                             const CHAR *ch,
+                                             int start,
+                                             int len);

ctxt : 
ch : 
start : 
len : 


ignorableWhitespaceSAXFunc()

void        (*ignorableWhitespaceSAXFunc)   (xmlParserCtxtPtr ctxt,
+                                             const CHAR *ch,
+                                             int start,
+                                             int len);

ctxt : 
ch : 
start : 
len : 


processingInstructionSAXFunc()

void        (*processingInstructionSAXFunc) (xmlParserCtxtPtr ctxt,
+                                             const CHAR *target,
+                                             const CHAR *data);

ctxt : 
target : 
data : 


warningSAXFunc()

void        (*warningSAXFunc)               (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);

ctxt : 
msg : 
... : 


errorSAXFunc()

void        (*errorSAXFunc)                 (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);

ctxt : 
msg : 
... : 


fatalErrorSAXFunc()

void        (*fatalErrorSAXFunc)            (xmlParserCtxtPtr ctxt,
+                                             const char *msg,
+                                             ...);

ctxt : 
msg : 
... : 


xmlSAXHandlerPtr

typedef xmlSAXHandler *xmlSAXHandlerPtr;


xmlStrdup()

CHAR*       xmlStrdup                       (const CHAR *cur);

a strdup for array of CHAR's

cur : the input CHAR *
Returns :a new CHAR * or NULL


xmlStrndup()

CHAR*       xmlStrndup                      (const CHAR *cur,
+                                             int len);

a strndup for array of CHAR's

cur : the input CHAR *
len : the len of cur
Returns :a new CHAR * or NULL


xmlStrchr()

CHAR*       xmlStrchr                       (const CHAR *str,
+                                             CHAR val);

a strchr for CHAR's

str : the CHAR * array
val : the CHAR to search
Returns :the CHAR * for the first occurence or NULL.


xmlStrcmp()

int         xmlStrcmp                       (const CHAR *str1,
+                                             const CHAR *str2);

a strcmp for CHAR's

str1 : the first CHAR *
str2 : the second CHAR *
Returns :the integer result of the comparison


xmlStrncmp()

int         xmlStrncmp                      (const CHAR *str1,
+                                             const CHAR *str2,
+                                             int len);

a strncmp for CHAR's

str1 : the first CHAR *
str2 : the second CHAR *
len : the max comparison length
Returns :the integer result of the comparison


xmlStrlen()

int         xmlStrlen                       (const CHAR *str);

lenght of a CHAR's string

str : the CHAR * array
Returns :the number of CHAR contained in the ARRAY.


xmlStrcat()

CHAR*       xmlStrcat                       (CHAR *cur,
+                                             const CHAR *add);

a strcat for array of CHAR's

cur : the original CHAR * array
add : the CHAR * array added
Returns :a new CHAR * containing the concatenated string.


xmlStrncat()

CHAR*       xmlStrncat                      (CHAR *cur,
+                                             const CHAR *add,
+                                             int len);

a strncat for array of CHAR's

cur : the original CHAR * array
add : the CHAR * array added
len : the length of add
Returns :a new CHAR * containing the concatenated string.


xmlParseDoc()

xmlDocPtr   xmlParseDoc                     (CHAR *cur);

parse an XML in-memory document and build a tree.

cur : a pointer to an array of CHAR
Returns :the resulting document tree


xmlParseMemory()

xmlDocPtr   xmlParseMemory                  (char *buffer,
+                                             int size);

parse an XML in-memory block and build a tree.

buffer : an pointer to a char array
size : the size of the array
Returns :the resulting document tree


xmlParseFile()

xmlDocPtr   xmlParseFile                    (const char *filename);

parse an XML file and build a tree. Automatic support for ZLIB/Compress +compressed document is provided by default if found at compile-time.

filename : the filename
Returns :the resulting document tree


xmlRecoverDoc()

xmlDocPtr   xmlRecoverDoc                   (CHAR *cur);

parse an XML in-memory document and build a tree. +In the case the document is not Well Formed, a tree is built anyway

cur : a pointer to an array of CHAR
Returns :the resulting document tree


xmlRecoverMemory()

xmlDocPtr   xmlRecoverMemory                (char *buffer,
+                                             int size);

parse an XML in-memory block and build a tree. +In the case the document is not Well Formed, a tree is built anyway

buffer : an pointer to a char array
size : the size of the array
Returns :the resulting document tree


xmlRecoverFile()

xmlDocPtr   xmlRecoverFile                  (const char *filename);

parse an XML file and build a tree. Automatic support for ZLIB/Compress +compressed document is provided by default if found at compile-time. +In the case the document is not Well Formed, a tree is built anyway

filename : the filename
Returns :the resulting document tree


xmlParseDocument()

int         xmlParseDocument                (xmlParserCtxtPtr ctxt);

parse an XML document (and build a tree if using the standard SAX +interface).

[1] document ::= prolog element Misc*

[22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?

ctxt : an XML parser context
Returns :0, -1 in case of error. the parser context is augmented +as a result of the parsing.


xmlSAXParseDoc()

xmlDocPtr   xmlSAXParseDoc                  (xmlSAXHandlerPtr sax,
+                                             CHAR *cur,
+                                             int recovery);

parse an XML in-memory document and build a tree. +It use the given SAX function block to handle the parsing callback. +If sax is NULL, fallback to the default DOM tree building routines.

sax : the SAX handler block
cur : a pointer to an array of CHAR
recovery : work in recovery mode, i.e. tries to read no Well Formed +documents
Returns :the resulting document tree


xmlSAXParseMemory()

xmlDocPtr   xmlSAXParseMemory               (xmlSAXHandlerPtr sax,
+                                             char *buffer,
+                                             int size,
+                                             int recovery);

parse an XML in-memory block and use the given SAX function block +to handle the parsing callback. If sax is NULL, fallback to the default +DOM tree building routines.

TODO : plug some encoding conversion routines here. !!!

sax : the SAX handler block
buffer : an pointer to a char array
size : the siwe of the array
recovery : work in recovery mode, i.e. tries to read no Well Formed +documents
Returns :the resulting document tree


xmlSAXParseFile()

xmlDocPtr   xmlSAXParseFile                 (xmlSAXHandlerPtr sax,
+                                             const char *filename,
+                                             int recovery);

parse an XML file and build a tree. Automatic support for ZLIB/Compress +compressed document is provided by default if found at compile-time. +It use the given SAX function block to handle the parsing callback. +If sax is NULL, fallback to the default DOM tree building routines.

sax : the SAX handler block
filename : the filename
recovery : work in recovery mode, i.e. tries to read no Well Formed +documents
Returns :the resulting document tree


xmlInitParserCtxt()

void        xmlInitParserCtxt               (xmlParserCtxtPtr ctxt);

Initialize a parser context

ctxt : an XML parser context


xmlClearParserCtxt()

void        xmlClearParserCtxt              (xmlParserCtxtPtr ctxt);

Clear (release owned resources) and reinitialize a parser context

ctxt : an XML parser context


xmlSetupParserForBuffer()

void        xmlSetupParserForBuffer         (xmlParserCtxtPtr ctxt,
+                                             const CHAR *buffer,
+                                             const char *filename);

Setup the parser context to parse a new buffer; Clears any prior +contents from the parser context. The buffer parameter must not be +NULL, but the filename parameter can be

ctxt : an XML parser context
buffer : a CHAR * buffer
filename : a file name


xmlParserFindNodeInfo()

const xmlParserNodeInfo* xmlParserFindNodeInfo
+                                            (const xmlParserCtxt *ctxt,
+                                             const xmlNode *node);

Find the parser node info struct for a given node

ctxt : an XML parser context
node : an XML node within the tree
Returns :an xmlParserNodeInfo block pointer or NULL


xmlInitNodeInfoSeq()

void        xmlInitNodeInfoSeq              (xmlParserNodeInfoSeqPtr seq);

-- Initialize (set to initial state) node info sequence

seq : a node info sequence pointer


xmlClearNodeInfoSeq()

void        xmlClearNodeInfoSeq             (xmlParserNodeInfoSeqPtr seq);

-- Clear (release memory and reinitialize) node +info sequence

seq : a node info sequence pointer


xmlParserFindNodeInfoIndex()

unsigned long xmlParserFindNodeInfoIndex    (const xmlParserNodeInfoSeq *seq,
+                                             const xmlNode *node);

xmlParserFindNodeInfoIndex : Find the index that the info record for +the given node is or should be at in a sorted sequence

seq : a node info sequence pointer
node : an XML node pointer
Returns :a long indicating the position of the record


xmlParserAddNodeInfo()

void        xmlParserAddNodeInfo            (xmlParserCtxtPtr ctxt,
+                                             const xmlParserNodeInfo *info);

Insert node info record into the sorted sequence

ctxt : an XML parser context
info : a node info sequence pointer


xmlDefaultSAXHandlerInit()

void        xmlDefaultSAXHandlerInit        (void);

Initialize the default SAX handler


PrevHomeNext
Gnome XML LibraryUptree
\ No newline at end of file diff --git a/doc/html/gnome-xml-parserinternals.html b/doc/html/gnome-xml-parserinternals.html new file mode 100644 index 00000000..28208887 --- /dev/null +++ b/doc/html/gnome-xml-parserinternals.html @@ -0,0 +1,4776 @@ +parserInternals
Gnome XML Library Reference Manual
Prev 

parserInternals

Name

parserInternals — one line description goes here.

Synopsis


+
+void        xmlHandleEntity                 (xmlParserCtxtPtr ctxt,
+                                             xmlEntityPtr entity);
+CHAR*       xmlNamespaceParseNCName         (xmlParserCtxtPtr ctxt);
+CHAR*       xmlNamespaceParseQName          (xmlParserCtxtPtr ctxt,
+                                             CHAR **prefix);
+CHAR*       xmlNamespaceParseNSDef          (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseQuotedString            (xmlParserCtxtPtr ctxt);
+void        xmlParseNamespace               (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseName                    (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseNmtoken                 (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseEntityValue             (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseAttValue                (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseSystemLiteral           (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParsePubidLiteral            (xmlParserCtxtPtr ctxt);
+void        xmlParseCharData                (xmlParserCtxtPtr ctxt,
+                                             int cdata);
+CHAR*       xmlParseExternalID              (xmlParserCtxtPtr ctxt,
+                                             CHAR **publicID,
+                                             int strict);
+xmlNodePtr  xmlParseComment                 (xmlParserCtxtPtr ctxt,
+                                             int create);
+CHAR*       xmlParsePITarget                (xmlParserCtxtPtr ctxt);
+void        xmlParsePI                      (xmlParserCtxtPtr ctxt);
+void        xmlParseNotationDecl            (xmlParserCtxtPtr ctxt);
+void        xmlParseEntityDecl              (xmlParserCtxtPtr ctxt);
+int         xmlParseDefaultDecl             (xmlParserCtxtPtr ctxt,
+                                             CHAR **value);
+xmlEnumerationPtr xmlParseNotationType      (xmlParserCtxtPtr ctxt);
+xmlEnumerationPtr xmlParseEnumerationType   (xmlParserCtxtPtr ctxt);
+int         xmlParseEnumeratedType          (xmlParserCtxtPtr ctxt,
+                                             xmlEnumerationPtr *tree);
+int         xmlParseAttributeType           (xmlParserCtxtPtr ctxt,
+                                             xmlEnumerationPtr *tree);
+void        xmlParseAttributeListDecl       (xmlParserCtxtPtr ctxt);
+xmlElementContentPtr xmlParseElementMixedContentDecl
+                                            (xmlParserCtxtPtr ctxt);
+xmlElementContentPtr xmlParseElementChildrenContentDecl
+                                            (xmlParserCtxtPtr ctxt);
+int         xmlParseElementContentDecl      (xmlParserCtxtPtr ctxt,
+                                             CHAR *name,
+                                             xmlElementContentPtr *result);
+int         xmlParseElementDecl             (xmlParserCtxtPtr ctxt);
+void        xmlParseMarkupDecl              (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseCharRef                 (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseEntityRef               (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseReference               (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParsePEReference             (xmlParserCtxtPtr ctxt);
+void        xmlParseDocTypeDecl             (xmlParserCtxtPtr ctxt);
+xmlAttrPtr  xmlParseAttribute               (xmlParserCtxtPtr ctxt,
+                                             xmlNodePtr node);
+xmlNodePtr  xmlParseStartTag                (xmlParserCtxtPtr ctxt);
+void        xmlParseEndTag                  (xmlParserCtxtPtr ctxt,
+                                             xmlNsPtr *nsPtr,
+                                             CHAR **tagPtr);
+void        xmlParseCDSect                  (xmlParserCtxtPtr ctxt);
+void        xmlParseContent                 (xmlParserCtxtPtr ctxt);
+xmlNodePtr  xmlParseElement                 (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseVersionNum              (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseVersionInfo             (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseEncName                 (xmlParserCtxtPtr ctxt);
+CHAR*       xmlParseEncodingDecl            (xmlParserCtxtPtr ctxt);
+int         xmlParseSDDecl                  (xmlParserCtxtPtr ctxt);
+void        xmlParseXMLDecl                 (xmlParserCtxtPtr ctxt);
+void        xmlParseMisc                    (xmlParserCtxtPtr ctxt);

Description

Details


xmlHandleEntity()

void        xmlHandleEntity                 (xmlParserCtxtPtr ctxt,
+                                             xmlEntityPtr entity);

Default handling of defined entities, when should we define a new input +stream ? When do we just handle that as a set of chars ? +TODO: we should call the SAX handler here and have it resolve the issue

ctxt : an XML parser context
entity : an XML entity pointer.


xmlNamespaceParseNCName()

CHAR*       xmlNamespaceParseNCName         (xmlParserCtxtPtr ctxt);

parse an XML namespace name.

[NS 3] NCName ::= (Letter | '_') (NCNameChar)*

[NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | +CombiningChar | Extender

ctxt : an XML parser context
Returns :the namespace name or NULL


xmlNamespaceParseQName()

CHAR*       xmlNamespaceParseQName          (xmlParserCtxtPtr ctxt,
+                                             CHAR **prefix);

parse an XML qualified name

[NS 5] QName ::= (Prefix ':')? LocalPart

[NS 6] Prefix ::= NCName

[NS 7] LocalPart ::= NCName

ctxt : an XML parser context
prefix : a CHAR **
Returns :the function returns the local part, and prefix is updated +to get the Prefix if any.


xmlNamespaceParseNSDef()

CHAR*       xmlNamespaceParseNSDef          (xmlParserCtxtPtr ctxt);

parse a namespace prefix declaration

[NS 1] NSDef ::= PrefixDef Eq SystemLiteral

[NS 2] PrefixDef ::= 'xmlns' (':' NCName)?

ctxt : an XML parser context
Returns :the namespace name


xmlParseQuotedString()

CHAR*       xmlParseQuotedString            (xmlParserCtxtPtr ctxt);

[OLD] Parse and return a string between quotes or doublequotes

ctxt : an XML parser context
Returns :the string parser or NULL.


xmlParseNamespace()

void        xmlParseNamespace               (xmlParserCtxtPtr ctxt);

[OLD] xmlParseNamespace: parse specific PI '<?namespace ...' constructs.

This is what the older xml-name Working Draft specified, a bunch of +other stuff may still rely on it, so support is still here as +if ot was declared on the root of the Tree:-(

ctxt : an XML parser context


xmlParseName()

CHAR*       xmlParseName                    (xmlParserCtxtPtr ctxt);

parse an XML name.

[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | +CombiningChar | Extender

[5] Name ::= (Letter | '_' | ':') (NameChar)*

[6] Names ::= Name (S Name)*

ctxt : an XML parser context
Returns :the Name parsed or NULL


xmlParseNmtoken()

CHAR*       xmlParseNmtoken                 (xmlParserCtxtPtr ctxt);

parse an XML Nmtoken.

[7] Nmtoken ::= (NameChar)+

[8] Nmtokens ::= Nmtoken (S Nmtoken)*

ctxt : an XML parser context
Returns :the Nmtoken parsed or NULL


xmlParseEntityValue()

CHAR*       xmlParseEntityValue             (xmlParserCtxtPtr ctxt);

parse a value for ENTITY decl.

[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | +"'" ([^%&'] | PEReference | Reference)* "'"

ctxt : an XML parser context
Returns :the EntityValue parsed or NULL


xmlParseAttValue()

CHAR*       xmlParseAttValue                (xmlParserCtxtPtr ctxt);

parse a value for an attribute

[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | +"'" ([^<&'] | Reference)* "'"

ctxt : an XML parser context
Returns :the AttValue parsed or NULL.


xmlParseSystemLiteral()

CHAR*       xmlParseSystemLiteral           (xmlParserCtxtPtr ctxt);

parse an XML Literal

[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")

ctxt : an XML parser context
Returns :the SystemLiteral parsed or NULL


xmlParsePubidLiteral()

CHAR*       xmlParsePubidLiteral            (xmlParserCtxtPtr ctxt);

parse an XML public literal

[12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"

ctxt : an XML parser context
Returns :the PubidLiteral parsed or NULL.


xmlParseCharData()

void        xmlParseCharData                (xmlParserCtxtPtr ctxt,
+                                             int cdata);

parse a CharData section. +if we are within a CDATA section ']]>' marks an end of section.

[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

ctxt : an XML parser context
cdata : int indicating whether we are within a CDATA section


xmlParseExternalID()

CHAR*       xmlParseExternalID              (xmlParserCtxtPtr ctxt,
+                                             CHAR **publicID,
+                                             int strict);

Parse an External ID or a Public ID

NOTE: Productions [75] and [83] interract badly since [75] can generate +'PUBLIC' S PubidLiteral S SystemLiteral

[75] ExternalID ::= 'SYSTEM' S SystemLiteral +| 'PUBLIC' S PubidLiteral S SystemLiteral

[83] PublicID ::= 'PUBLIC' S PubidLiteral

ctxt : an XML parser context
publicID : a CHAR** receiving PubidLiteral
strict : indicate whether we should restrict parsing to only +production [75], see NOTE below
Returns :the function returns SystemLiteral and in the second +case publicID receives PubidLiteral, is strict is off +it is possible to return NULL and have publicID set.


xmlParseComment()

xmlNodePtr  xmlParseComment                 (xmlParserCtxtPtr ctxt,
+                                             int create);

Skip an XML (SGML) comment <!-- .... --> +This may or may not create a node (depending on the context) +The spec says that "For compatibility, the string "--" (double-hyphen) +must not occur within comments. "

[15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

TODO: this should call a SAX function which will handle (or not) the +creation of the comment !

ctxt : an XML parser context
create : should we create a node, or just skip the content
Returns :the comment node, or NULL


xmlParsePITarget()

CHAR*       xmlParsePITarget                (xmlParserCtxtPtr ctxt);

parse the name of a PI

[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

ctxt : an XML parser context
Returns :the PITarget name or NULL


xmlParsePI()

void        xmlParsePI                      (xmlParserCtxtPtr ctxt);

parse an XML Processing Instruction.

[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'

The processing is transfered to SAX once parsed.

ctxt : an XML parser context


xmlParseNotationDecl()

void        xmlParseNotationDecl            (xmlParserCtxtPtr ctxt);

parse a notation declaration

[82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'

Hence there is actually 3 choices: +'PUBLIC' S PubidLiteral +'PUBLIC' S PubidLiteral S SystemLiteral +and 'SYSTEM' S SystemLiteral

See the NOTE on xmlParseExternalID().

ctxt : an XML parser context


xmlParseEntityDecl()

void        xmlParseEntityDecl              (xmlParserCtxtPtr ctxt);

parse <!ENTITY declarations

[70] EntityDecl ::= GEDecl | PEDecl

[71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'

[72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'

[73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)

[74] PEDef ::= EntityValue | ExternalID

[76] NDataDecl ::= S 'NDATA' S Name

ctxt : an XML parser context


xmlParseDefaultDecl()

int         xmlParseDefaultDecl             (xmlParserCtxtPtr ctxt,
+                                             CHAR **value);

Parse an attribute default declaration

[60] DefaultDecl ::= 'REQUIRED' | 'IMPLIED' | (('FIXED' S)? AttValue)

ctxt : an XML parser context
value : Receive a possible fixed default value for the attribute
Returns : XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED +or XML_ATTRIBUTE_FIXED.


xmlParseNotationType()

xmlEnumerationPtr xmlParseNotationType      (xmlParserCtxtPtr ctxt);

parse an Notation attribute type.

[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'

Note: the leading 'NOTATION' S part has already being parsed...

ctxt : an XML parser context
Returns : the notation attribute tree built while parsing


xmlParseEnumerationType()

xmlEnumerationPtr xmlParseEnumerationType   (xmlParserCtxtPtr ctxt);

parse an Enumeration attribute type.

[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'

ctxt : an XML parser context
Returns : the enumeration attribute tree built while parsing


xmlParseEnumeratedType()

int         xmlParseEnumeratedType          (xmlParserCtxtPtr ctxt,
+                                             xmlEnumerationPtr *tree);

parse an Enumerated attribute type.

[57] EnumeratedType ::= NotationType | Enumeration

[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'

ctxt : an XML parser context
tree : the enumeration tree built while parsing
Returns : XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION


xmlParseAttributeType()

int         xmlParseAttributeType           (xmlParserCtxtPtr ctxt,
+                                             xmlEnumerationPtr *tree);

parse the Attribute list def for an element

[54] AttType ::= StringType | TokenizedType | EnumeratedType

[55] StringType ::= 'CDATA'

[56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | +'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'

ctxt : an XML parser context
tree : the enumeration tree built while parsing
Returns :the attribute type


xmlParseAttributeListDecl()

void        xmlParseAttributeListDecl       (xmlParserCtxtPtr ctxt);

: parse the Attribute list def for an element

[52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'

[53] AttDef ::= S Name S AttType S DefaultDecl

ctxt : an XML parser context


xmlParseElementMixedContentDecl()

xmlElementContentPtr xmlParseElementMixedContentDecl
+                                            (xmlParserCtxtPtr ctxt);

parse the declaration for a Mixed Element content +The leading '(' and spaces have been skipped in xmlParseElementContentDecl

[51] Mixed ::= '(' S? 'PCDATA' (S? '|' S? Name)* S? ')*' | +'(' S? 'PCDATA' S? ')'

ctxt : an XML parser context
Returns : the list of the xmlElementContentPtr describing the element choices


xmlParseElementChildrenContentDecl()

xmlElementContentPtr xmlParseElementChildrenContentDecl
+                                            (xmlParserCtxtPtr ctxt);

parse the declaration for a Mixed Element content +The leading '(' and spaces have been skipped in xmlParseElementContentDecl

[47] children ::= (choice | seq) ('?' | '*' | '+')?

[48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?

[49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')'

[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'

ctxt : an XML parser context
Returns : the tree of xmlElementContentPtr describing the element +hierarchy.


xmlParseElementContentDecl()

int         xmlParseElementContentDecl      (xmlParserCtxtPtr ctxt,
+                                             CHAR *name,
+                                             xmlElementContentPtr *result);

parse the declaration for an Element content either Mixed or Children, +the cases EMPTY and ANY are handled directly in xmlParseElementDecl

[46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children

ctxt : an XML parser context
name : the name of the element being defined.
result : the Element Content pointer will be stored here if any
Returns : the type of element content XML_ELEMENT_TYPE_xxx


xmlParseElementDecl()

int         xmlParseElementDecl             (xmlParserCtxtPtr ctxt);

parse an Element declaration.

[45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'

TODO There is a check [ VC: Unique Element Type Declaration ]

ctxt : an XML parser context
Returns :the type of the element, or -1 in case of error


xmlParseMarkupDecl()

void        xmlParseMarkupDecl              (xmlParserCtxtPtr ctxt);

parse Markup declarations

[29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | +NotationDecl | PI | Comment

TODO There is a check [ VC: Proper Declaration/PE Nesting ]

ctxt : an XML parser context


xmlParseCharRef()

CHAR*       xmlParseCharRef                 (xmlParserCtxtPtr ctxt);

parse Reference declarations

[66] CharRef ::= '&#' [0-9]+ ';' | +'&x' [0-9a-fA-F]+ ';'

ctxt : an XML parser context
Returns :the value parsed


xmlParseEntityRef()

CHAR*       xmlParseEntityRef               (xmlParserCtxtPtr ctxt);

parse ENTITY references declarations

[68] EntityRef ::= '&' Name ';'

ctxt : an XML parser context
Returns :the entity ref string or NULL if directly as input stream.


xmlParseReference()

CHAR*       xmlParseReference               (xmlParserCtxtPtr ctxt);

parse Reference declarations

[67] Reference ::= EntityRef | CharRef

ctxt : an XML parser context
Returns :the entity string or NULL if handled directly by pushing +the entity value as the input.


xmlParsePEReference()

CHAR*       xmlParsePEReference             (xmlParserCtxtPtr ctxt);

parse PEReference declarations

[69] PEReference ::= '%' Name ';'

ctxt : an XML parser context
Returns :the entity content or NULL if handled directly.


xmlParseDocTypeDecl()

void        xmlParseDocTypeDecl             (xmlParserCtxtPtr ctxt);

parse a DOCTYPE declaration

[28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? +('[' (markupdecl | PEReference | S)* ']' S?)? '>'

ctxt : an XML parser context


xmlParseAttribute()

xmlAttrPtr  xmlParseAttribute               (xmlParserCtxtPtr ctxt,
+                                             xmlNodePtr node);

parse an attribute

[41] Attribute ::= Name Eq AttValue

[25] Eq ::= S? '=' S?

With namespace:

[NS 11] Attribute ::= QName Eq AttValue

Also the case QName == xmlns:??? is handled independently as a namespace +definition.

ctxt : an XML parser context
node : the node carrying the attribute
Returns :the attribute just parsed of NULL in case of error.


xmlParseStartTag()

xmlNodePtr  xmlParseStartTag                (xmlParserCtxtPtr ctxt);

parse a start of tag either for rule element or +EmptyElement. In both case we don't parse the tag closing chars.

[40] STag ::= '<' Name (S Attribute)* S? '>'

[44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'

With namespace:

[NS 8] STag ::= '<' QName (S Attribute)* S? '>'

[NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'

ctxt : an XML parser context
Returns :the XML new node or NULL.


xmlParseEndTag()

void        xmlParseEndTag                  (xmlParserCtxtPtr ctxt,
+                                             xmlNsPtr *nsPtr,
+                                             CHAR **tagPtr);

parse an end of tag

[42] ETag ::= '</' Name S? '>'

With namespace

[9] ETag ::= '</' QName S? '>'

tagPtr receive the tag name just read

ctxt : an XML parser context
nsPtr : the current node namespace definition
tagPtr : CHAR** receive the tag value


xmlParseCDSect()

void        xmlParseCDSect                  (xmlParserCtxtPtr ctxt);

Parse escaped pure raw content.

[18] CDSect ::= CDStart CData CDEnd

[19] CDStart ::= '<![CDATA['

[20] Data ::= (Char* - (Char* ']]>' Char*))

[21] CDEnd ::= ']]>'

ctxt : an XML parser context


xmlParseContent()

void        xmlParseContent                 (xmlParserCtxtPtr ctxt);

Parse a content:

[43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

ctxt : an XML parser context


xmlParseElement()

xmlNodePtr  xmlParseElement                 (xmlParserCtxtPtr ctxt);

parse an XML element, this is highly recursive

[39] element ::= EmptyElemTag | STag content ETag

[41] Attribute ::= Name Eq AttValue

ctxt : an XML parser context
Returns :the XML new node or NULL


xmlParseVersionNum()

CHAR*       xmlParseVersionNum              (xmlParserCtxtPtr ctxt);

parse the XML version value.

[26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+

ctxt : an XML parser context
Returns :the string giving the XML version number, or NULL


xmlParseVersionInfo()

CHAR*       xmlParseVersionInfo             (xmlParserCtxtPtr ctxt);

parse the XML version.

[24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")

[25] Eq ::= S? '=' S?

ctxt : an XML parser context
Returns :the version string, e.g. "1.0"


xmlParseEncName()

CHAR*       xmlParseEncName                 (xmlParserCtxtPtr ctxt);

parse the XML encoding name

[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*

ctxt : an XML parser context
Returns :the encoding name value or NULL


xmlParseEncodingDecl()

CHAR*       xmlParseEncodingDecl            (xmlParserCtxtPtr ctxt);

parse the XML encoding declaration

[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'")

TODO: this should setup the conversion filters.

ctxt : an XML parser context
Returns :the encoding value or NULL


xmlParseSDDecl()

int         xmlParseSDDecl                  (xmlParserCtxtPtr ctxt);

parse the XML standalone declaration

[32] SDDecl ::= S 'standalone' Eq +(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"'))

ctxt : an XML parser context
Returns :1 if standalone, 0 otherwise


xmlParseXMLDecl()

void        xmlParseXMLDecl                 (xmlParserCtxtPtr ctxt);

parse an XML declaration header

[23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

ctxt : an XML parser context


xmlParseMisc()

void        xmlParseMisc                    (xmlParserCtxtPtr ctxt);

parse an XML Misc* optionnal field.

[27] Misc ::= Comment | PI | S

ctxt : an XML parser context


PrevHome 
errorUp 
\ No newline at end of file diff --git a/doc/html/gnome-xml-tree.html b/doc/html/gnome-xml-tree.html new file mode 100644 index 00000000..f6cf043b --- /dev/null +++ b/doc/html/gnome-xml-tree.html @@ -0,0 +1,7226 @@ +tree
Gnome XML Library Reference Manual
PrevNext

tree

Name

tree — one line description goes here.

Synopsis


+
+enum        xmlElementType
+typedef     CHAR
+typedef     xmlNotationPtr
+enum        xmlAttributeType
+enum        xmlAttributeDefault
+typedef     xmlEnumerationPtr
+typedef     xmlAttributePtr
+enum        xmlElementContentType
+enum        xmlElementContentOccur
+typedef     xmlElementContentPtr
+enum        xmlElementTypeVal
+typedef     xmlElementPtr
+enum        xmlNsType
+typedef     xmlNsPtr
+typedef     xmlDtdPtr
+typedef     xmlAttrPtr
+typedef     xmlNode
+typedef     xmlNodePtr
+typedef     xmlDoc
+typedef     xmlDocPtr
+xmlDtdPtr   xmlCreateIntSubset              (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             const CHAR *ExternalID,
+                                             const CHAR *SystemID);
+xmlDtdPtr   xmlNewDtd                       (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             const CHAR *ExternalID,
+                                             const CHAR *SystemID);
+void        xmlFreeDtd                      (xmlDtdPtr cur);
+xmlNsPtr    xmlNewGlobalNs                  (xmlDocPtr doc,
+                                             const CHAR *href,
+                                             const CHAR *prefix);
+xmlNsPtr    xmlNewNs                        (xmlNodePtr node,
+                                             const CHAR *href,
+                                             const CHAR *prefix);
+void        xmlFreeNs                       (xmlNsPtr cur);
+xmlDocPtr   xmlNewDoc                       (const CHAR *version);
+void        xmlFreeDoc                      (xmlDocPtr cur);
+xmlAttrPtr  xmlNewDocProp                   (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             const CHAR *value);
+xmlAttrPtr  xmlNewProp                      (xmlNodePtr node,
+                                             const CHAR *name,
+                                             const CHAR *value);
+void        xmlFreePropList                 (xmlAttrPtr cur);
+void        xmlFreeProp                     (xmlAttrPtr cur);
+xmlAttrPtr  xmlCopyProp                     (xmlAttrPtr cur);
+xmlAttrPtr  xmlCopyPropList                 (xmlAttrPtr cur);
+xmlDtdPtr   xmlCopyDtd                      (xmlDtdPtr dtd);
+xmlDocPtr   xmlCopyDoc                      (xmlDocPtr doc,
+                                             int recursive);
+xmlNodePtr  xmlNewDocNode                   (xmlDocPtr doc,
+                                             xmlNsPtr ns,
+                                             const CHAR *name,
+                                             CHAR *content);
+xmlNodePtr  xmlNewNode                      (xmlNsPtr ns,
+                                             const CHAR *name);
+xmlNodePtr  xmlNewChild                     (xmlNodePtr parent,
+                                             xmlNsPtr ns,
+                                             const CHAR *name,
+                                             CHAR *content);
+xmlNodePtr  xmlNewDocText                   (xmlDocPtr doc,
+                                             const CHAR *content);
+xmlNodePtr  xmlNewText                      (const CHAR *content);
+xmlNodePtr  xmlNewDocTextLen                (xmlDocPtr doc,
+                                             const CHAR *content,
+                                             int len);
+xmlNodePtr  xmlNewTextLen                   (const CHAR *content,
+                                             int len);
+xmlNodePtr  xmlNewDocComment                (xmlDocPtr doc,
+                                             CHAR *content);
+xmlNodePtr  xmlNewComment                   (CHAR *content);
+xmlNodePtr  xmlNewReference                 (xmlDocPtr doc,
+                                             const CHAR *name);
+xmlNodePtr  xmlCopyNode                     (xmlNodePtr node,
+                                             int recursive);
+xmlNodePtr  xmlCopyNodeList                 (xmlNodePtr node);
+xmlNodePtr  xmlGetLastChild                 (xmlNodePtr parent);
+int         xmlNodeIsText                   (xmlNodePtr node);
+xmlNodePtr  xmlAddChild                     (xmlNodePtr parent,
+                                             xmlNodePtr cur);
+void        xmlUnlinkNode                   (xmlNodePtr cur);
+xmlNodePtr  xmlTextMerge                    (xmlNodePtr first,
+                                             xmlNodePtr second);
+void        xmlTextConcat                   (xmlNodePtr node,
+                                             const CHAR *content,
+                                             int len);
+void        xmlFreeNodeList                 (xmlNodePtr cur);
+void        xmlFreeNode                     (xmlNodePtr cur);
+xmlNsPtr    xmlSearchNs                     (xmlDocPtr doc,
+                                             xmlNodePtr node,
+                                             const CHAR *nameSpace);
+xmlNsPtr    xmlSearchNsByHref               (xmlDocPtr doc,
+                                             xmlNodePtr node,
+                                             const CHAR *href);
+void        xmlSetNs                        (xmlNodePtr node,
+                                             xmlNsPtr ns);
+xmlNsPtr    xmlCopyNamespace                (xmlNsPtr cur);
+xmlNsPtr    xmlCopyNamespaceList            (xmlNsPtr cur);
+xmlAttrPtr  xmlSetProp                      (xmlNodePtr node,
+                                             const CHAR *name,
+                                             const CHAR *value);
+CHAR*       xmlGetProp                      (xmlNodePtr node,
+                                             const CHAR *name);
+xmlNodePtr  xmlStringGetNodeList            (xmlDocPtr doc,
+                                             const CHAR *value);
+xmlNodePtr  xmlStringLenGetNodeList         (xmlDocPtr doc,
+                                             const CHAR *value,
+                                             int len);
+CHAR*       xmlNodeListGetString            (xmlDocPtr doc,
+                                             xmlNodePtr list,
+                                             int inLine);
+void        xmlNodeSetContent               (xmlNodePtr cur,
+                                             const CHAR *content);
+void        xmlNodeSetContentLen            (xmlNodePtr cur,
+                                             const CHAR *content,
+                                             int len);
+void        xmlNodeAddContent               (xmlNodePtr cur,
+                                             const CHAR *content);
+void        xmlNodeAddContentLen            (xmlNodePtr cur,
+                                             const CHAR *content,
+                                             int len);
+CHAR*       xmlNodeGetContent               (xmlNodePtr cur);
+void        xmlBufferWriteCHAR              (const CHAR *string);
+void        xmlBufferWriteChar              (const char *string);
+void        xmlDocDumpMemory                (xmlDocPtr cur,
+                                             CHAR **mem,
+                                             int *size);
+void        xmlDocDump                      (FILE *f,
+                                             xmlDocPtr cur);
+int         xmlSaveFile                     (const char *filename,
+                                             xmlDocPtr cur);
+int         xmlGetDocCompressMode           (xmlDocPtr doc);
+void        xmlSetDocCompressMode           (xmlDocPtr doc,
+                                             int mode);
+int         xmlGetCompressMode              (void);
+void        xmlSetCompressMode              (int mode);

Description

Details


xmlElementType

typedef enum {
+    XML_ELEMENT_NODE=		1,
+    XML_ATTRIBUTE_NODE=		2,
+    XML_TEXT_NODE=		3,
+    XML_CDATA_SECTION_NODE=	4,
+    XML_ENTITY_REF_NODE=	5,
+    XML_ENTITY_NODE=		6,
+    XML_PI_NODE=		7,
+    XML_COMMENT_NODE=		8,
+    XML_DOCUMENT_NODE=		9,
+    XML_DOCUMENT_TYPE_NODE=	10,
+    XML_DOCUMENT_FRAG_NODE=	11,
+    XML_NOTATION_NODE=		12
+} xmlElementType;


CHAR


xmlNotationPtr

typedef xmlNotation *xmlNotationPtr;


xmlAttributeType

typedef enum {
+    XML_ATTRIBUTE_CDATA = 1,
+    XML_ATTRIBUTE_ID,
+    XML_ATTRIBUTE_IDREF	,
+    XML_ATTRIBUTE_IDREFS,
+    XML_ATTRIBUTE_ENTITY,
+    XML_ATTRIBUTE_ENTITIES,
+    XML_ATTRIBUTE_NMTOKEN,
+    XML_ATTRIBUTE_NMTOKENS,
+    XML_ATTRIBUTE_ENUMERATION,
+    XML_ATTRIBUTE_NOTATION
+} xmlAttributeType;


xmlAttributeDefault

typedef enum {
+    XML_ATTRIBUTE_NONE = 1,
+    XML_ATTRIBUTE_REQUIRED,
+    XML_ATTRIBUTE_IMPLIED,
+    XML_ATTRIBUTE_FIXED
+} xmlAttributeDefault;


xmlEnumerationPtr

typedef xmlEnumeration *xmlEnumerationPtr;


xmlAttributePtr

typedef xmlAttribute *xmlAttributePtr;


xmlElementContentType

typedef enum {
+    XML_ELEMENT_CONTENT_PCDATA = 1,
+    XML_ELEMENT_CONTENT_ELEMENT,
+    XML_ELEMENT_CONTENT_SEQ,
+    XML_ELEMENT_CONTENT_OR
+} xmlElementContentType;


xmlElementContentOccur

typedef enum {
+    XML_ELEMENT_CONTENT_ONCE = 1,
+    XML_ELEMENT_CONTENT_OPT,
+    XML_ELEMENT_CONTENT_MULT,
+    XML_ELEMENT_CONTENT_PLUS
+} xmlElementContentOccur;


xmlElementContentPtr

typedef xmlElementContent *xmlElementContentPtr;


xmlElementTypeVal

typedef enum {
+    XML_ELEMENT_TYPE_EMPTY = 1,
+    XML_ELEMENT_TYPE_ANY,
+    XML_ELEMENT_TYPE_MIXED,
+    XML_ELEMENT_TYPE_ELEMENT
+} xmlElementTypeVal;


xmlElementPtr

typedef xmlElement *xmlElementPtr;


xmlNsType

typedef enum {
+    XML_GLOBAL_NAMESPACE = 1,	/* old style global namespace */
+    XML_LOCAL_NAMESPACE		/* new style local scoping */
+} xmlNsType;


xmlNsPtr

typedef xmlNs *xmlNsPtr;


xmlDtdPtr

typedef xmlDtd *xmlDtdPtr;


xmlAttrPtr

typedef xmlAttr *xmlAttrPtr;


xmlNode

typedef _xmlNode xmlNode;


xmlNodePtr

typedef _xmlNode *xmlNodePtr;


xmlDoc

typedef _xmlDoc xmlDoc;


xmlDocPtr

typedef xmlDoc *xmlDocPtr;


xmlCreateIntSubset()

xmlDtdPtr   xmlCreateIntSubset              (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             const CHAR *ExternalID,
+                                             const CHAR *SystemID);

Create the internal subset of a document

doc : the document pointer
name : the DTD name
ExternalID : the external ID
SystemID : the system ID
Returns :a pointer to the new DTD structure


xmlNewDtd()

xmlDtdPtr   xmlNewDtd                       (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             const CHAR *ExternalID,
+                                             const CHAR *SystemID);

Creation of a new DTD.

doc : the document pointer
name : the DTD name
ExternalID : the external ID
SystemID : the system ID
Returns :a pointer to the new DTD structure


xmlFreeDtd()

void        xmlFreeDtd                      (xmlDtdPtr cur);

Free a DTD structure.

cur : the DTD structure to free up


xmlNewGlobalNs()

xmlNsPtr    xmlNewGlobalNs                  (xmlDocPtr doc,
+                                             const CHAR *href,
+                                             const CHAR *prefix);

Creation of a Namespace, the old way using PI and without scoping, to AVOID.

doc : the document carrying the namespace
href : the URI associated
prefix : the prefix for the namespace
Returns :returns a new namespace pointer


xmlNewNs()

xmlNsPtr    xmlNewNs                        (xmlNodePtr node,
+                                             const CHAR *href,
+                                             const CHAR *prefix);

Creation of a new Namespace.

node : the element carrying the namespace
href : the URI associated
prefix : the prefix for the namespace
Returns :returns a new namespace pointer


xmlFreeNs()

void        xmlFreeNs                       (xmlNsPtr cur);

Free up the structures associated to a namespace

cur : the namespace pointer


xmlNewDoc()

xmlDocPtr   xmlNewDoc                       (const CHAR *version);

version : CHAR string giving the version of XML "1.0"
Returns :a new document


xmlFreeDoc()

void        xmlFreeDoc                      (xmlDocPtr cur);

Free up all the structures used by a document, tree included.

cur : pointer to the document +@:


xmlNewDocProp()

xmlAttrPtr  xmlNewDocProp                   (xmlDocPtr doc,
+                                             const CHAR *name,
+                                             const CHAR *value);

Create a new property carried by a document.

doc : the document
name : the name of the attribute
value : the value of the attribute
Returns :a pointer to the attribute


xmlNewProp()

xmlAttrPtr  xmlNewProp                      (xmlNodePtr node,
+                                             const CHAR *name,
+                                             const CHAR *value);

Create a new property carried by a node.

node : the holding node
name : the name of the attribute
value : the value of the attribute
Returns :a pointer to the attribute


xmlFreePropList()

void        xmlFreePropList                 (xmlAttrPtr cur);

Free a property and all its siblings, all the childs are freed too.

cur : the first property in the list


xmlFreeProp()

void        xmlFreeProp                     (xmlAttrPtr cur);

Free one property, all the childs are freed too.

cur : the first property in the list


xmlCopyProp()

xmlAttrPtr  xmlCopyProp                     (xmlAttrPtr cur);

Do a copy of the attribute.

cur : the attribute
Returns : a new xmlAttrPtr, or NULL in case of error.


xmlCopyPropList()

xmlAttrPtr  xmlCopyPropList                 (xmlAttrPtr cur);

Do a copy of an attribute list.

cur : the first attribute
Returns : a new xmlAttrPtr, or NULL in case of error.


xmlCopyDtd()

xmlDtdPtr   xmlCopyDtd                      (xmlDtdPtr dtd);

Do a copy of the dtd.

dtd : the dtd
Returns : a new xmlDtdPtr, or NULL in case of error.


xmlCopyDoc()

xmlDocPtr   xmlCopyDoc                      (xmlDocPtr doc,
+                                             int recursive);

Do a copy of the document info. If recursive, the content tree will +be copied too as well as Dtd, namespaces and entities.

doc : the document
recursive : if 1 do a recursive copy.
Returns : a new xmlDocPtr, or NULL in case of error.


xmlNewDocNode()

xmlNodePtr  xmlNewDocNode                   (xmlDocPtr doc,
+                                             xmlNsPtr ns,
+                                             const CHAR *name,
+                                             CHAR *content);

Creation of a new node element within a document. ns and content +are optionnal (NULL).

doc : the document
ns : namespace if any
name : the node name
content : the text content if any
Returns :a pointer to the new node object.


xmlNewNode()

xmlNodePtr  xmlNewNode                      (xmlNsPtr ns,
+                                             const CHAR *name);

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.

ns : namespace if any
name : the node name
Returns :a pointer to the new node object.


xmlNewChild()

xmlNodePtr  xmlNewChild                     (xmlNodePtr parent,
+                                             xmlNsPtr ns,
+                                             const CHAR *name,
+                                             CHAR *content);

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.

parent : the parent node
ns : a namespace if any
name : the name of the child
content : the content of the child if any.
Returns :a pointer to the new node object.


xmlNewDocText()

xmlNodePtr  xmlNewDocText                   (xmlDocPtr doc,
+                                             const CHAR *content);

Creation of a new text node within a document.

doc : the document
content : the text content
Returns :a pointer to the new node object.


xmlNewText()

xmlNodePtr  xmlNewText                      (const CHAR *content);

Creation of a new text node.

content : the text content
Returns :a pointer to the new node object.


xmlNewDocTextLen()

xmlNodePtr  xmlNewDocTextLen                (xmlDocPtr doc,
+                                             const CHAR *content,
+                                             int len);

Creation of a new text node with an extra content lenght parameter. The +text node pertain to a given document.

doc : the document
content : the text content
len : the text len.
Returns :a pointer to the new node object.


xmlNewTextLen()

xmlNodePtr  xmlNewTextLen                   (const CHAR *content,
+                                             int len);

Creation of a new text node with an extra parameter for the content's lenght

content : the text content
len : the text len.
Returns :a pointer to the new node object.


xmlNewDocComment()

xmlNodePtr  xmlNewDocComment                (xmlDocPtr doc,
+                                             CHAR *content);

Creation of a new node containing a commentwithin a document.

doc : the document
content : the comment content
Returns :a pointer to the new node object.


xmlNewComment()

xmlNodePtr  xmlNewComment                   (CHAR *content);

Creation of a new node containing a comment.

content : the comment content
Returns :a pointer to the new node object.


xmlNewReference()

xmlNodePtr  xmlNewReference                 (xmlDocPtr doc,
+                                             const CHAR *name);

Creation of a new reference node.

doc : the document
name : the reference name, or the reference string with & and ;
Returns :a pointer to the new node object.


xmlCopyNode()

xmlNodePtr  xmlCopyNode                     (xmlNodePtr node,
+                                             int recursive);

Do a copy of the node.

node : the node
recursive : if 1 do a recursive copy.
Returns : a new xmlNodePtr, or NULL in case of error.


xmlCopyNodeList()

xmlNodePtr  xmlCopyNodeList                 (xmlNodePtr node);

Do a recursive copy of the node list.

node : the first node in the list.
Returns : a new xmlNodePtr, or NULL in case of error.


xmlGetLastChild()

xmlNodePtr  xmlGetLastChild                 (xmlNodePtr parent);

Search the last child of a node.

parent : the parent node
Returns :the last child or NULL if none.


xmlNodeIsText()

int         xmlNodeIsText                   (xmlNodePtr node);

Is this node a Text node ?

node : the node
Returns :1 yes, 0 no


xmlAddChild()

xmlNodePtr  xmlAddChild                     (xmlNodePtr parent,
+                                             xmlNodePtr cur);

Add a new child element, to parent, at the end of the child list.

parent : the parent node
cur : the child node
Returns :the child or NULL in case of error.


xmlUnlinkNode()

void        xmlUnlinkNode                   (xmlNodePtr cur);

Unlink a node from it's current context, the node is not freed

cur : the node


xmlTextMerge()

xmlNodePtr  xmlTextMerge                    (xmlNodePtr first,
+                                             xmlNodePtr second);

Merge two text nodes into one

first : the first text node
second : the second text node being merged
Returns :the first text node augmented


xmlTextConcat()

void        xmlTextConcat                   (xmlNodePtr node,
+                                             const CHAR *content,
+                                             int len);

Concat the given string at the end of the existing node content

node : the node
content : the content
len : content lenght


xmlFreeNodeList()

void        xmlFreeNodeList                 (xmlNodePtr cur);

Free a node and all its siblings, this is a recursive behaviour, all +the childs are freed too.

cur : the first node in the list


xmlFreeNode()

void        xmlFreeNode                     (xmlNodePtr cur);

Free a node, this is a recursive behaviour, all the childs are freed too.

cur : the node


xmlSearchNs()

xmlNsPtr    xmlSearchNs                     (xmlDocPtr doc,
+                                             xmlNodePtr node,
+                                             const CHAR *nameSpace);

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.

doc : the document
node : the current node
nameSpace : the namespace string
Returns :the namespace pointer or NULL.


xmlSearchNsByHref()

xmlNsPtr    xmlSearchNsByHref               (xmlDocPtr doc,
+                                             xmlNodePtr node,
+                                             const CHAR *href);

Search a Ns aliasing a given URI. Recurse on the parents until it finds +the defined namespace or return NULL otherwise.

doc : the document
node : the current node
href : the namespace value
Returns :the namespace pointer or NULL.


xmlSetNs()

void        xmlSetNs                        (xmlNodePtr node,
+                                             xmlNsPtr ns);

Associate a namespace to a node, a posteriori.

node : a node in the document
ns : a namespace pointer


xmlCopyNamespace()

xmlNsPtr    xmlCopyNamespace                (xmlNsPtr cur);

Do a copy of the namespace.

cur : the namespace
Returns : a new xmlNsPtr, or NULL in case of error.


xmlCopyNamespaceList()

xmlNsPtr    xmlCopyNamespaceList            (xmlNsPtr cur);

Do a copy of an namespace list.

cur : the first namespace
Returns : a new xmlNsPtr, or NULL in case of error.


xmlSetProp()

xmlAttrPtr  xmlSetProp                      (xmlNodePtr node,
+                                             const CHAR *name,
+                                             const CHAR *value);

Set (or reset) an attribute carried by a node.

node : the node
name : the attribute name
value : the attribute value
Returns :the attribute pointer.


xmlGetProp()

CHAR*       xmlGetProp                      (xmlNodePtr node,
+                                             const CHAR *name);

Search and get the value of an attribute associated to a node +This does the entity substitution.

node : the node
name : the attribute name
Returns :the attribute value or NULL if not found.


xmlStringGetNodeList()

xmlNodePtr  xmlStringGetNodeList            (xmlDocPtr doc,
+                                             const CHAR *value);

Parse the value string and build the node list associated. Should +produce a flat tree with only TEXTs and ENTITY_REFs.

doc : the document
value : the value of the attribute
Returns :a pointer to the first child


xmlStringLenGetNodeList()

xmlNodePtr  xmlStringLenGetNodeList         (xmlDocPtr doc,
+                                             const CHAR *value,
+                                             int len);

Parse the value string and build the node list associated. Should +produce a flat tree with only TEXTs and ENTITY_REFs.

doc : the document
value : the value of the text
len : the length of the string value
Returns :a pointer to the first child


xmlNodeListGetString()

CHAR*       xmlNodeListGetString            (xmlDocPtr doc,
+                                             xmlNodePtr list,
+                                             int inLine);

Returns the string equivalent to the text contained in the Node list +made of TEXTs and ENTITY_REFs

doc : the document
list : a Node list
inLine : should we replace entity contents or show their external form
Returns :a pointer to the string copy, the calller must free it.


xmlNodeSetContent()

void        xmlNodeSetContent               (xmlNodePtr cur,
+                                             const CHAR *content);

Replace the content of a node.

cur : the node being modified
content : the new value of the content


xmlNodeSetContentLen()

void        xmlNodeSetContentLen            (xmlNodePtr cur,
+                                             const CHAR *content,
+                                             int len);

Replace the content of a node.

cur : the node being modified
content : the new value of the content
len : the size of content


xmlNodeAddContent()

void        xmlNodeAddContent               (xmlNodePtr cur,
+                                             const CHAR *content);

Append the extra substring to the node content.

cur : the node being modified
content : extra content


xmlNodeAddContentLen()

void        xmlNodeAddContentLen            (xmlNodePtr cur,
+                                             const CHAR *content,
+                                             int len);

Append the extra substring to the node content.

cur : the node being modified
content : extra content
len : the size of content


xmlNodeGetContent()

CHAR*       xmlNodeGetContent               (xmlNodePtr cur);

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 CHAR * or NULL if no content is available.


xmlBufferWriteCHAR()

void        xmlBufferWriteCHAR              (const CHAR *string);

routine which manage and grows an output buffer. This one add +CHARs at the end of the array.

string : the string to add


xmlBufferWriteChar()

void        xmlBufferWriteChar              (const char *string);

routine which manage and grows an output buffer. This one add +C chars at the end of the array.

string : the string to add


xmlDocDumpMemory()

void        xmlDocDumpMemory                (xmlDocPtr cur,
+                                             CHAR **mem,
+                                             int *size);

Dump an XML document in memory and return the CHAR * and it's size. +It's up to the caller to free the memory.

cur : the document
mem : OUT: the memory pointer
size : OUT: the memory lenght


xmlDocDump()

void        xmlDocDump                      (FILE *f,
+                                             xmlDocPtr cur);

Dump an XML document to an open FILE.

f : the FILE*
cur : the document


xmlSaveFile()

int         xmlSaveFile                     (const char *filename,
+                                             xmlDocPtr cur);

Dump an XML document to a file. Will use compression if +compiled in and enabled.

filename : the filename
cur : the document
Returns : the number of file written or -1 in case of failure.


xmlGetDocCompressMode()

int         xmlGetDocCompressMode           (xmlDocPtr doc);

get the compression ratio for a document, ZLIB based

doc : the document
Returns :0 (uncompressed) to 9 (max compression)


xmlSetDocCompressMode()

void        xmlSetDocCompressMode           (xmlDocPtr doc,
+                                             int mode);

set the compression ratio for a document, ZLIB based +Correct values: 0 (uncompressed) to 9 (max compression)

doc : the document
mode : the compression ratio


xmlGetCompressMode()

int         xmlGetCompressMode              (void);

get the default compression mode used, ZLIB based.

Returns :0 (uncompressed) to 9 (max compression)


xmlSetCompressMode()

void        xmlSetCompressMode              (int mode);

set the default compression mode used, ZLIB based +Correct values: 0 (uncompressed) to 9 (max compression)

mode : the compression ratio


PrevHomeNext
parserUpentities
\ No newline at end of file diff --git a/doc/html/gnome-xml-valid.html b/doc/html/gnome-xml-valid.html new file mode 100644 index 00000000..b6b6046f --- /dev/null +++ b/doc/html/gnome-xml-valid.html @@ -0,0 +1,2134 @@ +valid
Gnome XML Library Reference Manual
PrevNext

valid

Name

valid — one line description goes here.

Synopsis


+
+#define     XML_MIN_NOTATION_TABLE
+typedef     xmlNotationTablePtr
+#define     XML_MIN_ELEMENT_TABLE
+typedef     xmlElementTablePtr
+#define     XML_MIN_ATTRIBUTE_TABLE
+typedef     xmlAttributeTablePtr
+xmlNotationPtr xmlAddNotationDecl           (xmlDtdPtr dtd,
+                                             CHAR *name,
+                                             CHAR *PublicID,
+                                             CHAR *SystemID);
+xmlNotationTablePtr xmlCopyNotationTable    (xmlNotationTablePtr table);
+void        xmlFreeNotationTable            (xmlNotationTablePtr table);
+void        xmlDumpNotationTable            (xmlNotationTablePtr table);
+xmlElementContentPtr xmlNewElementContent   (CHAR *name,
+                                             int type);
+xmlElementContentPtr xmlCopyElementContent  (xmlElementContentPtr content);
+void        xmlFreeElementContent           (xmlElementContentPtr cur);
+xmlElementPtr xmlAddElementDecl             (xmlDtdPtr dtd,
+                                             CHAR *name,
+                                             int type,
+                                             xmlElementContentPtr content);
+xmlElementTablePtr xmlCopyElementTable      (xmlElementTablePtr table);
+void        xmlFreeElementTable             (xmlElementTablePtr table);
+void        xmlDumpElementTable             (xmlElementTablePtr table);
+xmlEnumerationPtr xmlCreateEnumeration      (CHAR *name);
+void        xmlFreeEnumeration              (xmlEnumerationPtr cur);
+xmlEnumerationPtr xmlCopyEnumeration        (xmlEnumerationPtr cur);
+xmlAttributePtr xmlAddAttributeDecl         (xmlDtdPtr dtd,
+                                             CHAR *elem,
+                                             CHAR *name,
+                                             int type,
+                                             int def,
+                                             CHAR *defaultValue,
+                                             xmlEnumerationPtr tree);
+xmlAttributeTablePtr xmlCopyAttributeTable  (xmlAttributeTablePtr table);
+void        xmlFreeAttributeTable           (xmlAttributeTablePtr table);
+void        xmlDumpAttributeTable           (xmlAttributeTablePtr table);

Description

Details


XML_MIN_NOTATION_TABLE

#define XML_MIN_NOTATION_TABLE	32


xmlNotationTablePtr

typedef xmlNotationTable *xmlNotationTablePtr;


XML_MIN_ELEMENT_TABLE

#define XML_MIN_ELEMENT_TABLE	32


xmlElementTablePtr

typedef xmlElementTable *xmlElementTablePtr;


XML_MIN_ATTRIBUTE_TABLE

#define XML_MIN_ATTRIBUTE_TABLE	32


xmlAttributeTablePtr

typedef xmlAttributeTable *xmlAttributeTablePtr;


xmlAddNotationDecl()

xmlNotationPtr xmlAddNotationDecl           (xmlDtdPtr dtd,
+                                             CHAR *name,
+                                             CHAR *PublicID,
+                                             CHAR *SystemID);

Register a new notation declaration

dtd : pointer to the DTD
name : the entity name
PublicID : the public identifier or NULL
SystemID : the system identifier or NULL
Returns :NULL if not, othervise the entity


xmlCopyNotationTable()

xmlNotationTablePtr xmlCopyNotationTable    (xmlNotationTablePtr table);

Build a copy of a notation table.

table : A notation table
Returns :the new xmlNotationTablePtr or NULL in case of error.


xmlFreeNotationTable()

void        xmlFreeNotationTable            (xmlNotationTablePtr table);

Deallocate the memory used by an entities hash table.

table : An notation table


xmlDumpNotationTable()

void        xmlDumpNotationTable            (xmlNotationTablePtr table);

This will dump the content of the notation table as an XML DTD definition

NOTE: TODO an extra parameter allowing a reentant implementation will +be added.

table : A notation table


xmlNewElementContent()

xmlElementContentPtr xmlNewElementContent   (CHAR *name,
+                                             int type);

Allocate an element content structure.

name : the subelement name or NULL
type : the type of element content decl
Returns :NULL if not, othervise the new element content structure


xmlCopyElementContent()

xmlElementContentPtr xmlCopyElementContent  (xmlElementContentPtr content);

Build a copy of an element content description.

content : An element content pointer.
Returns :the new xmlElementContentPtr or NULL in case of error.


xmlFreeElementContent()

void        xmlFreeElementContent           (xmlElementContentPtr cur);

Free an element content structure. This is a recursive call !

cur : the element content tree to free


xmlAddElementDecl()

xmlElementPtr xmlAddElementDecl             (xmlDtdPtr dtd,
+                                             CHAR *name,
+                                             int type,
+                                             xmlElementContentPtr content);

Register a new element declaration

dtd : pointer to the DTD
name : the entity name
type : the element type
content : the element content tree or NULL
Returns :NULL if not, othervise the entity


xmlCopyElementTable()

xmlElementTablePtr xmlCopyElementTable      (xmlElementTablePtr table);

Build a copy of an element table.

table : An element table
Returns :the new xmlElementTablePtr or NULL in case of error.


xmlFreeElementTable()

void        xmlFreeElementTable             (xmlElementTablePtr table);

Deallocate the memory used by an element hash table.

table : An element table


xmlDumpElementTable()

void        xmlDumpElementTable             (xmlElementTablePtr table);

This will dump the content of the element table as an XML DTD definition

NOTE: TODO an extra parameter allowing a reentant implementation will +be added.

table : An element table


xmlCreateEnumeration()

xmlEnumerationPtr xmlCreateEnumeration      (CHAR *name);

create and initialize an enumeration attribute node.

name : the enumeration name or NULL
Returns :the xmlEnumerationPtr just created or NULL in case +of error.


xmlFreeEnumeration()

void        xmlFreeEnumeration              (xmlEnumerationPtr cur);

free an enumeration attribute node (recursive).

cur : the tree to free.


xmlCopyEnumeration()

xmlEnumerationPtr xmlCopyEnumeration        (xmlEnumerationPtr cur);

Copy an enumeration attribute node (recursive).

cur : the tree to copy.
Returns :the xmlEnumerationPtr just created or NULL in case +of error.


xmlAddAttributeDecl()

xmlAttributePtr xmlAddAttributeDecl         (xmlDtdPtr dtd,
+                                             CHAR *elem,
+                                             CHAR *name,
+                                             int type,
+                                             int def,
+                                             CHAR *defaultValue,
+                                             xmlEnumerationPtr tree);

Register a new attribute declaration

dtd : pointer to the DTD
elem : the element name
name : the attribute name
type : the attribute type
def : the attribute default type
defaultValue : the attribute default value
tree : if it's an enumeration, the associated list
Returns :NULL if not, othervise the entity


xmlCopyAttributeTable()

xmlAttributeTablePtr xmlCopyAttributeTable  (xmlAttributeTablePtr table);

Build a copy of an attribute table.

table : An attribute table
Returns :the new xmlAttributeTablePtr or NULL in case of error.


xmlFreeAttributeTable()

void        xmlFreeAttributeTable           (xmlAttributeTablePtr table);

Deallocate the memory used by an entities hash table.

table : An attribute table


xmlDumpAttributeTable()

void        xmlDumpAttributeTable           (xmlAttributeTablePtr table);

This will dump the content of the attribute table as an XML DTD definition

NOTE: TODO an extra parameter allowing a reentant implementation will +be added.

table : An attribute table


PrevHomeNext
entitiesUperror
\ No newline at end of file diff --git a/doc/html/index.sgml b/doc/html/index.sgml new file mode 100644 index 00000000..a8a1de26 --- /dev/null +++ b/doc/html/index.sgml @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/libxml.html b/doc/html/libxml.html new file mode 100644 index 00000000..0f4d7b39 --- /dev/null +++ b/doc/html/libxml.html @@ -0,0 +1,169 @@ +Gnome XML Library
Gnome XML Library Reference Manual
PrevNext

Chapter 1. Gnome XML Library

Table of Contents
parser — one line description goes here.
tree — one line description goes here.
entities — one line description goes here.
valid — one line description goes here.
error — one line description goes here.
parserInternals — one line description goes here.
The parser general interfaces + Manipulation the tree generated by the parser + Routines for handling entities + All the stuff defined in DTDs + Callbacks in case of parsing error + Access to the parser internal routines +

PrevHomeNext
Gnome XML Library Reference Manual parser
\ No newline at end of file