Blame doc/html/libxml-DOCBparser.html

Packit Service a31ea6
Packit Service a31ea6
Packit Service a31ea6
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
Packit Service a31ea6
TD {font-family: Verdana,Arial,Helvetica}
Packit Service a31ea6
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
Packit Service a31ea6
H1 {font-family: Verdana,Arial,Helvetica}
Packit Service a31ea6
H2 {font-family: Verdana,Arial,Helvetica}
Packit Service a31ea6
H3 {font-family: Verdana,Arial,Helvetica}
Packit Service a31ea6
A:link, A:visited, A:active { text-decoration: underline }
Packit Service a31ea6
</style><style type="text/css">
Packit Service a31ea6
      div.deprecated pre.programlisting {border-style: double;border-color:red}
Packit Service a31ea6
      pre.programlisting {border-style: double;background: #EECFA1}
Packit Service a31ea6
    </style><title>Module DOCBparser from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module DOCBparser from libxml2

<center>API Menu</center>
<form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form>
<center>API Indexes</center>
<center>Related links</center>

This module is deprecated

interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore.

Table of Contents

Typedef xmlParserInputPtr docbParserInputPtr
Packit Service a31ea6
Typedef xmlParserCtxt docbParserCtxt
Packit Service a31ea6
Typedef xmlParserCtxtPtr docbParserCtxtPtr
Packit Service a31ea6
Typedef xmlParserInput docbParserInput
Packit Service a31ea6
Typedef xmlDocPtr docbDocPtr
Packit Service a31ea6
Typedef xmlSAXHandler docbSAXHandler
Packit Service a31ea6
Typedef xmlSAXHandlerPtr docbSAXHandlerPtr
Packit Service a31ea6
void	docbFreeParserCtxt		(docbParserCtxtPtr ctxt)
Packit Service a31ea6
docbDocPtr	docbParseDoc		(xmlChar * cur, 
const char * encoding)
Packit Service a31ea6
docbParserCtxtPtr	docbCreateFileParserCtxt	(const char * filename, 
const char * encoding)
Packit Service a31ea6
docbDocPtr	docbSAXParseFile	(const char * filename, 
const char * encoding,
docbSAXHandlerPtr sax,
void * userData)
Packit Service a31ea6
docbDocPtr	docbSAXParseDoc		(xmlChar * cur, 
const char * encoding,
docbSAXHandlerPtr sax,
void * userData)
Packit Service a31ea6
docbParserCtxtPtr	docbCreatePushParserCtxt	(docbSAXHandlerPtr sax, 
void * user_data,
const char * chunk,
int size,
const char * filename,
xmlCharEncoding enc)
Packit Service a31ea6
int	docbEncodeEntities		(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen,
int quoteChar)
Packit Service a31ea6
docbDocPtr	docbParseFile		(const char * filename, 
const char * encoding)
Packit Service a31ea6
int	docbParseDocument		(docbParserCtxtPtr ctxt)
Packit Service a31ea6
int	docbParseChunk			(docbParserCtxtPtr ctxt, 
const char * chunk,
int size,
int terminate)
Packit Service a31ea6

Description

Packit Service a31ea6

Function: docbFreeParserCtxt

void	docbFreeParserCtxt		(docbParserCtxtPtr ctxt)
Packit Service a31ea6

Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed.

Packit Service a31ea6
<tt>ctxt</tt>:an SGML parser context

Function: docbParseDoc

docbDocPtr	docbParseDoc		(xmlChar * cur, 
const char * encoding)
Packit Service a31ea6

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

Packit Service a31ea6
<tt>cur</tt>:a pointer to an array of xmlChar
<tt>encoding</tt>:a free form C string describing the SGML document encoding, or NULL
<tt>Returns</tt>:the resulting document tree

Function: docbCreateFileParserCtxt

docbParserCtxtPtr	docbCreateFileParserCtxt	(const char * filename, 
const char * encoding)
Packit Service a31ea6

Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

Packit Service a31ea6
<tt>filename</tt>:the filename
<tt>encoding</tt>:the SGML document encoding, or NULL
<tt>Returns</tt>:the new parser context or NULL

Function: docbSAXParseFile

docbDocPtr	docbSAXParseFile	(const char * filename, 
const char * encoding,
docbSAXHandlerPtr sax,
void * userData)
Packit Service a31ea6

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.

Packit Service a31ea6
<tt>filename</tt>:the filename
<tt>encoding</tt>:a free form C string describing the SGML document encoding, or NULL
<tt>sax</tt>:the SAX handler block
<tt>userData</tt>:if using SAX, this pointer will be provided on callbacks.
<tt>Returns</tt>:the resulting document tree

Function: docbSAXParseDoc

docbDocPtr	docbSAXParseDoc		(xmlChar * cur, 
const char * encoding,
docbSAXHandlerPtr sax,
void * userData)
Packit Service a31ea6

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.

Packit Service a31ea6
<tt>cur</tt>:a pointer to an array of xmlChar
<tt>encoding</tt>:a free form C string describing the SGML document encoding, or NULL
<tt>sax</tt>:the SAX handler block
<tt>userData</tt>:if using SAX, this pointer will be provided on callbacks.
<tt>Returns</tt>:the resulting document tree

Function: docbCreatePushParserCtxt

docbParserCtxtPtr	docbCreatePushParserCtxt	(docbSAXHandlerPtr sax, 
void * user_data,
const char * chunk,
int size,
const char * filename,
xmlCharEncoding enc)
Packit Service a31ea6

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.

Packit Service a31ea6
<tt>sax</tt>:a SAX handler
<tt>user_data</tt>:The user data returned on SAX callbacks
<tt>chunk</tt>:a pointer to an array of chars
<tt>size</tt>:number of chars in the array
<tt>filename</tt>:an optional file name or URI
<tt>enc</tt>:an optional encoding
<tt>Returns</tt>:the new parser context or NULL

Function: docbEncodeEntities

int	docbEncodeEntities		(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen,
int quoteChar)
Packit Service a31ea6

Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out.

Packit Service a31ea6
<tt>out</tt>:a pointer to an array of bytes to store the result
<tt>outlen</tt>:the length of @out
<tt>in</tt>:a pointer to an array of UTF-8 chars
<tt>inlen</tt>:the length of @in
<tt>quoteChar</tt>:the quote character to escape (' or ") or zero.
<tt>Returns</tt>: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.

Function: docbParseFile

docbDocPtr	docbParseFile		(const char * filename, 
const char * encoding)
Packit Service a31ea6

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.

Packit Service a31ea6
<tt>filename</tt>:the filename
<tt>encoding</tt>:a free form C string describing document encoding, or NULL
<tt>Returns</tt>:the resulting document tree

Function: docbParseDocument

int	docbParseDocument		(docbParserCtxtPtr ctxt)
Packit Service a31ea6

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

Packit Service a31ea6
<tt>ctxt</tt>:an SGML parser context
<tt>Returns</tt>:0, -1 in case of error. the parser context is augmented as a result of the parsing.

Function: docbParseChunk

int	docbParseChunk			(docbParserCtxtPtr ctxt, 
const char * chunk,
int size,
int terminate)
Packit Service a31ea6

Parse a Chunk of memory

Packit Service a31ea6
<tt>ctxt</tt>:an XML parser context
<tt>chunk</tt>:an char array
<tt>size</tt>:the size in byte of the chunk
<tt>terminate</tt>:last chunk indicator
<tt>Returns</tt>:zero if no error, the xmlParserErrors otherwise.

Daniel Veillard

</body></html>