7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="Gnome XML Library Reference Manual"
11 HREF="book1.html"><LINK
13 TITLE="Libxml Library Reference"
14 HREF="libxml-lib.html"><LINK
17 HREF="libxml-globals.html"><LINK
19 TITLE="parserInternals"
20 HREF="libxml-parserinternals.html"></HEAD
43 >Gnome XML Library Reference Manual</FONT
52 HREF="libxml-globals.html"
57 ><<< Previous Page</B
90 HREF="libxml-lib.html"
106 HREF="libxml-parserinternals.html"
111 >Next Page >>></B
120 NAME="LIBXML-DOCBPARSER">DOCBparser</H1
128 >DOCBparser -- </DIV
130 CLASS="REFSYNOPSISDIV"
146 HREF="libxml-docbparser.html#DOCBPARSERCTXT"
150 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
151 >docbParserCtxtPtr</A
154 HREF="libxml-docbparser.html#DOCBPARSERNODEINFO"
155 >docbParserNodeInfo</A
158 HREF="libxml-docbparser.html#DOCBSAXHANDLER"
162 HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
163 >docbSAXHandlerPtr</A
166 HREF="libxml-docbparser.html#DOCBPARSERINPUT"
170 HREF="libxml-docbparser.html#DOCBPARSERINPUTPTR"
171 >docbParserInputPtr</A
174 HREF="libxml-docbparser.html#DOCBDOCPTR"
178 HREF="libxml-docbparser.html#DOCBNODEPTR"
182 HREF="libxml-docbparser.html#DOCBENCODEENTITIES"
183 >docbEncodeEntities</A
184 > (unsigned char *out,
190 HREF="libxml-docbparser.html#DOCBDOCPTR"
193 HREF="libxml-docbparser.html#DOCBSAXPARSEDOC"
196 HREF="libxml-tree.html#XMLCHAR"
199 const char *encoding,
201 HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
202 >docbSAXHandlerPtr</A
206 HREF="libxml-docbparser.html#DOCBDOCPTR"
209 HREF="libxml-docbparser.html#DOCBPARSEDOC"
212 HREF="libxml-tree.html#XMLCHAR"
215 const char *encoding);
217 HREF="libxml-docbparser.html#DOCBDOCPTR"
220 HREF="libxml-docbparser.html#DOCBSAXPARSEFILE"
222 > (const char *filename,
223 const char *encoding,
225 HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
226 >docbSAXHandlerPtr</A
230 HREF="libxml-docbparser.html#DOCBDOCPTR"
233 HREF="libxml-docbparser.html#DOCBPARSEFILE"
235 > (const char *filename,
236 const char *encoding);
238 HREF="libxml-docbparser.html#DOCBFREEPARSERCTXT"
239 >docbFreeParserCtxt</A
241 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
242 >docbParserCtxtPtr</A
245 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
246 >docbParserCtxtPtr</A
248 HREF="libxml-docbparser.html#DOCBCREATEPUSHPARSERCTXT"
249 >docbCreatePushParserCtxt</A
251 HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
252 >docbSAXHandlerPtr</A
257 const char *filename,
259 HREF="libxml-encoding.html#XMLCHARENCODING"
263 HREF="libxml-docbparser.html#DOCBPARSECHUNK"
266 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
267 >docbParserCtxtPtr</A
273 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
274 >docbParserCtxtPtr</A
276 HREF="libxml-docbparser.html#DOCBCREATEFILEPARSERCTXT"
277 >docbCreateFileParserCtxt</A
278 > (const char *filename,
279 const char *encoding);
281 HREF="libxml-docbparser.html#DOCBPARSEDOCUMENT"
282 >docbParseDocument</A
284 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
285 >docbParserCtxtPtr</A
315 NAME="DOCBPARSERCTXT"
326 CLASS="PROGRAMLISTING"
327 >typedef xmlParserCtxt docbParserCtxt;</PRE
341 NAME="DOCBPARSERCTXTPTR"
343 >docbParserCtxtPtr</H3
352 CLASS="PROGRAMLISTING"
353 >typedef xmlParserCtxtPtr docbParserCtxtPtr;</PRE
367 NAME="DOCBPARSERNODEINFO"
369 >docbParserNodeInfo</H3
378 CLASS="PROGRAMLISTING"
379 >typedef xmlParserNodeInfo docbParserNodeInfo;</PRE
393 NAME="DOCBSAXHANDLER"
404 CLASS="PROGRAMLISTING"
405 >typedef xmlSAXHandler docbSAXHandler;</PRE
419 NAME="DOCBSAXHANDLERPTR"
421 >docbSAXHandlerPtr</H3
430 CLASS="PROGRAMLISTING"
431 >typedef xmlSAXHandlerPtr docbSAXHandlerPtr;</PRE
445 NAME="DOCBPARSERINPUT"
456 CLASS="PROGRAMLISTING"
457 >typedef xmlParserInput docbParserInput;</PRE
471 NAME="DOCBPARSERINPUTPTR"
473 >docbParserInputPtr</H3
482 CLASS="PROGRAMLISTING"
483 >typedef xmlParserInputPtr docbParserInputPtr;</PRE
508 CLASS="PROGRAMLISTING"
509 >typedef xmlDocPtr docbDocPtr;</PRE
534 CLASS="PROGRAMLISTING"
535 >typedef xmlNodePtr docbNodePtr;</PRE
549 NAME="DOCBENCODEENTITIES"
551 >docbEncodeEntities ()</H3
560 CLASS="PROGRAMLISTING"
561 >int docbEncodeEntities (unsigned char *out,
570 >Take a block of UTF-8 chars in and try to convert it to an ASCII
571 plus SGML entities block of chars out.</P
575 CLASS="INFORMALTABLE"
602 > a pointer to an array of bytes to store the result</TD
641 > a pointer to an array of UTF-8 chars</TD
680 > the quote character to escape (' or ") or zero.</TD
698 >0 if success, -2 if the transcoding fails, or -1 otherwise
704 > after return is the number of octets consumed
705 as the return value is positive, else unpredictable.
711 > after return is the number of octets consumed.</TD
726 NAME="DOCBSAXPARSEDOC"
728 >docbSAXParseDoc ()</H3
737 CLASS="PROGRAMLISTING"
739 HREF="libxml-docbparser.html#DOCBDOCPTR"
741 > docbSAXParseDoc (<A
742 HREF="libxml-tree.html#XMLCHAR"
745 const char *encoding,
747 HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
748 >docbSAXHandlerPtr</A
750 void *userData);</PRE
755 >parse an SGML in-memory document and build a tree.
756 It use the given SAX function block to handle the parsing callback.
757 If sax is NULL, fallback to the default DOM tree building routines.</P
761 CLASS="INFORMALTABLE"
788 > a pointer to an array of xmlChar</TD
805 > a free form C string describing the SGML document encoding, or NULL</TD
822 > the SAX handler block</TD
839 > if using SAX, this pointer will be provided on callbacks. </TD
857 >the resulting document tree</TD
883 CLASS="PROGRAMLISTING"
885 HREF="libxml-docbparser.html#DOCBDOCPTR"
888 HREF="libxml-tree.html#XMLCHAR"
891 const char *encoding);</PRE
896 >parse an SGML in-memory document and build a tree.</P
900 CLASS="INFORMALTABLE"
927 > a pointer to an array of xmlChar</TD
944 > a free form C string describing the SGML document encoding, or NULL</TD
962 >the resulting document tree</TD
977 NAME="DOCBSAXPARSEFILE"
979 >docbSAXParseFile ()</H3
988 CLASS="PROGRAMLISTING"
990 HREF="libxml-docbparser.html#DOCBDOCPTR"
992 > docbSAXParseFile (const char *filename,
993 const char *encoding,
995 HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
996 >docbSAXHandlerPtr</A
998 void *userData);</PRE
1003 >parse an SGML file and build a tree. Automatic support for ZLIB/Compress
1004 compressed document is provided by default if found at compile-time.
1005 It use the given SAX function block to handle the parsing callback.
1006 If sax is NULL, fallback to the default DOM tree building routines.</P
1010 CLASS="INFORMALTABLE"
1054 > a free form C string describing the SGML document encoding, or NULL</TD
1071 > the SAX handler block</TD
1088 > if using SAX, this pointer will be provided on callbacks. </TD
1106 >the resulting document tree</TD
1121 NAME="DOCBPARSEFILE"
1123 >docbParseFile ()</H3
1132 CLASS="PROGRAMLISTING"
1134 HREF="libxml-docbparser.html#DOCBDOCPTR"
1136 > docbParseFile (const char *filename,
1137 const char *encoding);</PRE
1142 >parse a Docbook SGML file and build a tree. Automatic support for
1143 ZLIB/Compress compressed document is provided by default if found
1148 CLASS="INFORMALTABLE"
1192 > a free form C string describing document encoding, or NULL</TD
1210 >the resulting document tree</TD
1225 NAME="DOCBFREEPARSERCTXT"
1227 >docbFreeParserCtxt ()</H3
1236 CLASS="PROGRAMLISTING"
1237 >void docbFreeParserCtxt (<A
1238 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1239 >docbParserCtxtPtr</A
1245 >Free all the memory used by a parser context. However the parsed
1246 document in ctxt->myDoc is not freed.</P
1250 CLASS="INFORMALTABLE"
1277 > an SGML parser context</TD
1292 NAME="DOCBCREATEPUSHPARSERCTXT"
1294 >docbCreatePushParserCtxt ()</H3
1303 CLASS="PROGRAMLISTING"
1305 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1306 >docbParserCtxtPtr</A
1307 > docbCreatePushParserCtxt (<A
1308 HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
1309 >docbSAXHandlerPtr</A
1314 const char *filename,
1316 HREF="libxml-encoding.html#XMLCHARENCODING"
1323 >Create a parser context for using the DocBook SGML parser in push mode
1324 To allow content encoding detection, <TT
1335 > is used for fetching external entities
1336 and error/warning reports.</P
1340 CLASS="INFORMALTABLE"
1384 > The user data returned on SAX callbacks</TD
1401 > a pointer to an array of chars</TD
1418 > number of chars in the array</TD
1435 > an optional file name or URI</TD
1452 > an optional encoding</TD
1470 >the new parser context or NULL</TD
1485 NAME="DOCBPARSECHUNK"
1487 >docbParseChunk ()</H3
1496 CLASS="PROGRAMLISTING"
1497 >int docbParseChunk (<A
1498 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1499 >docbParserCtxtPtr</A
1503 int terminate);</PRE
1508 >Parse a Chunk of memory</P
1512 CLASS="INFORMALTABLE"
1539 > an XML parser context</TD
1573 > the size in byte of the chunk</TD
1590 > last chunk indicator</TD
1608 >zero if no error, the xmlParserErrors otherwise.</TD
1623 NAME="DOCBCREATEFILEPARSERCTXT"
1625 >docbCreateFileParserCtxt ()</H3
1634 CLASS="PROGRAMLISTING"
1636 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1637 >docbParserCtxtPtr</A
1638 > docbCreateFileParserCtxt (const char *filename,
1639 const char *encoding);</PRE
1644 >Create a parser context for a file content.
1645 Automatic support for ZLIB/Compress compressed document is provided
1646 by default if found at compile-time.</P
1650 CLASS="INFORMALTABLE"
1694 > the SGML document encoding, or NULL</TD
1712 >the new parser context or NULL</TD
1727 NAME="DOCBPARSEDOCUMENT"
1729 >docbParseDocument ()</H3
1738 CLASS="PROGRAMLISTING"
1739 >int docbParseDocument (<A
1740 HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1741 >docbParserCtxtPtr</A
1747 >parse an SGML document (and build a tree if using the standard SAX
1752 CLASS="INFORMALTABLE"
1779 > an SGML parser context</TD
1797 >0, -1 in case of error. the parser context is augmented
1798 as a result of the parsing.</TD
1810 CLEAR="all"><BR><TABLE
1822 HREF="libxml-globals.html"
1827 ><<< Previous Page</B
1860 HREF="libxml-lib.html"
1876 HREF="libxml-parserinternals.html"
1881 >Next Page >>></B