deps/src/libxml2-2.9.1/doc/devhelp/libxml2-DOCBparser.html
| | | | libxml2 Reference Manual |
DOCBparser - old DocBook SGML parser
interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore.
WARNING: this module is deprecated !
Author(s): Daniel Veillard
typedef[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)[docbParserInputPtr](#docbParserInputPtr);
typedef[xmlParserCtxt](libxml2-tree.html#xmlParserCtxt)[docbParserCtxt](#docbParserCtxt);
typedef[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)[docbParserCtxtPtr](#docbParserCtxtPtr);
typedef[xmlParserInput](libxml2-tree.html#xmlParserInput)[docbParserInput](#docbParserInput);
typedef[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[docbDocPtr](#docbDocPtr);
typedef[xmlSAXHandler](libxml2-tree.html#xmlSAXHandler)[docbSAXHandler](#docbSAXHandler);
typedef[xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)[docbSAXHandlerPtr](#docbSAXHandlerPtr);
void[docbFreeParserCtxt](#docbFreeParserCtxt)([docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)ctxt);[docbDocPtr](libxml2-DOCBparser.html#docbDocPtr)[docbParseDoc](#docbParseDoc)([xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
const char * encoding);[docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)[docbCreateFileParserCtxt](#docbCreateFileParserCtxt)(const char * filename,
const char * encoding);[docbDocPtr](libxml2-DOCBparser.html#docbDocPtr)[docbSAXParseFile](#docbSAXParseFile)(const char * filename,
const char * encoding,
[docbSAXHandlerPtr](libxml2-DOCBparser.html#docbSAXHandlerPtr)sax,
void * userData);[docbDocPtr](libxml2-DOCBparser.html#docbDocPtr)[docbSAXParseDoc](#docbSAXParseDoc)([xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
const char * encoding,
[docbSAXHandlerPtr](libxml2-DOCBparser.html#docbSAXHandlerPtr)sax,
void * userData);[docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)[docbCreatePushParserCtxt](#docbCreatePushParserCtxt)([docbSAXHandlerPtr](libxml2-DOCBparser.html#docbSAXHandlerPtr)sax,
void * user_data,
const char * chunk,
int size,
const char * filename,
[xmlCharEncoding](libxml2-encoding.html#xmlCharEncoding)enc);
int[docbEncodeEntities](#docbEncodeEntities)(unsigned char * out,
int * outlen,
const unsigned char * in,
int * inlen,
int quoteChar);[docbDocPtr](libxml2-DOCBparser.html#docbDocPtr)[docbParseFile](#docbParseFile)(const char * filename,
const char * encoding);
int[docbParseDocument](#docbParseDocument)([docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)ctxt);
int[docbParseChunk](#docbParseChunk)([docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)ctxt,
const char * chunk,
int size,
int terminate);
[xmlDocPtr](libxml2-tree.html#xmlDocPtr)docbDocPtr;
[xmlParserCtxt](libxml2-tree.html#xmlParserCtxt)docbParserCtxt;
[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)docbParserCtxtPtr;
[xmlParserInput](libxml2-tree.html#xmlParserInput)docbParserInput;
[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)docbParserInputPtr;
[xmlSAXHandler](libxml2-tree.html#xmlSAXHandler)docbSAXHandler;
[xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)docbSAXHandlerPtr;
[docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)docbCreateFileParserCtxt (const char * filename,
const char * encoding)
Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
| filename: | the filename | | encoding: | the SGML document encoding, or NULL | | Returns: | the new parser context or NULL |
[docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)docbCreatePushParserCtxt ([docbSAXHandlerPtr](libxml2-DOCBparser.html#docbSAXHandlerPtr)sax,
void * user_data,
const char * chunk,
int size,
const char * filename,
[xmlCharEncoding](libxml2-encoding.html#xmlCharEncoding)enc)
Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, @size should be >= 4 The value of @filename is used for fetching external entities and error/warning reports.
| sax: | a SAX handler | | user_data: | The user data returned on SAX callbacks | | chunk: | a pointer to an array of chars | | size: | number of chars in the array | | filename: | an optional file name or URI | | enc: | an optional encoding | | Returns: | the new parser context or NULL |
int docbEncodeEntities (unsigned char * out,
int * outlen,
const unsigned char * in,
int * inlen,
int quoteChar)
Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out.
| out: | a pointer to an array of bytes to store the result | | outlen: | the length of @out | | in: | a pointer to an array of UTF-8 chars | | inlen: | the length of @in | | quoteChar: | the quote character to escape (' or ") or zero. | | Returns: | 0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed. |
void docbFreeParserCtxt ([docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)ctxt)
Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed.
| ctxt: | an SGML parser context |
int docbParseChunk ([docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)ctxt,
const char * chunk,
int size,
int terminate)
Parse a Chunk of memory
| ctxt: | an XML parser context | | chunk: | an char array | | size: | the size in byte of the chunk | | terminate: | last chunk indicator | | Returns: | zero if no error, the xmlParserErrors otherwise. |
[docbDocPtr](libxml2-DOCBparser.html#docbDocPtr)docbParseDoc ([xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
const char * encoding)
parse an SGML in-memory document and build a tree.
| cur: | a pointer to an array of xmlChar | | encoding: | a free form C string describing the SGML document encoding, or NULL | | Returns: | the resulting document tree |
int docbParseDocument ([docbParserCtxtPtr](libxml2-DOCBparser.html#docbParserCtxtPtr)ctxt)
parse an SGML document (and build a tree if using the standard SAX interface).
| ctxt: | an SGML parser context | | Returns: | 0, -1 in case of error. the parser context is augmented as a result of the parsing. |
[docbDocPtr](libxml2-DOCBparser.html#docbDocPtr)docbParseFile (const char * filename,
const char * encoding)
parse a Docbook SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
| filename: | the filename | | encoding: | a free form C string describing document encoding, or NULL | | Returns: | the resulting document tree |
[docbDocPtr](libxml2-DOCBparser.html#docbDocPtr)docbSAXParseDoc ([xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
const char * encoding,
[docbSAXHandlerPtr](libxml2-DOCBparser.html#docbSAXHandlerPtr)sax,
void * userData)
parse an SGML 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.
| cur: | a pointer to an array of xmlChar | | encoding: | a free form C string describing the SGML document encoding, or NULL | | sax: | the SAX handler block | | userData: | if using SAX, this pointer will be provided on callbacks. | | Returns: | the resulting document tree |
[docbDocPtr](libxml2-DOCBparser.html#docbDocPtr)docbSAXParseFile (const char * filename,
const char * encoding,
[docbSAXHandlerPtr](libxml2-DOCBparser.html#docbSAXHandlerPtr)sax,
void * userData)
parse an SGML 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.
| filename: | the filename | | encoding: | a free form C string describing the SGML document encoding, or NULL | | sax: | the SAX handler block | | userData: | if using SAX, this pointer will be provided on callbacks. | | Returns: | the resulting document tree |