Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# DOCBparser

## Name

DOCBparser --

## Synopsis

    typedef     docbParserCtxt;
    typedef     docbParserCtxtPtr;
    typedef     docbParserNodeInfo;
    typedef     docbSAXHandler;
    typedef     docbSAXHandlerPtr;
    typedef     docbParserInput;
    typedef     docbParserInputPtr;
    typedef     docbDocPtr;
    typedef     docbNodePtr;
    int         docbEncodeEntities              (unsigned char *out,
                                                 int *outlen,
                                                 unsigned char *in,
                                                 int *inlen,
                                                 int quoteChar);
    docbDocPtr  docbSAXParseDoc                 (xmlChar *cur,
                                                 const char *encoding,
                                                 docbSAXHandlerPtr sax,
                                                 void *userData);
    docbDocPtr  docbParseDoc                    (xmlChar *cur,
                                                 const char *encoding);
    docbDocPtr  docbSAXParseFile                (const char *filename,
                                                 const char *encoding,
                                                 docbSAXHandlerPtr sax,
                                                 void *userData);
    docbDocPtr  docbParseFile                   (const char *filename,
                                                 const char *encoding);
    void        docbFreeParserCtxt              (docbParserCtxtPtr ctxt);
    docbParserCtxtPtr docbCreatePushParserCtxt  (docbSAXHandlerPtr sax,
                                                 void *user_data,
                                                 const char *chunk,
                                                 int size,
                                                 const char *filename,
                                                 xmlCharEncoding enc);
    int         docbParseChunk                  (docbParserCtxtPtr ctxt,
                                                 const char *chunk,
                                                 int size,
                                                 int terminate);
    docbParserCtxtPtr docbCreateFileParserCtxt  (const char *filename,
                                                 const char *encoding);
    int         docbParseDocument               (docbParserCtxtPtr ctxt);

## Description

## Details

### docbParserCtxt

### docbParserCtxtPtr

### docbParserNodeInfo

### docbSAXHandler

### docbSAXHandlerPtr

### docbParserInput

### docbParserInputPtr

### docbDocPtr

### docbNodePtr

### docbEncodeEntities ()

    int         docbEncodeEntities              (unsigned char *out,
                                                 int *outlen,
                                                 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` : |
`outlen` : |
`in` : |
`inlen` : |
`quoteChar` : |
Returns : |

### docbSAXParseDoc ()

    docbDocPtr  docbSAXParseDoc                 (xmlChar *cur,
                                                 const char *encoding,
                                                 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` : |
`encoding` : |
`sax` : |
`userData` : |
Returns : |

### docbParseDoc ()

    docbDocPtr  docbParseDoc                    (xmlChar *cur,
                                                 const char *encoding);

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

`cur` : |
`encoding` : |
Returns : |

### docbSAXParseFile ()

    docbDocPtr  docbSAXParseFile                (const char *filename,
                                                 const char *encoding,
                                                 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` : |
`encoding` : |
`sax` : |
`userData` : |
Returns : |

### docbParseFile ()

    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` : |
`encoding` : |
Returns : |

### docbFreeParserCtxt ()

    void        docbFreeParserCtxt              (docbParserCtxtPtr ctxt);

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

`ctxt` : |

### docbCreatePushParserCtxt ()

    docbParserCtxtPtr docbCreatePushParserCtxt  (docbSAXHandlerPtr sax,
                                                 void *user_data,
                                                 const char *chunk,
                                                 int size,
                                                 const char *filename,
                                                 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` : |
`user_data` : |
`chunk` : |
`size` : |
`filename` : |
`enc` : |
Returns : |

### docbParseChunk ()

    int         docbParseChunk                  (docbParserCtxtPtr ctxt,
                                                 const char *chunk,
                                                 int size,
                                                 int terminate);

Parse a Chunk of memory

`ctxt` : |
`chunk` : |
`size` : |
`terminate` : |
Returns : |

### docbCreateFileParserCtxt ()

    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` : |
`encoding` : |
Returns : |

### docbParseDocument ()

    int         docbParseDocument               (docbParserCtxtPtr ctxt);

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

`ctxt` : |
Returns : |

<<< Previous Page | Home | Up | Next Page >>>
globals | parserInternals