Blame doc/devhelp/libxml2-DOCBparser.html

Packit 423ecb
Packit 423ecb
<html>
Packit 423ecb
  <head>
Packit 423ecb
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
Packit 423ecb
    <title>DOCBparser: old DocBook SGML parser</title>
Packit 423ecb
    <meta name="generator" content="Libxml2 devhelp stylesheet"/>
Packit 423ecb
    <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
Packit 423ecb
    <link rel="up" href="general.html" title="API"/>
Packit 423ecb
    <link rel="stylesheet" href="style.css" type="text/css"/>
Packit 423ecb
    <link rel="chapter" href="general.html" title="API"/>
Packit 423ecb
  </head>
Packit 423ecb
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 423ecb
    
Packit 423ecb
      
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Up
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Home
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Next
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        libxml2 Reference Manual
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
    

Packit 423ecb
      DOCBparser
Packit 423ecb
    
Packit 423ecb
    

DOCBparser - old DocBook SGML parser

Packit 423ecb
    

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

Packit 423ecb
    

WARNING: this module is deprecated !

Packit 423ecb
    

Author(s): Daniel Veillard

Packit 423ecb
    
Packit 423ecb
      

Synopsis

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

Description

Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Details

Packit 423ecb
      
Packit 423ecb
        

Typedef docbDocPtr

xmlDocPtr docbDocPtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef docbParserCtxt

xmlParserCtxt docbParserCtxt;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef docbParserCtxtPtr

xmlParserCtxtPtr docbParserCtxtPtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef docbParserInput

xmlParserInput docbParserInput;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef docbParserInputPtr

xmlParserInputPtr docbParserInputPtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef docbSAXHandler

xmlSAXHandler docbSAXHandler;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef docbSAXHandlerPtr

xmlSAXHandlerPtr docbSAXHandlerPtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

docbCreateFileParserCtxt ()

docbParserCtxtPtr	docbCreateFileParserCtxt	(const char * filename, 
const char * encoding)
Packit 423ecb

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 423ecb
<tt>filename</tt>:the filename
<tt>encoding</tt>:the SGML document encoding, or NULL
<tt>Returns</tt>:the new parser context or NULL
Packit 423ecb
        
Packit 423ecb
        

docbCreatePushParserCtxt ()

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

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 423ecb
<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
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<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.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:an SGML parser context
Packit 423ecb
        
Packit 423ecb
        

docbParseChunk ()

int	docbParseChunk			(docbParserCtxtPtr ctxt, 
const char * chunk,
int size,
int terminate)
Packit 423ecb

Parse a Chunk of memory

Packit 423ecb
<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.
Packit 423ecb
        
Packit 423ecb
        

docbParseDoc ()

docbDocPtr	docbParseDoc		(xmlChar * cur, 
const char * encoding)
Packit 423ecb

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

Packit 423ecb
<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
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<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.
Packit 423ecb
        
Packit 423ecb
        

docbParseFile ()

docbDocPtr	docbParseFile		(const char * filename, 
const char * encoding)
Packit 423ecb

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 423ecb
<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
Packit 423ecb
        
Packit 423ecb
        

docbSAXParseDoc ()

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

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 423ecb
<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
Packit 423ecb
        
Packit 423ecb
        

docbSAXParseFile ()

docbDocPtr	docbSAXParseFile	(const char * filename, 
const char * encoding,
docbSAXHandlerPtr sax,
void * userData)
Packit 423ecb

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 423ecb
<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
Packit 423ecb
        
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
  </body>
Packit 423ecb
</html>