Function
const CHAR *
getPublicId
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
Return the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
Returns a CHAR *
Function
const CHAR *
getSystemId
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
Return the system ID, basically URL or filename e.g.
http
//www.sgmlsource.com/dtds/memo.dtd
Returns a CHAR *
Function
int
getLineNumber
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
Return the line number of the current parsing point.
Returns an int
Function
int
getColumnNumber
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
Return the column number of the current parsing point.
Returns an int
Function
int
isStandalone
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
Is this document tagged standalone ?
Returns 1 if true
Function
int
hasInternalSubset
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
Does this document has an internal subset
Returns 1 if true
Function
int
hasExternalSubset
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
Does this document has an external subset
Returns 1 if true
Function
void
internalSubset
(void * ctx
, const CHAR * name
, const CHAR * ExternalID
, const CHAR * SystemID
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- -- undescribed --
- const CHAR * ExternalID
- -- undescribed --
- const CHAR * SystemID
- -- undescribed --
Description
Does this document has an internal subset
Function
xmlParserInputPtr
resolveEntity
(void * ctx
, const CHAR * publicId
, const CHAR * systemId
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * publicId
- The public ID of the entity
- const CHAR * systemId
- The system ID of the entity
Description
Function
xmlEntityPtr
getEntity
(void * ctx
, const CHAR * name
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- The entity name
Description
Function
void
entityDecl
(void * ctx
, const CHAR * name
, int type
, const CHAR * publicId
, const CHAR * systemId
, CHAR * content
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- the entity name
- int type
- the entity type
- const CHAR * publicId
- The public ID of the entity
- const CHAR * systemId
- The system ID of the entity
- CHAR * content
- the entity value (without processing).
Description
An entity definition has been parsed
Function
void
attributeDecl
(void * ctx
, const CHAR * elem
, const CHAR * name
, int type
, int def
, const CHAR * defaultValue
, xmlEnumerationPtr tree
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * elem
- -- undescribed --
- const CHAR * name
- the attribute name
- int type
- the attribute type
- int def
- -- undescribed --
- const CHAR * defaultValue
- -- undescribed --
- xmlEnumerationPtr tree
- -- undescribed --
Description
An attribute definition has been parsed
Function
void
elementDecl
(void * ctx
, const CHAR * name
, int type
, xmlElementContentPtr content
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- the element name
- int type
- the element type
- xmlElementContentPtr content
- the element value (without processing).
Description
An element definition has been parsed
Function
void
notationDecl
(void * ctx
, const CHAR * name
, const CHAR * publicId
, const CHAR * systemId
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- The name of the notation
- const CHAR * publicId
- The public ID of the entity
- const CHAR * systemId
- The system ID of the entity
Description
What to do when a notation declaration has been parsed.
TODO Not handled currently.
Function
void
unparsedEntityDecl
(void * ctx
, const CHAR * name
, const CHAR * publicId
, const CHAR * systemId
, const CHAR * notationName
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- The name of the entity
- const CHAR * publicId
- The public ID of the entity
- const CHAR * systemId
- The system ID of the entity
- const CHAR * notationName
- the name of the notation
Description
What to do when an unparsed entity declaration is parsed
TODO Create an Entity node.
Function
void
setDocumentLocator
(void * ctx
, xmlSAXLocatorPtr loc
)
Arguments
- void * ctx
- -- undescribed --
- xmlSAXLocatorPtr loc
- A SAX Locator
Description
Receive the document locator at startup, actually xmlDefaultSAXLocator
Everything is available on the context, so this is useless in our case.
Function
void
startDocument
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
called when the document start being processed.
Function
void
endDocument
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
called when the document end has been detected.
Function
void
attribute
(void * ctx
, const CHAR * fullname
, const CHAR * value
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * fullname
- -- undescribed --
- const CHAR * value
- The attribute value
Description
Handle an attribute that has been read by the parser.
The default handling is to convert the attribute into an
DOM subtree and past it in a new xmlAttr element added to
the element.
Function
void
startElement
(void * ctx
, const CHAR * fullname
, const CHAR ** atts
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * fullname
- -- undescribed --
- const CHAR ** atts
- An array of name/value attributes pairs, NULL terminated
Description
called when an opening tag has been processed.
TODO We currently have a small pblm with the arguments ...
Function
void
endElement
(void * ctx
, const CHAR * name
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- The element name
Description
called when the end of an element has been detected.
Function
void
reference
(void * ctx
, const CHAR * name
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- The entity name
Description
called when an entity reference is detected.
Function
void
characters
(void * ctx
, const CHAR * ch
, int len
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * ch
- a CHAR string
- int len
- the number of CHAR
Description
receiving some chars from the parser.
Question
Function
void
ignorableWhitespace
(void * ctx
, const CHAR * ch
, int len
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * ch
- a CHAR string
- int len
- the number of CHAR
Description
receiving some ignorable whitespaces from the parser.
Question
Function
void
processingInstruction
(void * ctx
, const CHAR * target
, const CHAR * data
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * target
- the target name
- const CHAR * data
- the PI data's
Description
A processing instruction has been parsed.
Function
void
globalNamespace
(void * ctx
, const CHAR * href
, const CHAR * prefix
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * href
- the namespace associated URN
- const CHAR * prefix
- the namespace prefix
Description
An old global namespace has been parsed.
Function
void
setNamespace
(void * ctx
, const CHAR * name
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * name
- the namespace prefix
Description
Set the current element namespace.
Function
xmlNsPtr
getNamespace
(void * ctx
)
Arguments
- void * ctx
- -- undescribed --
Description
Get the current element namespace.
Function
int
checkNamespace
(void * ctx
, CHAR * namespace
)
Arguments
- void * ctx
- -- undescribed --
- CHAR * namespace
- the namespace to check against
Description
Check that the current element namespace is the same as the
one read upon parsing.
Function
void
namespaceDecl
(void * ctx
, const CHAR * href
, const CHAR * prefix
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * href
- the namespace associated URN
- const CHAR * prefix
- the namespace prefix
Description
A namespace has been parsed.
Function
void
comment
(void * ctx
, const CHAR * value
)
Arguments
- void * ctx
- -- undescribed --
- const CHAR * value
- the comment content
Description
A comment has been parsed.
Function
void
xmlDefaultSAXHandlerInit
( void
)
Arguments
- void
- -- undescribed --
Description
Function
int
isolat1ToUTF8
(unsigned char* out
, int outlen
, unsigned char* in
, int inlen
)
Arguments
- unsigned char* out
- a pointer ot an array of bytes to store the result
- int outlen
- the lenght of out
- unsigned char* in
- a pointer ot an array of ISO Latin 1 chars
- int inlen
- the lenght of in
Description
Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
block of chars out.
Returns the number of byte written, or -1 by lack of space.
Function
int
UTF8Toisolat1
(unsigned char* out
, int outlen
, unsigned char* in
, int inlen
)
Arguments
- unsigned char* out
- a pointer ot an array of bytes to store the result
- int outlen
- the lenght of out
- unsigned char* in
- a pointer ot an array of UTF-8 chars
- int inlen
- the lenght of in
Description
Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
block of chars out.
TODO
need a fallback mechanism ...
Returns the number of byte written, or -1 by lack of space, or -2
if the transcoding failed.
Function
int
UTF16ToUTF8
(unsigned char* out
, int outlen
, unsigned short* in
, int inlen
)
Arguments
- unsigned char* out
- a pointer ot an array of bytes to store the result
- int outlen
- the lenght of out
- unsigned short* in
- a pointer ot an array of UTF-16 chars (array of unsigned shorts)
- int inlen
- the lenght of in
Description
Take a block of UTF-16 ushorts in and try to convert it to an UTF-8
block of chars out.
Returns the number of byte written, or -1 by lack of space.
Function
int
UTF8ToUTF16
(unsigned short* out
, int outlen
, unsigned char* in
, int inlen
)
Arguments
- unsigned short* out
- a pointer ot an array of shorts to store the result
- int outlen
- the lenght of out (number of shorts)
- unsigned char* in
- a pointer ot an array of UTF-8 chars
- int inlen
- the lenght of in
Description
Take a block of UTF-8 chars in and try to convert it to an UTF-16
block of chars out.
TODO
need a fallback mechanism ...
Returns the number of byte written, or -1 by lack of space, or -2
if the transcoding failed.
Function
xmlCharEncoding
xmlDetectCharEncoding
(const unsigned char* in
)
Arguments
- const unsigned char* in
- a pointer to the first bytes of the XML entity, must be at least
4 bytes long.
Description
Function
xmlCharEncoding
xmlParseCharEncoding
(const char* name
)
Arguments
- const char* name
- the encoding name as parsed, in UTF-8 format (ASCCI actually)
Description
Function
void
xmlInitializePredefinedEntities
( void
)
Arguments
- void
- -- undescribed --
Description
Function
xmlEntityPtr
xmlGetPredefinedEntity
(const CHAR * name
)
Arguments
- const CHAR * name
- the entity name
Description
Check whether this name is an predefined entity.
Returns NULL if not, othervise the entity
Function
void
xmlAddDtdEntity
(xmlDocPtr doc
, const CHAR * name
, int type
, const CHAR * ExternalID
, const CHAR * SystemID
, CHAR * content
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * name
- the entity name
- int type
- the entity type XML_xxx_yyy_ENTITY
- const CHAR * ExternalID
- the entity external ID if available
- const CHAR * SystemID
- the entity system ID if available
- CHAR * content
- the entity content
Description
Register a new entity for this document DTD.
Function
void
xmlAddDocEntity
(xmlDocPtr doc
, const CHAR * name
, int type
, const CHAR * ExternalID
, const CHAR * SystemID
, CHAR * content
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * name
- the entity name
- int type
- the entity type XML_xxx_yyy_ENTITY
- const CHAR * ExternalID
- the entity external ID if available
- const CHAR * SystemID
- the entity system ID if available
- CHAR * content
- the entity content
Description
Register a new entity for this document.
Function
xmlEntityPtr
xmlGetDtdEntity
(xmlDocPtr doc
, const CHAR * name
)
Arguments
- xmlDocPtr doc
- the document referencing the entity
- const CHAR * name
- the entity name
Description
Function
xmlEntityPtr
xmlGetDocEntity
(xmlDocPtr doc
, const CHAR * name
)
Arguments
- xmlDocPtr doc
- the document referencing the entity
- const CHAR * name
- the entity name
Description
Function
CHAR *
xmlEncodeEntities
(xmlDocPtr doc
, const CHAR * input
)
Arguments
- xmlDocPtr doc
- the document containing the string
- const CHAR * input
- A string to convert to XML.
Description
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.
Returns A newly allocated string with the substitution done.
Function
xmlEntitiesTablePtr
xmlCreateEntitiesTable
( void
)
Arguments
- void
- -- undescribed --
Description
create and initialize an empty entities hash table.
Returns the xmlEntitiesTablePtr just created or NULL in case of error.
Function
void
xmlFreeEntitiesTable
(xmlEntitiesTablePtr table
)
Arguments
- xmlEntitiesTablePtr table
- An entity table
Description
Deallocate the memory used by an entities hash table.
Function
xmlEntitiesTablePtr
xmlCopyEntitiesTable
(xmlEntitiesTablePtr table
)
Arguments
- xmlEntitiesTablePtr table
- An entity table
Description
Function
void
xmlDumpEntitiesTable
(xmlBufferPtr buf
, xmlEntitiesTablePtr table
)
Arguments
- xmlBufferPtr buf
- An XML buffer.
- xmlEntitiesTablePtr table
- An entity table
Description
This will dump the content of the entity table as an XML DTD definition
Function
void
xmlParserError
(void * ctx
, const char * msg
, ...
)
Arguments
- void * ctx
- -- undescribed --
- const char * msg
- the message to display/transmit
@...: extra parameters for the message display
- ...
- -- undescribed --
Description
Display and format an error messages, gives file, line, position and
extra parameters.
Function
void
xmlParserWarning
(void * ctx
, const char * msg
, ...
)
Arguments
- void * ctx
- -- undescribed --
- const char * msg
- the message to display/transmit
@...: extra parameters for the message display
- ...
- -- undescribed --
Description
Display and format a warning messages, gives file, line, position and
extra parameters.
Function
CHAR
xmlPopInput
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
xmlPopInput
the current input pointed by ctxt->input came to an end
pop it and return the next char.
TODO A deallocation of the popped Input structure is needed
Returns the current CHAR in the parser context
Function
void
xmlPushInput
(xmlParserCtxtPtr ctxt
, xmlParserInputPtr input
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- xmlParserInputPtr input
- an XML parser input fragment (entity, XML fragment ...).
xmlPushInput
switch to a new input stream which is stacked on top
of the previous one(s).
Function
void
xmlFreeInputStream
(xmlParserInputPtr input
)
Arguments
- xmlParserInputPtr input
- an xmlParserInputPtr
Description
Function
xmlParserInputPtr
xmlNewEntityInputStream
(xmlParserCtxtPtr ctxt
, xmlEntityPtr entity
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- xmlEntityPtr entity
- an Entity pointer
Description
Create a new input stream based on a memory buffer.
Returns the new input stream
Function
xmlParserInputPtr
xmlNewStringInputStream
(xmlParserCtxtPtr ctxt
, CHAR * entity
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- CHAR * entity
- an Entity pointer
Description
Create a new input stream based on a memory buffer.
Returns the new input stream
Function
xmlParserInputPtr
xmlNewInputFromFile
(xmlParserCtxtPtr ctxt
, const char * filename
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- const char * filename
- the filename to use as entity
Description
Function
CHAR *
xmlDecodeEntities
(xmlParserCtxtPtr ctxt
, int len
, int what
, CHAR end
, CHAR end2
, CHAR end3
)
Arguments
- xmlParserCtxtPtr ctxt
- the parser context
- int len
- the len to decode (in bytes !), -1 for no size limit
- int what
- combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
- CHAR end
- an end marker CHAR, 0 if none
- CHAR end2
- an end marker CHAR, 0 if none
- CHAR end3
- an end marker CHAR, 0 if none
Description
[67] Reference ::= EntityRef | CharRef
[69] PEReference ::= '%' Name ';'
Returns A newly allocated string with the substitution done. The caller
must deallocate it !
Function
void
xmlSwitchEncoding
(xmlParserCtxtPtr ctxt
, xmlCharEncoding enc
)
Arguments
- xmlParserCtxtPtr ctxt
- the parser context
- xmlCharEncoding enc
- -- undescribed --
Description
change the input functions when discovering the character encoding
of a given entity.
Function
CHAR *
xmlStrndup
(const CHAR * cur
, int len
)
Arguments
- const CHAR * cur
- the input CHAR *
- int len
- the len of cur
Description
Function
CHAR *
xmlStrdup
(const CHAR * cur
)
Arguments
- const CHAR * cur
- the input CHAR *
Description
Function
CHAR *
xmlCharStrndup
(const char * cur
, int len
)
Arguments
- const char * cur
- the input char *
- int len
- the len of cur
Description
Function
CHAR *
xmlCharStrdup
(const char * cur
)
Arguments
- const char * cur
- the input char *
Description
Function
int
xmlStrcmp
(const CHAR * str1
, const CHAR * str2
)
Arguments
- const CHAR * str1
- the first CHAR *
- const CHAR * str2
- the second CHAR *
Description
Function
int
xmlStrncmp
(const CHAR * str1
, const CHAR * str2
, int len
)
Arguments
- const CHAR * str1
- the first CHAR *
- const CHAR * str2
- the second CHAR *
- int len
- the max comparison length
Description
Function
CHAR *
xmlStrchr
(const CHAR * str
, CHAR val
)
Arguments
- const CHAR * str
- the CHAR * array
- CHAR val
- the CHAR to search
Description
Function
int
xmlStrlen
(const CHAR * str
)
Arguments
- const CHAR * str
- the CHAR * array
Description
Function
CHAR *
xmlStrncat
(CHAR * cur
, const CHAR * add
, int len
)
Arguments
- CHAR * cur
- the original CHAR * array
- const CHAR * add
- the CHAR * array added
- int len
- the length of add
Description
Function
CHAR *
xmlStrcat
(CHAR * cur
, const CHAR * add
)
Arguments
- CHAR * cur
- the original CHAR * array
- const CHAR * add
- the CHAR * array added
Description
Function
static int
areBlanks
(xmlParserCtxtPtr ctxt
, const CHAR * str
, int len
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- const CHAR * str
- a CHAR *
- int len
- the size of str
Description
Is this a sequence of blank chars that one can ignore ?
TODO
Function
void
xmlHandleEntity
(xmlParserCtxtPtr ctxt
, xmlEntityPtr entity
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- xmlEntityPtr entity
- an XML entity pointer.
Description
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
Function
CHAR *
xmlNamespaceParseNCName
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML namespace name.
[NS 3] NCName ::= (Letter | '_') (NCNameChar)*
[NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
CombiningChar | Extender
Returns the namespace name or NULL
Function
CHAR *
xmlNamespaceParseQName
(xmlParserCtxtPtr ctxt
, CHAR ** prefix
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- CHAR ** prefix
- a CHAR **
Description
parse an XML qualified name
[NS 5] QName ::= (Prefix ':')? LocalPart
[NS 6] Prefix ::= NCName
[NS 7] LocalPart ::= NCName
Returns the function returns the local part, and prefix is updated
to get the Prefix if any.
Function
CHAR *
xmlSplitQName
(const CHAR * name
, CHAR ** prefix
)
Arguments
- const CHAR * name
- an XML parser context
- CHAR ** prefix
- a CHAR **
Description
parse an XML qualified name string
[NS 5] QName ::= (Prefix ':')? LocalPart
[NS 6] Prefix ::= NCName
[NS 7] LocalPart ::= NCName
Returns the function returns the local part, and prefix is updated
to get the Prefix if any.
Function
CHAR *
xmlNamespaceParseNSDef
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse a namespace prefix declaration
[NS 1] NSDef ::= PrefixDef Eq SystemLiteral
[NS 2] PrefixDef ::= 'xmlns' (':' NCName)?
Returns the namespace name
Function
CHAR *
xmlParseQuotedString
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Function
void
xmlParseNamespace
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
[OLD] xmlParseNamespace: parse specific PI '
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
Function
CHAR *
xmlParseName
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML name.
[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
CombiningChar | Extender
[5] Name ::= (Letter | '_' | ':') (NameChar)*
[6] Names ::= Name (S Name)*
Returns the Name parsed or NULL
Function
CHAR *
xmlParseNmtoken
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML Nmtoken.
[7] Nmtoken ::= (NameChar)+
[8] Nmtokens ::= Nmtoken (S Nmtoken)*
Returns the Nmtoken parsed or NULL
Function
CHAR *
xmlParseEntityValue
(xmlParserCtxtPtr ctxt
, CHAR ** orig
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- CHAR ** orig
- if non-NULL store a copy of the original entity value
Description
parse a value for ENTITY decl.
[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' |
"'" ([^%&'] | PEReference | Reference)* "'"
Returns the EntityValue parsed with reference substitued or NULL
Function
CHAR *
xmlParseAttValue
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse a value for an attribute
Note
the parser won't do substitution of entities here, this
will be handled later in xmlStringGetNodeList, unless it was
asked for ctxt->replaceEntities != 0
[10] AttValue ::= '"' ([^<&"] | Reference)* '"' |
"'" ([^<&'] | Reference)* "'"
Returns the AttValue parsed or NULL.
Function
CHAR *
xmlParseSystemLiteral
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML Literal
[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
Returns the SystemLiteral parsed or NULL
Function
CHAR *
xmlParsePubidLiteral
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML public literal
[12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
Returns the PubidLiteral parsed or NULL.
Function
void
xmlParseCharData
(xmlParserCtxtPtr ctxt
, int cdata
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- int cdata
- int indicating whether we are within a CDATA section
Description
Function
CHAR *
xmlParseExternalID
(xmlParserCtxtPtr ctxt
, CHAR ** publicID
, int strict
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- CHAR ** publicID
- a CHAR** receiving PubidLiteral
- int strict
- indicate whether we should restrict parsing to only
production [75], see NOTE below
Description
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
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.
Function
void
xmlParseComment
(xmlParserCtxtPtr ctxt
, int create
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- int create
- should we create a node, or just skip the content
Description
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 ::= ''
Function
CHAR *
xmlParsePITarget
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse the name of a PI
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
Returns the PITarget name or NULL
Function
void
xmlParsePI
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML Processing Instruction.
[16] PI ::= '' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
The processing is transfered to SAX once parsed.
Function
void
xmlParseNotationDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse a notation declaration
[82] NotationDecl ::= ''
Hence there is actually 3 choices
Function
void
xmlParseEntityDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse
[70] EntityDecl ::= GEDecl | PEDecl
[71] GEDecl ::= ''
[72] PEDecl ::= ''
[73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
[74] PEDef ::= EntityValue | ExternalID
[76] NDataDecl ::= S 'NDATA' S Name
Function
int
xmlParseDefaultDecl
(xmlParserCtxtPtr ctxt
, CHAR ** value
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- CHAR ** value
- Receive a possible fixed default value for the attribute
Description
returns
XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED
or XML_ATTRIBUTE_FIXED.
Function
xmlEnumerationPtr
xmlParseNotationType
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Note
the leading 'NOTATION' S part has already being parsed...
Returns
the notation attribute tree built while parsing
Function
xmlEnumerationPtr
xmlParseEnumerationType
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Returns
the enumeration attribute tree built while parsing
Function
int
xmlParseEnumeratedType
(xmlParserCtxtPtr ctxt
, xmlEnumerationPtr * tree
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- xmlEnumerationPtr * tree
- the enumeration tree built while parsing
Description
parse an Enumerated attribute type.
[57] EnumeratedType ::= NotationType | Enumeration
[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
Returns
XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION
Function
int
xmlParseAttributeType
(xmlParserCtxtPtr ctxt
, xmlEnumerationPtr * tree
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- xmlEnumerationPtr * tree
- the enumeration tree built while parsing
Description
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'
Returns the attribute type
Function
void
xmlParseAttributeListDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Function
xmlElementContentPtr
xmlParseElementMixedContentDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
returns
the list of the xmlElementContentPtr describing the element choices
Function
xmlElementContentPtr
xmlParseElementChildrenContentDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
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? ')'
returns
the tree of xmlElementContentPtr describing the element
hierarchy.
Function
int
xmlParseElementContentDecl
(xmlParserCtxtPtr ctxt
, CHAR * name
, xmlElementContentPtr * result
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- CHAR * name
- the name of the element being defined.
- xmlElementContentPtr * result
- the Element Content pointer will be stored here if any
Description
returns
the type of element content XML_ELEMENT_TYPE_xxx
Function
int
xmlParseElementDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an Element declaration.
[45] elementdecl ::= ''
TODO There is a check [ VC: Unique Element Type Declaration ]
Returns the type of the element, or -1 in case of error
Function
void
xmlParseMarkupDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse Markup declarations
[29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl |
NotationDecl | PI | Comment
TODO There is a check [ VC: Proper Declaration/PE Nesting ]
Function
CHAR *
xmlParseTextDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML declaration header for external entities
[77] TextDecl ::= ''
Returns the only valuable info for an external parsed entity, the encoding
Function
void
xmlParseExternalSubset
(xmlParserCtxtPtr ctxt
, const CHAR * ExternalID
, const CHAR * SystemID
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- const CHAR * ExternalID
- -- undescribed --
- const CHAR * SystemID
- -- undescribed --
Description
parse Markup declarations from an external subset
[30] extSubset ::= textDecl? extSubsetDecl
[31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) *
TODO There is a check [ VC: Proper Declaration/PE Nesting ]
Function
int
xmlParseCharRef
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse Reference declarations
[66] CharRef ::= '' [0-9]+ ';' |
'' [0-9a-fA-F]+ ';'
Returns the value parsed (as an int)
Function
void
xmlParseReference
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Function
xmlEntityPtr
xmlParseEntityRef
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse ENTITY references declarations
[68] EntityRef ::= '&' Name ';'
Returns the xmlEntityPtr if found, or NULL otherwise.
Function
void
xmlParsePEReference
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Function
void
xmlParseDocTypeDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse a DOCTYPE declaration
[28] doctypedecl ::= ''
Function
CHAR *
xmlParseAttribute
(xmlParserCtxtPtr ctxt
, CHAR ** value
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- CHAR ** value
- a CHAR ** used to store the value of the attribute
Description
With namespace
[NS 11] Attribute ::= QName Eq AttValue
Also the case QName == xmlns:??? is handled independently as a namespace
definition.
Returns the attribute name, and the value in *value.
Function
void
xmlParseStartTag
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
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? '/>'
Function
void
xmlParseEndTag
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an end of tag
[42] ETag ::= '' Name S? '>'
With namespace
[NS 9] ETag ::= '' QName S? '>'
Function
void
xmlParseCDSect
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Parse escaped pure raw content.
[18] CDSect ::= CDStart CData CDEnd
[19] CDStart ::= '
[20] Data ::= (Char* - (Char* ']]>' Char*))
[21] CDEnd ::= ']]>'
Function
void
xmlParseContent
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Parse a content
Function
void
xmlParseElement
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML element, this is highly recursive
[39] element ::= EmptyElemTag | STag content ETag
[41] Attribute ::= Name Eq AttValue
Function
CHAR *
xmlParseVersionNum
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse the XML version value.
[26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+
Returns the string giving the XML version number, or NULL
Function
CHAR *
xmlParseVersionInfo
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse the XML version.
[24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")
[25] Eq ::= S? '=' S?
Returns the version string, e.g. "1.0"
Function
CHAR *
xmlParseEncName
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse the XML encoding name
[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
Returns the encoding name value or NULL
Function
CHAR *
xmlParseEncodingDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
TODO
Function
int
xmlParseSDDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse the XML standalone declaration
[32] SDDecl ::= S 'standalone' Eq
(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"'))
Returns 1 if standalone, 0 otherwise
Function
void
xmlParseXMLDecl
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
parse an XML declaration header
[23] XMLDecl ::= ''
Function
void
xmlParseMisc
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Function
int
xmlParseDocument
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
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*)?
Returns 0, -1 in case of error. the parser context is augmented
as a result of the parsing.
Function
xmlParserCtxtPtr
xmlCreateDocParserCtxt
(CHAR * cur
)
Arguments
- CHAR * cur
- a pointer to an array of CHAR
Description
Function
xmlDocPtr
xmlSAXParseDoc
(xmlSAXHandlerPtr sax
, CHAR * cur
, int recovery
)
Arguments
- xmlSAXHandlerPtr sax
- the SAX handler block
- CHAR * cur
- a pointer to an array of CHAR
- int recovery
- work in recovery mode, i.e. tries to read no Well Formed
documents
Description
Function
xmlDocPtr
xmlParseDoc
(CHAR * cur
)
Arguments
- CHAR * cur
- a pointer to an array of CHAR
Description
Function
xmlDtdPtr
xmlSAXParseDTD
(xmlSAXHandlerPtr sax
, const CHAR * ExternalID
, const CHAR * SystemID
)
Arguments
- xmlSAXHandlerPtr sax
- the SAX handler block
- const CHAR * ExternalID
- a NAME* containing the External ID of the DTD
- const CHAR * SystemID
- a NAME* containing the URL to the DTD
Description
Function
xmlDtdPtr
xmlParseDTD
(const CHAR * ExternalID
, const CHAR * SystemID
)
Arguments
- const CHAR * ExternalID
- a NAME* containing the External ID of the DTD
- const CHAR * SystemID
- a NAME* containing the URL to the DTD
Description
Function
xmlDocPtr
xmlRecoverDoc
(CHAR * cur
)
Arguments
- CHAR * cur
- a pointer to an array of CHAR
Description
Function
xmlParserCtxtPtr
xmlCreateFileParserCtxt
(const char * filename
)
Arguments
- const char * filename
- the filename
Description
Function
xmlDocPtr
xmlSAXParseFile
(xmlSAXHandlerPtr sax
, const char * filename
, int recovery
)
Arguments
- xmlSAXHandlerPtr sax
- the SAX handler block
- const char * filename
- the filename
- int recovery
- work in recovery mode, i.e. tries to read no Well Formed
documents
Description
Function
xmlDocPtr
xmlParseFile
(const char * filename
)
Arguments
- const char * filename
- the filename
Description
Function
xmlDocPtr
xmlRecoverFile
(const char * filename
)
Arguments
- const char * filename
- the filename
Description
Function
int
xmlSubstituteEntitiesDefault
(int val
)
Arguments
- int val
- int 0 or 1
Description
Set and return the previous value for default entity support.
Initially the parser always keep entity references instead of substituting
entity values in the output. This function has to be used to change the
default parser behaviour
SAX
:subtituteEntities() has to be used for changing that on a file by
file basis.
Returns the last value for 0 for no substitution, 1 for substitution.
Function
xmlParserCtxtPtr
xmlCreateMemoryParserCtxt
(char * buffer
, int size
)
Arguments
- char * buffer
- an pointer to a char array
- int size
- the siwe of the array
Description
Function
xmlDocPtr
xmlSAXParseMemory
(xmlSAXHandlerPtr sax
, char * buffer
, int size
, int recovery
)
Arguments
- xmlSAXHandlerPtr sax
- the SAX handler block
- char * buffer
- an pointer to a char array
- int size
- the siwe of the array
- int recovery
- work in recovery mode, i.e. tries to read no Well Formed
documents
Description
Function
xmlDocPtr
xmlParseMemory
(char * buffer
, int size
)
Arguments
- char * buffer
- an pointer to a char array
- int size
- the size of the array
Description
Function
xmlDocPtr
xmlRecoverMemory
(char * buffer
, int size
)
Arguments
- char * buffer
- an pointer to a char array
- int size
- the size of the array
Description
Function
void
xmlInitParserCtxt
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Initialize a parser context
Function
void
xmlFreeParserCtxt
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Free all the memory used by a parser context. However the parsed
document in ctxt->myDoc is not freed.
Function
void
xmlClearParserCtxt
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
Description
Clear (release owned resources) and reinitialize a parser context
Function
void
xmlSetupParserForBuffer
(xmlParserCtxtPtr ctxt
, const CHAR* buffer
, const char* filename
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- const CHAR* buffer
- a CHAR * buffer
- const char* filename
- a file name
Description
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
Function
const xmlParserNodeInfo*
xmlParserFindNodeInfo
(const xmlParserCtxt* ctx
, const xmlNode* node
)
Arguments
- const xmlParserCtxt* ctx
- -- undescribed --
- const xmlNode* node
- an XML node within the tree
Description
Function
void
xmlInitNodeInfoSeq
(xmlParserNodeInfoSeqPtr seq
)
Arguments
- xmlParserNodeInfoSeqPtr seq
- a node info sequence pointer
Description
-- Initialize (set to initial state) node info sequence
Function
void
xmlClearNodeInfoSeq
(xmlParserNodeInfoSeqPtr seq
)
Arguments
- xmlParserNodeInfoSeqPtr seq
- a node info sequence pointer
Description
-- Clear (release memory and reinitialize) node
info sequence
Function
unsigned long
xmlParserFindNodeInfoIndex
(const xmlParserNodeInfoSeq* seq
, const xmlNode* node
)
Arguments
- const xmlParserNodeInfoSeq* seq
- a node info sequence pointer
- const xmlNode* node
- an XML node pointer
Description
xmlParserFindNodeInfoIndex
Function
void
xmlParserAddNodeInfo
(xmlParserCtxtPtr ctxt
, const xmlParserNodeInfo* info
)
Arguments
- xmlParserCtxtPtr ctxt
- an XML parser context
- const xmlParserNodeInfo* info
- a node info sequence pointer
Description
Insert node info record into the sorted sequence
Function
int
isStandaloneDebug
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
Description
Is this document tagged standalone ?
Returns 1 if true
Function
int
hasInternalSubsetDebug
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
Description
Does this document has an internal subset
Returns 1 if true
Function
int
hasExternalSubsetDebug
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
Description
Does this document has an external subset
Returns 1 if true
Function
void
internalSubsetDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
, const CHAR * ExternalID
, const CHAR * SystemID
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- -- undescribed --
- const CHAR * ExternalID
- -- undescribed --
- const CHAR * SystemID
- -- undescribed --
Description
Does this document has an internal subset
Function
xmlParserInputPtr
resolveEntityDebug
(xmlParserCtxtPtr ctxt
, const CHAR * publicId
, const CHAR * systemId
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * publicId
- The public ID of the entity
- const CHAR * systemId
- The system ID of the entity
Description
Function
xmlEntityPtr
getEntityDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- The entity name
Description
Function
void
entityDeclDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
, int type
, const CHAR * publicId
, const CHAR * systemId
, CHAR * content
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- the entity name
- int type
- the entity type
- const CHAR * publicId
- The public ID of the entity
- const CHAR * systemId
- The system ID of the entity
- CHAR * content
- the entity value (without processing).
Description
An entity definition has been parsed
Function
void
attributeDeclDebug
(xmlParserCtxtPtr ctxt
, const CHAR * elem
, const CHAR * name
, int type
, int def
, const CHAR * defaultValue
, xmlEnumerationPtr tree
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * elem
- -- undescribed --
- const CHAR * name
- the attribute name
- int type
- the attribute type
- int def
- -- undescribed --
- const CHAR * defaultValue
- -- undescribed --
- xmlEnumerationPtr tree
- -- undescribed --
Description
An attribute definition has been parsed
Function
void
elementDeclDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
, int type
, xmlElementContentPtr content
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- the element name
- int type
- the element type
- xmlElementContentPtr content
- the element value (without processing).
Description
An element definition has been parsed
Function
void
notationDeclDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
, const CHAR * publicId
, const CHAR * systemId
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- The name of the notation
- const CHAR * publicId
- The public ID of the entity
- const CHAR * systemId
- The system ID of the entity
Description
What to do when a notation declaration has been parsed.
TODO Not handled currently.
Function
void
unparsedEntityDeclDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
, const CHAR * publicId
, const CHAR * systemId
, const CHAR * notationName
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- The name of the entity
- const CHAR * publicId
- The public ID of the entity
- const CHAR * systemId
- The system ID of the entity
- const CHAR * notationName
- the name of the notation
Description
What to do when an unparsed entity declaration is parsed
TODO Create an Entity node.
Function
void
setDocumentLocatorDebug
(xmlParserCtxtPtr ctxt
, xmlSAXLocatorPtr loc
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- xmlSAXLocatorPtr loc
- A SAX Locator
Description
Receive the document locator at startup, actually xmlDefaultSAXLocator
Everything is available on the context, so this is useless in our case.
Function
void
startDocumentDebug
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
Description
called when the document start being processed.
Function
void
endDocumentDebug
(xmlParserCtxtPtr ctxt
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
Description
called when the document end has been detected.
Function
void
startElementDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
, const CHAR ** atts
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- The element name
- const CHAR ** atts
- -- undescribed --
Description
called when an opening tag has been processed.
TODO We currently have a small pblm with the arguments ...
Function
void
endElementDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- The element name
Description
called when the end of an element has been detected.
Function
void
charactersDebug
(xmlParserCtxtPtr ctxt
, const CHAR * ch
, int len
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * ch
- a CHAR string
- int len
- the number of CHAR
Description
receiving some chars from the parser.
Question
Function
void
referenceDebug
(xmlParserCtxtPtr ctxt
, const CHAR * name
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * name
- The entity name
Description
called when an entity reference is detected.
Function
void
ignorableWhitespaceDebug
(xmlParserCtxtPtr ctxt
, const CHAR * ch
, int len
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * ch
- a CHAR string
- int len
- the number of CHAR
Description
receiving some ignorable whitespaces from the parser.
Question
Function
void
processingInstructionDebug
(xmlParserCtxtPtr ctxt
, const CHAR * target
, const CHAR * data
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * target
- the target name
- const CHAR * data
- the PI data's
Description
A processing instruction has been parsed.
Function
void
commentDebug
(xmlParserCtxtPtr ctxt
, const CHAR * value
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const CHAR * value
- the comment content
Description
A comment has been parsed.
Function
void
warningDebug
(xmlParserCtxtPtr ctxt
, const char * msg
, ...
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const char * msg
- the message to display/transmit
@...: extra parameters for the message display
- ...
- -- undescribed --
Description
Display and format a warning messages, gives file, line, position and
extra parameters.
Function
void
errorDebug
(xmlParserCtxtPtr ctxt
, const char * msg
, ...
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const char * msg
- the message to display/transmit
@...: extra parameters for the message display
- ...
- -- undescribed --
Description
Display and format a error messages, gives file, line, position and
extra parameters.
Function
void
fatalErrorDebug
(xmlParserCtxtPtr ctxt
, const char * msg
, ...
)
Arguments
- xmlParserCtxtPtr ctxt
- An XML parser context
- const char * msg
- the message to display/transmit
@...: extra parameters for the message display
- ...
- -- undescribed --
Description
Display and format a fatalError messages, gives file, line, position and
extra parameters.
Function
void
xmlUpgradeOldNs
(xmlDocPtr doc
)
Arguments
- xmlDocPtr doc
- a document pointer
Description
Upgrade old style Namespaces (PI) and move them to the root of the document.
Function
xmlNsPtr
xmlNewNs
(xmlNodePtr node
, const CHAR * href
, const CHAR * prefix
)
Arguments
- xmlNodePtr node
- the element carrying the namespace
- const CHAR * href
- the URI associated
- const CHAR * prefix
- the prefix for the namespace
Description
Creation of a new Namespace.
Returns returns a new namespace pointer
Function
xmlNsPtr
xmlNewGlobalNs
(xmlDocPtr doc
, const CHAR * href
, const CHAR * prefix
)
Arguments
- xmlDocPtr doc
- the document carrying the namespace
- const CHAR * href
- the URI associated
- const CHAR * prefix
- the prefix for the namespace
Description
Creation of a Namespace, the old way using PI and without scoping, to AVOID.
Returns returns a new namespace pointer
Function
void
xmlSetNs
(xmlNodePtr node
, xmlNsPtr ns
)
Arguments
- xmlNodePtr node
- a node in the document
- xmlNsPtr ns
- a namespace pointer
Description
Associate a namespace to a node, a posteriori.
Function
void
xmlFreeNs
(xmlNsPtr cur
)
Arguments
- xmlNsPtr cur
- the namespace pointer
Description
Free up the structures associated to a namespace
Function
void
xmlFreeNsList
(xmlNsPtr cur
)
Arguments
- xmlNsPtr cur
- the first namespace pointer
Description
Free up all the structures associated to the chained namespaces.
Function
xmlDtdPtr
xmlNewDtd
(xmlDocPtr doc
, const CHAR * name
, const CHAR * ExternalID
, const CHAR * SystemID
)
Arguments
- xmlDocPtr doc
- the document pointer
- const CHAR * name
- the DTD name
- const CHAR * ExternalID
- the external ID
- const CHAR * SystemID
- the system ID
Description
Creation of a new DTD.
Returns a pointer to the new DTD structure
Function
xmlDtdPtr
xmlCreateIntSubset
(xmlDocPtr doc
, const CHAR * name
, const CHAR * ExternalID
, const CHAR * SystemID
)
Arguments
- xmlDocPtr doc
- the document pointer
- const CHAR * name
- the DTD name
- const CHAR * ExternalID
- the external ID
- const CHAR * SystemID
- the system ID
Description
Create the internal subset of a document
Returns a pointer to the new DTD structure
Function
void
xmlFreeDtd
(xmlDtdPtr cur
)
Arguments
- xmlDtdPtr cur
- the DTD structure to free up
Description
Function
xmlDocPtr
xmlNewDoc
(const CHAR * version
)
Arguments
- const CHAR * version
- CHAR string giving the version of XML "1.0"
Description
Function
void
xmlFreeDoc
(xmlDocPtr cur
)
Arguments
- xmlDocPtr cur
- pointer to the document
@:
Description
Free up all the structures used by a document, tree included.
Function
xmlNodePtr
xmlStringLenGetNodeList
(xmlDocPtr doc
, const CHAR * value
, int len
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * value
- the value of the text
- int len
- the length of the string value
Description
Parse the value string and build the node list associated. Should
produce a flat tree with only TEXTs and ENTITY_REFs.
Returns a pointer to the first child
Function
xmlNodePtr
xmlStringGetNodeList
(xmlDocPtr doc
, const CHAR * value
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * value
- the value of the attribute
Description
Parse the value string and build the node list associated. Should
produce a flat tree with only TEXTs and ENTITY_REFs.
Returns a pointer to the first child
Function
CHAR *
xmlNodeListGetString
(xmlDocPtr doc
, xmlNodePtr list
, int inLine
)
Arguments
- xmlDocPtr doc
- the document
- xmlNodePtr list
- a Node list
- int inLine
- should we replace entity contents or show their external form
Description
Returns the string equivalent to the text contained in the Node list
made of TEXTs and ENTITY_REFs
Returns a pointer to the string copy, the calller must free it.
Function
xmlAttrPtr
xmlNewProp
(xmlNodePtr node
, const CHAR * name
, const CHAR * value
)
Arguments
- xmlNodePtr node
- the holding node
- const CHAR * name
- the name of the attribute
- const CHAR * value
- the value of the attribute
Description
Create a new property carried by a node.
Returns a pointer to the attribute
Function
xmlAttrPtr
xmlNewDocProp
(xmlDocPtr doc
, const CHAR * name
, const CHAR * value
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * name
- the name of the attribute
- const CHAR * value
- the value of the attribute
Description
Create a new property carried by a document.
Returns a pointer to the attribute
Function
void
xmlFreePropList
(xmlAttrPtr cur
)
Arguments
- xmlAttrPtr cur
- the first property in the list
Description
Free a property and all its siblings, all the childs are freed too.
Function
void
xmlFreeProp
(xmlAttrPtr cur
)
Arguments
- xmlAttrPtr cur
- the first property in the list
Description
Free one property, all the childs are freed too.
Function
xmlNodePtr
xmlNewNode
(xmlNsPtr ns
, const CHAR * name
)
Arguments
- xmlNsPtr ns
- namespace if any
- const CHAR * name
- the node name
Description
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.
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewDocNode
(xmlDocPtr doc
, xmlNsPtr ns
, const CHAR * name
, CHAR * content
)
Arguments
- xmlDocPtr doc
- the document
- xmlNsPtr ns
- namespace if any
- const CHAR * name
- the node name
- CHAR * content
- the text content if any
Description
Creation of a new node element within a document. ns and content
are optionnal (NULL).
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewText
(const CHAR * content
)
Arguments
- const CHAR * content
- the text content
Description
Creation of a new text node.
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewReference
(xmlDocPtr doc
, const CHAR * name
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * name
- the reference name, or the reference string with & and ;
Description
Creation of a new reference node.
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewDocText
(xmlDocPtr doc
, const CHAR * content
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * content
- the text content
Description
Creation of a new text node within a document.
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewTextLen
(const CHAR * content
, int len
)
Arguments
- const CHAR * content
- the text content
- int len
- the text len.
Description
Creation of a new text node with an extra parameter for the content's lenght
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewDocTextLen
(xmlDocPtr doc
, const CHAR * content
, int len
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * content
- the text content
- int len
- the text len.
Description
Creation of a new text node with an extra content lenght parameter. The
text node pertain to a given document.
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewComment
(const CHAR * content
)
Arguments
- const CHAR * content
- the comment content
Description
Creation of a new node containing a comment.
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewDocComment
(xmlDocPtr doc
, const CHAR * content
)
Arguments
- xmlDocPtr doc
- the document
- const CHAR * content
- the comment content
Description
Creation of a new node containing a commentwithin a document.
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlNewChild
(xmlNodePtr parent
, xmlNsPtr ns
, const CHAR * name
, CHAR * content
)
Arguments
- xmlNodePtr parent
- the parent node
- xmlNsPtr ns
- a namespace if any
- const CHAR * name
- the name of the child
- CHAR * content
- the content of the child if any.
Description
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.
Returns a pointer to the new node object.
Function
xmlNodePtr
xmlAddChild
(xmlNodePtr parent
, xmlNodePtr cur
)
Arguments
- xmlNodePtr parent
- the parent node
- xmlNodePtr cur
- the child node
Description
Add a new child element, to parent, at the end of the child list.
Returns the child or NULL in case of error.
Function
xmlNodePtr
xmlGetLastChild
(xmlNodePtr parent
)
Arguments
- xmlNodePtr parent
- the parent node
Description
Search the last child of a node.
Returns the last child or NULL if none.
Function
void
xmlFreeNodeList
(xmlNodePtr cur
)
Arguments
- xmlNodePtr cur
- the first node in the list
Description
Free a node and all its siblings, this is a recursive behaviour, all
the childs are freed too.
Function
void
xmlFreeNode
(xmlNodePtr cur
)
Arguments
- xmlNodePtr cur
- the node
Description
Free a node, this is a recursive behaviour, all the childs are freed too.
Function
void
xmlUnlinkNode
(xmlNodePtr cur
)
Arguments
- xmlNodePtr cur
- the node
Description
Unlink a node from it's current context, the node is not freed
Function
xmlNsPtr
xmlCopyNamespace
(xmlNsPtr cur
)
Arguments
- xmlNsPtr cur
- the namespace
Description
Do a copy of the namespace.
Returns
a new xmlNsPtr, or NULL in case of error.
Function
xmlNsPtr
xmlCopyNamespaceList
(xmlNsPtr cur
)
Arguments
- xmlNsPtr cur
- the first namespace
Description
Do a copy of an namespace list.
Returns
a new xmlNsPtr, or NULL in case of error.
Function
xmlAttrPtr
xmlCopyProp
(xmlAttrPtr cur
)
Arguments
- xmlAttrPtr cur
- the attribute
Description
Do a copy of the attribute.
Returns
a new xmlAttrPtr, or NULL in case of error.
Function
xmlAttrPtr
xmlCopyPropList
(xmlAttrPtr cur
)
Arguments
- xmlAttrPtr cur
- the first attribute
Description
Do a copy of an attribute list.
Returns
a new xmlAttrPtr, or NULL in case of error.
Function
xmlNodePtr
xmlCopyNode
(xmlNodePtr node
, int recursive
)
Arguments
- xmlNodePtr node
- the node
- int recursive
- if 1 do a recursive copy.
Description
Returns
a new xmlNodePtr, or NULL in case of error.
Function
xmlNodePtr
xmlCopyNodeList
(xmlNodePtr node
)
Arguments
- xmlNodePtr node
- the first node in the list.
Description
Do a recursive copy of the node list.
Returns
a new xmlNodePtr, or NULL in case of error.
Function
xmlDtdPtr
xmlCopyDtd
(xmlDtdPtr dtd
)
Arguments
- xmlDtdPtr dtd
- -- undescribed --
Description
Do a copy of the element definition.
Returns
a new xmlElementPtr, or NULL in case of error.
Function
xmlDocPtr
xmlCopyDoc
(xmlDocPtr doc
, int recursive
)
Arguments
- xmlDocPtr doc
- the document
- int recursive
- if 1 do a recursive copy.
Description
Do a copy of the document info. If recursive, the content tree will
be copied too as well as Dtd, namespaces and entities.
Returns
a new xmlDocPtr, or NULL in case of error.
Function
CHAR *
xmlNodeGetContent
(xmlNodePtr cur
)
Arguments
- xmlNodePtr cur
- the node being read
Description
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.
Returns a new CHAR * or NULL if no content is available.
It's up to the caller to free the memory.
Function
void
xmlNodeSetContent
(xmlNodePtr cur
, const CHAR * content
)
Arguments
- xmlNodePtr cur
- the node being modified
- const CHAR * content
- the new value of the content
Description
Replace the content of a node.
Function
void
xmlNodeSetContentLen
(xmlNodePtr cur
, const CHAR * content
, int len
)
Arguments
- xmlNodePtr cur
- the node being modified
- const CHAR * content
- the new value of the content
- int len
- the size of content
Description
Replace the content of a node.
Function
void
xmlNodeAddContentLen
(xmlNodePtr cur
, const CHAR * content
, int len
)
Arguments
- xmlNodePtr cur
- the node being modified
- const CHAR * content
- extra content
- int len
- the size of content
Description
Append the extra substring to the node content.
Function
void
xmlNodeAddContent
(xmlNodePtr cur
, const CHAR * content
)
Arguments
- xmlNodePtr cur
- the node being modified
- const CHAR * content
- extra content
Description
Append the extra substring to the node content.
Function
xmlNodePtr
xmlTextMerge
(xmlNodePtr first
, xmlNodePtr second
)
Arguments
- xmlNodePtr first
- the first text node
- xmlNodePtr second
- the second text node being merged
Description
Merge two text nodes into one
Returns the first text node augmented
Function
xmlNsPtr
xmlSearchNs
(xmlDocPtr doc
, xmlNodePtr node
, const CHAR * nameSpace
)
Arguments
- xmlDocPtr doc
- the document
- xmlNodePtr node
- the current node
- const CHAR * nameSpace
- the namespace string
Description
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.
Returns the namespace pointer or NULL.
Function
xmlNsPtr
xmlSearchNsByHref
(xmlDocPtr doc
, xmlNodePtr node
, const CHAR * href
)
Arguments
- xmlDocPtr doc
- the document
- xmlNodePtr node
- the current node
- const CHAR * href
- the namespace value
Description
Search a Ns aliasing a given URI. Recurse on the parents until it finds
the defined namespace or return NULL otherwise.
Returns the namespace pointer or NULL.
Function
CHAR *
xmlGetProp
(xmlNodePtr node
, const CHAR * name
)
Arguments
- xmlNodePtr node
- the node
- const CHAR * name
- the attribute name
Description
Search and get the value of an attribute associated to a node
This does the entity substitution.
Returns the attribute value or NULL if not found.
Function
xmlAttrPtr
xmlSetProp
(xmlNodePtr node
, const CHAR * name
, const CHAR * value
)
Arguments
- xmlNodePtr node
- the node
- const CHAR * name
- the attribute name
- const CHAR * value
- the attribute value
Description
Set (or reset) an attribute carried by a node.
Returns the attribute pointer.
Function
int
xmlNodeIsText
(xmlNodePtr node
)
Arguments
- xmlNodePtr node
- the node
Description
Is this node a Text node ?
Returns 1 yes, 0 no
Function
void
xmlTextConcat
(xmlNodePtr node
, const CHAR * content
, int len
)
Arguments
- xmlNodePtr node
- the node
- const CHAR * content
- the content
- int len
- content lenght
Description
Concat the given string at the end of the existing node content
Function
xmlBufferPtr
xmlBufferCreate
( void
)
Arguments
- void
- -- undescribed --
Description
Function
void
xmlBufferFree
(xmlBufferPtr buf
)
Arguments
- xmlBufferPtr buf
- the buffer to free
Description
Function
int
xmlBufferDump
(FILE * file
, xmlBufferPtr buf
)
Arguments
- FILE * file
- the file output
- xmlBufferPtr buf
- the buffer to dump
Description
Dumps an XML buffer to a FILE *.
Returns the number of CHAR written
Function
void
xmlBufferAdd
(xmlBufferPtr buf
, const CHAR * str
, int len
)
Arguments
- xmlBufferPtr buf
- the buffer to dump
- const CHAR * str
- the CHAR string
- int len
- the number of CHAR to add
Description
Add a string range to an XML buffer.
Function
void
xmlBufferCat
(xmlBufferPtr buf
, const CHAR * str
)
Arguments
- xmlBufferPtr buf
- the buffer to dump
- const CHAR * str
- the CHAR string
Description
Append a zero terminated string to an XML buffer.
Function
void
xmlBufferCCat
(xmlBufferPtr buf
, const char * str
)
Arguments
- xmlBufferPtr buf
- the buffer to dump
- const char * str
- the C char string
Description
Append a zero terminated C string to an XML buffer.
Function
void
xmlBufferWriteCHAR
(xmlBufferPtr buf
, const CHAR * string
)
Arguments
- xmlBufferPtr buf
- the XML buffer
- const CHAR * string
- the string to add
Description
routine which manage and grows an output buffer. This one add
CHARs at the end of the buffer.
Function
void
xmlBufferWriteChar
(xmlBufferPtr buf
, const char * string
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- const char * string
- the string to add
Description
routine which manage and grows an output buffer. This one add
C chars at the end of the array.
Function
void
xmlBufferWriteQuotedString
(xmlBufferPtr buf
, const CHAR * string
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- const CHAR * string
- the string to add
Description
routine which manage and grows an output buffer. This one writes
a quoted or double quoted CHAR string, checking first if it holds
quote or double-quotes internally
Function
static void
xmlGlobalNsDump
(xmlBufferPtr buf
, xmlNsPtr cur
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlNsPtr cur
- a namespace
Description
Dump a global Namespace, this is the old version based on PIs.
Function
static void
xmlGlobalNsListDump
(xmlBufferPtr buf
, xmlNsPtr cur
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlNsPtr cur
- the first namespace
Description
Dump a list of global Namespace, this is the old version based on PIs.
Function
static void
xmlNsDump
(xmlBufferPtr buf
, xmlNsPtr cur
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlNsPtr cur
- a namespace
Description
Dump a local Namespace definition.
Should be called in the context of attributes dumps.
Function
static void
xmlNsListDump
(xmlBufferPtr buf
, xmlNsPtr cur
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlNsPtr cur
- the first namespace
Description
Dump a list of local Namespace definitions.
Should be called in the context of attributes dumps.
Function
static void
xmlDtdDump
(xmlBufferPtr buf
, xmlDocPtr doc
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlDocPtr doc
- the document
Description
Dump the XML document DTD, if any.
Function
static void
xmlAttrDump
(xmlBufferPtr buf
, xmlDocPtr doc
, xmlAttrPtr cur
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlDocPtr doc
- the document
- xmlAttrPtr cur
- the attribute pointer
Description
Function
static void
xmlAttrListDump
(xmlBufferPtr buf
, xmlDocPtr doc
, xmlAttrPtr cur
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlDocPtr doc
- the document
- xmlAttrPtr cur
- the first attribute pointer
Description
Dump a list of XML attributes
Function
static void
xmlNodeListDump
(xmlBufferPtr buf
, xmlDocPtr doc
, xmlNodePtr cur
, int level
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlDocPtr doc
- the document
- xmlNodePtr cur
- the first node
- int level
- the imbrication level for indenting
Description
Dump an XML node list, recursive behaviour,children are printed too.
Function
static void
xmlNodeDump
(xmlBufferPtr buf
, xmlDocPtr doc
, xmlNodePtr cur
, int level
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlDocPtr doc
- the document
- xmlNodePtr cur
- the current node
- int level
- the imbrication level for indenting
Description
Dump an XML node, recursive behaviour,children are printed too.
Function
static void
xmlDocContentDump
(xmlBufferPtr buf
, xmlDocPtr cur
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlDocPtr cur
- the document
Description
Function
void
xmlDocDumpMemory
(xmlDocPtr cur
, CHAR**mem
, int * size
)
Arguments
- xmlDocPtr cur
- the document
- CHAR**mem
- -- undescribed --
- int * size
- OUT: the memory lenght
Description
Dump an XML document in memory and return the CHAR * and it's size.
It's up to the caller to free the memory.
Function
int
xmlGetDocCompressMode
(xmlDocPtr doc
)
Arguments
- xmlDocPtr doc
- the document
Description
get the compression ratio for a document, ZLIB based
Returns 0 (uncompressed) to 9 (max compression)
Function
void
xmlSetDocCompressMode
(xmlDocPtr doc
, int mode
)
Arguments
- xmlDocPtr doc
- the document
- int mode
- the compression ratio
Description
set the compression ratio for a document, ZLIB based
Correct values
0 (uncompressed) to 9 (max compression)
Function
int
xmlGetCompressMode
( void
)
Arguments
- void
- -- undescribed --
Description
get the default compression mode used, ZLIB based.
Returns 0 (uncompressed) to 9 (max compression)
Function
void
xmlSetCompressMode
(int mode
)
Arguments
- int mode
- the compression ratio
Description
set the default compression mode used, ZLIB based
Correct values
0 (uncompressed) to 9 (max compression)
Function
void
xmlDocDump
(FILE * f
, xmlDocPtr cur
)
Arguments
- FILE * f
- the FILE*
- xmlDocPtr cur
- the document
Description
Dump an XML document to an open FILE.
Function
int
xmlSaveFile
(const char * filename
, xmlDocPtr cur
)
Arguments
- const char * filename
- the filename
- xmlDocPtr cur
- the document
Description
Dump an XML document to a file. Will use compression if
compiled in and enabled.
returns
the number of file written or -1 in case of failure.
Function
xmlElementContentPtr
xmlNewElementContent
(CHAR * name
, int type
)
Arguments
- CHAR * name
- the subelement name or NULL
- int type
- the type of element content decl
Description
Allocate an element content structure.
Returns NULL if not, othervise the new element content structure
Function
xmlElementContentPtr
xmlCopyElementContent
(xmlElementContentPtr cur
)
Arguments
- xmlElementContentPtr cur
- -- undescribed --
Description
Function
void
xmlFreeElementContent
(xmlElementContentPtr cur
)
Arguments
- xmlElementContentPtr cur
- the element content tree to free
Description
Free an element content structure. This is a recursive call !
Function
void
xmlDumpElementContent
(xmlBufferPtr buf
, xmlElementContentPtr content
, int glob
)
Arguments
- xmlBufferPtr buf
- An XML buffer
- xmlElementContentPtr content
- An element table
- int glob
- 1 if one must print the englobing parenthesis, 0 otherwise
Description
This will dump the content of the element table as an XML DTD definition
Function
xmlElementTablePtr
xmlCreateElementTable
( void
)
Arguments
- void
- -- undescribed --
Description
create and initialize an empty element hash table.
Returns the xmlElementTablePtr just created or NULL in case of error.
Function
xmlElementPtr
xmlAddElementDecl
(xmlDtdPtr dtd
, const CHAR * name
, int type
, xmlElementContentPtr content
)
Arguments
- xmlDtdPtr dtd
- pointer to the DTD
- const CHAR * name
- the entity name
- int type
- the element type
- xmlElementContentPtr content
- the element content tree or NULL
Description
Register a new element declaration
Returns NULL if not, othervise the entity
Function
void
xmlFreeElement
(xmlElementPtr elem
)
Arguments
- xmlElementPtr elem
- An element
Description
Deallocate the memory used by an element definition
Function
void
xmlFreeElementTable
(xmlElementTablePtr table
)
Arguments
- xmlElementTablePtr table
- An element table
Description
Deallocate the memory used by an element hash table.
Function
xmlElementTablePtr
xmlCopyElementTable
(xmlElementTablePtr table
)
Arguments
- xmlElementTablePtr table
- An element table
Description
Function
void
xmlDumpElementTable
(xmlBufferPtr buf
, xmlElementTablePtr table
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlElementTablePtr table
- An element table
Description
This will dump the content of the element table as an XML DTD definition
Function
xmlEnumerationPtr
xmlCreateEnumeration
(CHAR * name
)
Arguments
- CHAR * name
- the enumeration name or NULL
Description
Function
void
xmlFreeEnumeration
(xmlEnumerationPtr cur
)
Arguments
- xmlEnumerationPtr cur
- the tree to free.
Description
free an enumeration attribute node (recursive).
Function
xmlEnumerationPtr
xmlCopyEnumeration
(xmlEnumerationPtr cur
)
Arguments
- xmlEnumerationPtr cur
- the tree to copy.
Description
Function
xmlAttributeTablePtr
xmlCreateAttributeTable
( void
)
Arguments
- void
- -- undescribed --
Description
create and initialize an empty attribute hash table.
Returns the xmlAttributeTablePtr just created or NULL in case
of error.
Function
xmlAttributePtr
xmlAddAttributeDecl
(xmlDtdPtr dtd
, const CHAR * elem
, const CHAR * name
, int type
, int def
, const CHAR * defaultValue
, xmlEnumerationPtr tree
)
Arguments
- xmlDtdPtr dtd
- pointer to the DTD
- const CHAR * elem
- the element name
- const CHAR * name
- the attribute name
- int type
- the attribute type
- int def
- the attribute default type
- const CHAR * defaultValue
- the attribute default value
- xmlEnumerationPtr tree
- if it's an enumeration, the associated list
Description
Register a new attribute declaration
Returns NULL if not, othervise the entity
Function
void
xmlFreeAttribute
(xmlAttributePtr attr
)
Arguments
- xmlAttributePtr attr
- -- undescribed --
Description
Deallocate the memory used by an attribute definition
Function
void
xmlFreeAttributeTable
(xmlAttributeTablePtr table
)
Arguments
- xmlAttributeTablePtr table
- An attribute table
Description
Deallocate the memory used by an entities hash table.
Function
xmlAttributeTablePtr
xmlCopyAttributeTable
(xmlAttributeTablePtr table
)
Arguments
- xmlAttributeTablePtr table
- An attribute table
Description
Function
void
xmlDumpAttributeTable
(xmlBufferPtr buf
, xmlAttributeTablePtr table
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlAttributeTablePtr table
- An attribute table
Description
This will dump the content of the attribute table as an XML DTD definition
Function
xmlNotationTablePtr
xmlCreateNotationTable
( void
)
Arguments
- void
- -- undescribed --
Description
create and initialize an empty notation hash table.
Returns the xmlNotationTablePtr just created or NULL in case
of error.
Function
xmlNotationPtr
xmlAddNotationDecl
(xmlDtdPtr dtd
, const CHAR * name
, const CHAR * PublicID
, const CHAR * SystemID
)
Arguments
- xmlDtdPtr dtd
- pointer to the DTD
- const CHAR * name
- the entity name
- const CHAR * PublicID
- the public identifier or NULL
- const CHAR * SystemID
- the system identifier or NULL
Description
Register a new notation declaration
Returns NULL if not, othervise the entity
Function
void
xmlFreeNotation
(xmlNotationPtr nota
)
Arguments
- xmlNotationPtr nota
- -- undescribed --
Description
Deallocate the memory used by an notation definition
Function
void
xmlFreeNotationTable
(xmlNotationTablePtr table
)
Arguments
- xmlNotationTablePtr table
- An notation table
Description
Deallocate the memory used by an entities hash table.
Function
xmlNotationTablePtr
xmlCopyNotationTable
(xmlNotationTablePtr table
)
Arguments
- xmlNotationTablePtr table
- A notation table
Description
Function
void
xmlDumpNotationTable
(xmlBufferPtr buf
, xmlNotationTablePtr table
)
Arguments
- xmlBufferPtr buf
- the XML buffer output
- xmlNotationTablePtr table
- A notation table
Description
This will dump the content of the notation table as an XML DTD definition