blob: b978d1b396e6937170b8d1d8b3c9ffed7ae3755f [file] [log] [blame]
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001<HTML
2><HEAD
3><TITLE
4>DOCBparser</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillardbed7b052001-05-19 14:59:49 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.59"><LINK
Daniel Veillard7d6fd212001-05-10 15:34:11 +00008REL="HOME"
9TITLE="Gnome XML Library Reference Manual"
10HREF="book1.html"><LINK
11REL="UP"
12TITLE="Libxml Library Reference"
13HREF="libxml-lib.html"><LINK
14REL="PREVIOUS"
15TITLE="catalog"
16HREF="libxml-catalog.html"><LINK
17REL="NEXT"
18TITLE="parserInternals"
19HREF="libxml-parserinternals.html"></HEAD
20><BODY
Daniel Veillardbed7b052001-05-19 14:59:49 +000021CLASS="REFENTRY"
Daniel Veillard7d6fd212001-05-10 15:34:11 +000022BGCOLOR="#FFFFFF"
23TEXT="#000000"
24LINK="#0000FF"
25VLINK="#840084"
26ALINK="#0000FF"
27><DIV
28CLASS="NAVHEADER"
29><TABLE
30WIDTH="100%"
31BORDER="0"
32BGCOLOR="#000000"
33CELLPADDING="1"
34CELLSPACING="0"
35><TR
36><TH
37COLSPAN="4"
38ALIGN="center"
39><FONT
40COLOR="#FFFFFF"
41SIZE="5"
42>Gnome XML Library Reference Manual</FONT
43></TH
44></TR
45><TR
46><TD
47WIDTH="25%"
48BGCOLOR="#C00000"
49ALIGN="left"
50><A
51HREF="libxml-catalog.html"
52><FONT
53COLOR="#FFFFFF"
54SIZE="3"
55><B
56>&#60;&#60;&#60; Previous Page</B
57></FONT
58></A
59></TD
60><TD
61WIDTH="25%"
62BGCOLOR="#0000C0"
63ALIGN="center"
64><FONT
65COLOR="#FFFFFF"
66SIZE="3"
67><B
68><A
69HREF="book1.html"
70><FONT
71COLOR="#FFFFFF"
72SIZE="3"
73><B
74>Home</B
75></FONT
76></A
77></B
78></FONT
79></TD
80><TD
81WIDTH="25%"
82BGCOLOR="#00C000"
83ALIGN="center"
84><FONT
85COLOR="#FFFFFF"
86SIZE="3"
87><B
88><A
89HREF="libxml-lib.html"
90><FONT
91COLOR="#FFFFFF"
92SIZE="3"
93><B
94>Up</B
95></FONT
96></A
97></B
98></FONT
99></TD
100><TD
101WIDTH="25%"
102BGCOLOR="#C00000"
103ALIGN="right"
104><A
105HREF="libxml-parserinternals.html"
106><FONT
107COLOR="#FFFFFF"
108SIZE="3"
109><B
110>Next Page &#62;&#62;&#62;</B
111></FONT
112></A
113></TD
114></TR
115></TABLE
116></DIV
117><H1
118><A
119NAME="LIBXML-DOCBPARSER"
120>DOCBparser</A
121></H1
122><DIV
123CLASS="REFNAMEDIV"
124><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000125NAME="AEN17613"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000126></A
127><H2
128>Name</H2
129>DOCBparser&nbsp;--&nbsp;</DIV
130><DIV
131CLASS="REFSYNOPSISDIV"
132><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000133NAME="AEN17616"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000134></A
135><H2
136>Synopsis</H2
137><TABLE
138BORDER="0"
139BGCOLOR="#D6E8FF"
140WIDTH="100%"
141CELLPADDING="6"
142><TR
143><TD
144><PRE
145CLASS="SYNOPSIS"
146>&#13;
147
148typedef <A
149HREF="libxml-docbparser.html#DOCBPARSERCTXT"
150>docbParserCtxt</A
151>;
152typedef <A
153HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
154>docbParserCtxtPtr</A
155>;
156typedef <A
157HREF="libxml-docbparser.html#DOCBPARSERNODEINFO"
158>docbParserNodeInfo</A
159>;
160typedef <A
161HREF="libxml-docbparser.html#DOCBSAXHANDLER"
162>docbSAXHandler</A
163>;
164typedef <A
165HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
166>docbSAXHandlerPtr</A
167>;
168typedef <A
169HREF="libxml-docbparser.html#DOCBPARSERINPUT"
170>docbParserInput</A
171>;
172typedef <A
173HREF="libxml-docbparser.html#DOCBPARSERINPUTPTR"
174>docbParserInputPtr</A
175>;
176typedef <A
177HREF="libxml-docbparser.html#DOCBDOCPTR"
178>docbDocPtr</A
179>;
180typedef <A
181HREF="libxml-docbparser.html#DOCBNODEPTR"
182>docbNodePtr</A
183>;
184int <A
185HREF="libxml-docbparser.html#DOCBENCODEENTITIES"
186>docbEncodeEntities</A
187> (unsigned char *out,
188 int *outlen,
189 unsigned char *in,
190 int *inlen,
191 int quoteChar);
192<A
193HREF="libxml-docbparser.html#DOCBDOCPTR"
194>docbDocPtr</A
195> <A
196HREF="libxml-docbparser.html#DOCBSAXPARSEDOC"
197>docbSAXParseDoc</A
198> (<A
199HREF="libxml-tree.html#XMLCHAR"
200>xmlChar</A
201> *cur,
202 const char *encoding,
203 <A
204HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
205>docbSAXHandlerPtr</A
206> sax,
207 void *userData);
208<A
209HREF="libxml-docbparser.html#DOCBDOCPTR"
210>docbDocPtr</A
211> <A
212HREF="libxml-docbparser.html#DOCBPARSEDOC"
213>docbParseDoc</A
214> (<A
215HREF="libxml-tree.html#XMLCHAR"
216>xmlChar</A
217> *cur,
218 const char *encoding);
219<A
220HREF="libxml-docbparser.html#DOCBDOCPTR"
221>docbDocPtr</A
222> <A
223HREF="libxml-docbparser.html#DOCBSAXPARSEFILE"
224>docbSAXParseFile</A
225> (const char *filename,
226 const char *encoding,
227 <A
228HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
229>docbSAXHandlerPtr</A
230> sax,
231 void *userData);
232<A
233HREF="libxml-docbparser.html#DOCBDOCPTR"
234>docbDocPtr</A
235> <A
236HREF="libxml-docbparser.html#DOCBPARSEFILE"
237>docbParseFile</A
238> (const char *filename,
239 const char *encoding);
240void <A
241HREF="libxml-docbparser.html#DOCBFREEPARSERCTXT"
242>docbFreeParserCtxt</A
243> (<A
244HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
245>docbParserCtxtPtr</A
246> ctxt);
247<A
248HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
249>docbParserCtxtPtr</A
250> <A
251HREF="libxml-docbparser.html#DOCBCREATEPUSHPARSERCTXT"
252>docbCreatePushParserCtxt</A
253> (<A
254HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
255>docbSAXHandlerPtr</A
256> sax,
257 void *user_data,
258 const char *chunk,
259 int size,
260 const char *filename,
261 <A
262HREF="libxml-encoding.html#XMLCHARENCODING"
263>xmlCharEncoding</A
264> enc);
265int <A
266HREF="libxml-docbparser.html#DOCBPARSECHUNK"
267>docbParseChunk</A
268> (<A
269HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
270>docbParserCtxtPtr</A
271> ctxt,
272 const char *chunk,
273 int size,
274 int terminate);
275<A
276HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
277>docbParserCtxtPtr</A
278> <A
279HREF="libxml-docbparser.html#DOCBCREATEFILEPARSERCTXT"
280>docbCreateFileParserCtxt</A
281> (const char *filename,
282 const char *encoding);
283int <A
284HREF="libxml-docbparser.html#DOCBPARSEDOCUMENT"
285>docbParseDocument</A
286> (<A
287HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
288>docbParserCtxtPtr</A
289> ctxt);</PRE
290></TD
291></TR
292></TABLE
293></DIV
294><DIV
295CLASS="REFSECT1"
296><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000297NAME="AEN17653"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000298></A
299><H2
300>Description</H2
301><P
302></P
303></DIV
304><DIV
305CLASS="REFSECT1"
306><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000307NAME="AEN17656"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000308></A
309><H2
310>Details</H2
311><DIV
312CLASS="REFSECT2"
313><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000314NAME="AEN17658"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000315></A
316><H3
317><A
318NAME="DOCBPARSERCTXT"
319></A
320>docbParserCtxt</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000321><TABLE
322BORDER="0"
323BGCOLOR="#D6E8FF"
324WIDTH="100%"
325CELLPADDING="6"
326><TR
327><TD
328><PRE
329CLASS="PROGRAMLISTING"
330>typedef xmlParserCtxt docbParserCtxt;</PRE
331></TD
332></TR
333></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000334><P
335></P
336></DIV
337><HR><DIV
338CLASS="REFSECT2"
339><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000340NAME="AEN17663"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000341></A
342><H3
343><A
344NAME="DOCBPARSERCTXTPTR"
345></A
346>docbParserCtxtPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000347><TABLE
348BORDER="0"
349BGCOLOR="#D6E8FF"
350WIDTH="100%"
351CELLPADDING="6"
352><TR
353><TD
354><PRE
355CLASS="PROGRAMLISTING"
356>typedef xmlParserCtxtPtr docbParserCtxtPtr;</PRE
357></TD
358></TR
359></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000360><P
361></P
362></DIV
363><HR><DIV
364CLASS="REFSECT2"
365><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000366NAME="AEN17668"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000367></A
368><H3
369><A
370NAME="DOCBPARSERNODEINFO"
371></A
372>docbParserNodeInfo</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000373><TABLE
374BORDER="0"
375BGCOLOR="#D6E8FF"
376WIDTH="100%"
377CELLPADDING="6"
378><TR
379><TD
380><PRE
381CLASS="PROGRAMLISTING"
382>typedef xmlParserNodeInfo docbParserNodeInfo;</PRE
383></TD
384></TR
385></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000386><P
387></P
388></DIV
389><HR><DIV
390CLASS="REFSECT2"
391><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000392NAME="AEN17673"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000393></A
394><H3
395><A
396NAME="DOCBSAXHANDLER"
397></A
398>docbSAXHandler</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000399><TABLE
400BORDER="0"
401BGCOLOR="#D6E8FF"
402WIDTH="100%"
403CELLPADDING="6"
404><TR
405><TD
406><PRE
407CLASS="PROGRAMLISTING"
408>typedef xmlSAXHandler docbSAXHandler;</PRE
409></TD
410></TR
411></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000412><P
413></P
414></DIV
415><HR><DIV
416CLASS="REFSECT2"
417><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000418NAME="AEN17678"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000419></A
420><H3
421><A
422NAME="DOCBSAXHANDLERPTR"
423></A
424>docbSAXHandlerPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000425><TABLE
426BORDER="0"
427BGCOLOR="#D6E8FF"
428WIDTH="100%"
429CELLPADDING="6"
430><TR
431><TD
432><PRE
433CLASS="PROGRAMLISTING"
434>typedef xmlSAXHandlerPtr docbSAXHandlerPtr;</PRE
435></TD
436></TR
437></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000438><P
439></P
440></DIV
441><HR><DIV
442CLASS="REFSECT2"
443><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000444NAME="AEN17683"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000445></A
446><H3
447><A
448NAME="DOCBPARSERINPUT"
449></A
450>docbParserInput</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000451><TABLE
452BORDER="0"
453BGCOLOR="#D6E8FF"
454WIDTH="100%"
455CELLPADDING="6"
456><TR
457><TD
458><PRE
459CLASS="PROGRAMLISTING"
460>typedef xmlParserInput docbParserInput;</PRE
461></TD
462></TR
463></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000464><P
465></P
466></DIV
467><HR><DIV
468CLASS="REFSECT2"
469><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000470NAME="AEN17688"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000471></A
472><H3
473><A
474NAME="DOCBPARSERINPUTPTR"
475></A
476>docbParserInputPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000477><TABLE
478BORDER="0"
479BGCOLOR="#D6E8FF"
480WIDTH="100%"
481CELLPADDING="6"
482><TR
483><TD
484><PRE
485CLASS="PROGRAMLISTING"
486>typedef xmlParserInputPtr docbParserInputPtr;</PRE
487></TD
488></TR
489></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000490><P
491></P
492></DIV
493><HR><DIV
494CLASS="REFSECT2"
495><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000496NAME="AEN17693"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000497></A
498><H3
499><A
500NAME="DOCBDOCPTR"
501></A
502>docbDocPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000503><TABLE
504BORDER="0"
505BGCOLOR="#D6E8FF"
506WIDTH="100%"
507CELLPADDING="6"
508><TR
509><TD
510><PRE
511CLASS="PROGRAMLISTING"
512>typedef xmlDocPtr docbDocPtr;</PRE
513></TD
514></TR
515></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000516><P
517></P
518></DIV
519><HR><DIV
520CLASS="REFSECT2"
521><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000522NAME="AEN17698"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000523></A
524><H3
525><A
526NAME="DOCBNODEPTR"
527></A
528>docbNodePtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000529><TABLE
530BORDER="0"
531BGCOLOR="#D6E8FF"
532WIDTH="100%"
533CELLPADDING="6"
534><TR
535><TD
536><PRE
537CLASS="PROGRAMLISTING"
538>typedef xmlNodePtr docbNodePtr;</PRE
539></TD
540></TR
541></TABLE
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000542><P
543></P
544></DIV
545><HR><DIV
546CLASS="REFSECT2"
547><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000548NAME="AEN17703"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000549></A
550><H3
551><A
552NAME="DOCBENCODEENTITIES"
553></A
554>docbEncodeEntities ()</H3
555><TABLE
556BORDER="0"
557BGCOLOR="#D6E8FF"
558WIDTH="100%"
559CELLPADDING="6"
560><TR
561><TD
562><PRE
563CLASS="PROGRAMLISTING"
564>int docbEncodeEntities (unsigned char *out,
565 int *outlen,
566 unsigned char *in,
567 int *inlen,
568 int quoteChar);</PRE
569></TD
570></TR
571></TABLE
572><P
573>Take a block of UTF-8 chars in and try to convert it to an ASCII
574plus SGML entities block of chars out.</P
575><P
576></P
577><DIV
578CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000579><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000580NAME="AEN17709"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000581></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000582><P
583></P
584><TABLE
585BORDER="0"
586WIDTH="100%"
587BGCOLOR="#FFD0D0"
588CELLSPACING="0"
589CELLPADDING="4"
590CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000591><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000592><TR
593><TD
594WIDTH="20%"
595ALIGN="RIGHT"
596VALIGN="TOP"
597><TT
598CLASS="PARAMETER"
599><I
600>out</I
601></TT
602>&nbsp;:</TD
603><TD
604WIDTH="80%"
605ALIGN="LEFT"
606VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000607> a pointer to an array of bytes to store the result</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000608></TR
609><TR
610><TD
611WIDTH="20%"
612ALIGN="RIGHT"
613VALIGN="TOP"
614><TT
615CLASS="PARAMETER"
616><I
617>outlen</I
618></TT
619>&nbsp;:</TD
620><TD
621WIDTH="80%"
622ALIGN="LEFT"
623VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000624> the length of <TT
625CLASS="PARAMETER"
626><I
627>out</I
628></TT
629></TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000630></TR
631><TR
632><TD
633WIDTH="20%"
634ALIGN="RIGHT"
635VALIGN="TOP"
636><TT
637CLASS="PARAMETER"
638><I
639>in</I
640></TT
641>&nbsp;:</TD
642><TD
643WIDTH="80%"
644ALIGN="LEFT"
645VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000646> a pointer to an array of UTF-8 chars</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000647></TR
648><TR
649><TD
650WIDTH="20%"
651ALIGN="RIGHT"
652VALIGN="TOP"
653><TT
654CLASS="PARAMETER"
655><I
656>inlen</I
657></TT
658>&nbsp;:</TD
659><TD
660WIDTH="80%"
661ALIGN="LEFT"
662VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000663> the length of <TT
664CLASS="PARAMETER"
665><I
666>in</I
667></TT
668></TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000669></TR
670><TR
671><TD
672WIDTH="20%"
673ALIGN="RIGHT"
674VALIGN="TOP"
675><TT
676CLASS="PARAMETER"
677><I
678>quoteChar</I
679></TT
680>&nbsp;:</TD
681><TD
682WIDTH="80%"
683ALIGN="LEFT"
684VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000685> the quote character to escape (' or ") or zero.</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000686></TR
687><TR
688><TD
689WIDTH="20%"
690ALIGN="RIGHT"
691VALIGN="TOP"
692><I
693CLASS="EMPHASIS"
694>Returns</I
695> :</TD
696><TD
697WIDTH="80%"
698ALIGN="LEFT"
699VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000700>0 if success, -2 if the transcoding fails, or -1 otherwise
701The value of <TT
702CLASS="PARAMETER"
703><I
704>inlen</I
705></TT
706> after return is the number of octets consumed
707as the return value is positive, else unpredictiable.
708The value of <TT
709CLASS="PARAMETER"
710><I
711>outlen</I
712></TT
713> after return is the number of octets consumed.</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000714></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000715></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000716></TABLE
717><P
718></P
719></DIV
720></DIV
721><HR><DIV
722CLASS="REFSECT2"
723><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000724NAME="AEN17742"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000725></A
726><H3
727><A
728NAME="DOCBSAXPARSEDOC"
729></A
730>docbSAXParseDoc ()</H3
731><TABLE
732BORDER="0"
733BGCOLOR="#D6E8FF"
734WIDTH="100%"
735CELLPADDING="6"
736><TR
737><TD
738><PRE
739CLASS="PROGRAMLISTING"
740><A
741HREF="libxml-docbparser.html#DOCBDOCPTR"
742>docbDocPtr</A
743> docbSAXParseDoc (<A
744HREF="libxml-tree.html#XMLCHAR"
745>xmlChar</A
746> *cur,
747 const char *encoding,
748 <A
749HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
750>docbSAXHandlerPtr</A
751> sax,
752 void *userData);</PRE
753></TD
754></TR
755></TABLE
756><P
757>parse an SGML in-memory document and build a tree.
758It use the given SAX function block to handle the parsing callback.
759If sax is NULL, fallback to the default DOM tree building routines.</P
760><P
761></P
762><DIV
763CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000764><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000765NAME="AEN17751"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000766></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000767><P
768></P
769><TABLE
770BORDER="0"
771WIDTH="100%"
772BGCOLOR="#FFD0D0"
773CELLSPACING="0"
774CELLPADDING="4"
775CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000776><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000777><TR
778><TD
779WIDTH="20%"
780ALIGN="RIGHT"
781VALIGN="TOP"
782><TT
783CLASS="PARAMETER"
784><I
785>cur</I
786></TT
787>&nbsp;:</TD
788><TD
789WIDTH="80%"
790ALIGN="LEFT"
791VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000792> a pointer to an array of xmlChar</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000793></TR
794><TR
795><TD
796WIDTH="20%"
797ALIGN="RIGHT"
798VALIGN="TOP"
799><TT
800CLASS="PARAMETER"
801><I
802>encoding</I
803></TT
804>&nbsp;:</TD
805><TD
806WIDTH="80%"
807ALIGN="LEFT"
808VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000809> a free form C string describing the SGML document encoding, or NULL</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000810></TR
811><TR
812><TD
813WIDTH="20%"
814ALIGN="RIGHT"
815VALIGN="TOP"
816><TT
817CLASS="PARAMETER"
818><I
819>sax</I
820></TT
821>&nbsp;:</TD
822><TD
823WIDTH="80%"
824ALIGN="LEFT"
825VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000826> the SAX handler block</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000827></TR
828><TR
829><TD
830WIDTH="20%"
831ALIGN="RIGHT"
832VALIGN="TOP"
833><TT
834CLASS="PARAMETER"
835><I
836>userData</I
837></TT
838>&nbsp;:</TD
839><TD
840WIDTH="80%"
841ALIGN="LEFT"
842VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000843> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000844></TR
845><TR
846><TD
847WIDTH="20%"
848ALIGN="RIGHT"
849VALIGN="TOP"
850><I
851CLASS="EMPHASIS"
852>Returns</I
853> :</TD
854><TD
855WIDTH="80%"
856ALIGN="LEFT"
857VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000858>the resulting document tree</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000859></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000860></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000861></TABLE
862><P
863></P
864></DIV
865></DIV
866><HR><DIV
867CLASS="REFSECT2"
868><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000869NAME="AEN17776"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000870></A
871><H3
872><A
873NAME="DOCBPARSEDOC"
874></A
875>docbParseDoc ()</H3
876><TABLE
877BORDER="0"
878BGCOLOR="#D6E8FF"
879WIDTH="100%"
880CELLPADDING="6"
881><TR
882><TD
883><PRE
884CLASS="PROGRAMLISTING"
885><A
886HREF="libxml-docbparser.html#DOCBDOCPTR"
887>docbDocPtr</A
888> docbParseDoc (<A
889HREF="libxml-tree.html#XMLCHAR"
890>xmlChar</A
891> *cur,
892 const char *encoding);</PRE
893></TD
894></TR
895></TABLE
896><P
897>parse an SGML in-memory document and build a tree.</P
898><P
899></P
900><DIV
901CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000902><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000903NAME="AEN17784"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000904></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000905><P
906></P
907><TABLE
908BORDER="0"
909WIDTH="100%"
910BGCOLOR="#FFD0D0"
911CELLSPACING="0"
912CELLPADDING="4"
913CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000914><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000915><TR
916><TD
917WIDTH="20%"
918ALIGN="RIGHT"
919VALIGN="TOP"
920><TT
921CLASS="PARAMETER"
922><I
923>cur</I
924></TT
925>&nbsp;:</TD
926><TD
927WIDTH="80%"
928ALIGN="LEFT"
929VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000930> a pointer to an array of xmlChar</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000931></TR
932><TR
933><TD
934WIDTH="20%"
935ALIGN="RIGHT"
936VALIGN="TOP"
937><TT
938CLASS="PARAMETER"
939><I
940>encoding</I
941></TT
942>&nbsp;:</TD
943><TD
944WIDTH="80%"
945ALIGN="LEFT"
946VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000947> a free form C string describing the SGML document encoding, or NULL</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000948></TR
949><TR
950><TD
951WIDTH="20%"
952ALIGN="RIGHT"
953VALIGN="TOP"
954><I
955CLASS="EMPHASIS"
956>Returns</I
957> :</TD
958><TD
959WIDTH="80%"
960ALIGN="LEFT"
961VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000962>the resulting document tree</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000963></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000964></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000965></TABLE
966><P
967></P
968></DIV
969></DIV
970><HR><DIV
971CLASS="REFSECT2"
972><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000973NAME="AEN17801"
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000974></A
975><H3
976><A
977NAME="DOCBSAXPARSEFILE"
978></A
979>docbSAXParseFile ()</H3
980><TABLE
981BORDER="0"
982BGCOLOR="#D6E8FF"
983WIDTH="100%"
984CELLPADDING="6"
985><TR
986><TD
987><PRE
988CLASS="PROGRAMLISTING"
989><A
990HREF="libxml-docbparser.html#DOCBDOCPTR"
991>docbDocPtr</A
992> docbSAXParseFile (const char *filename,
993 const char *encoding,
994 <A
995HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
996>docbSAXHandlerPtr</A
997> sax,
998 void *userData);</PRE
999></TD
1000></TR
1001></TABLE
1002><P
1003>parse an SGML file and build a tree. Automatic support for ZLIB/Compress
1004compressed document is provided by default if found at compile-time.
1005It use the given SAX function block to handle the parsing callback.
1006If sax is NULL, fallback to the default DOM tree building routines.</P
1007><P
1008></P
1009><DIV
1010CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001011><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001012NAME="AEN17809"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001013></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001014><P
1015></P
1016><TABLE
1017BORDER="0"
1018WIDTH="100%"
1019BGCOLOR="#FFD0D0"
1020CELLSPACING="0"
1021CELLPADDING="4"
1022CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001023><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001024><TR
1025><TD
1026WIDTH="20%"
1027ALIGN="RIGHT"
1028VALIGN="TOP"
1029><TT
1030CLASS="PARAMETER"
1031><I
1032>filename</I
1033></TT
1034>&nbsp;:</TD
1035><TD
1036WIDTH="80%"
1037ALIGN="LEFT"
1038VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001039> the filename</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001040></TR
1041><TR
1042><TD
1043WIDTH="20%"
1044ALIGN="RIGHT"
1045VALIGN="TOP"
1046><TT
1047CLASS="PARAMETER"
1048><I
1049>encoding</I
1050></TT
1051>&nbsp;:</TD
1052><TD
1053WIDTH="80%"
1054ALIGN="LEFT"
1055VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001056> a free form C string describing the SGML document encoding, or NULL</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001057></TR
1058><TR
1059><TD
1060WIDTH="20%"
1061ALIGN="RIGHT"
1062VALIGN="TOP"
1063><TT
1064CLASS="PARAMETER"
1065><I
1066>sax</I
1067></TT
1068>&nbsp;:</TD
1069><TD
1070WIDTH="80%"
1071ALIGN="LEFT"
1072VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001073> the SAX handler block</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001074></TR
1075><TR
1076><TD
1077WIDTH="20%"
1078ALIGN="RIGHT"
1079VALIGN="TOP"
1080><TT
1081CLASS="PARAMETER"
1082><I
1083>userData</I
1084></TT
1085>&nbsp;:</TD
1086><TD
1087WIDTH="80%"
1088ALIGN="LEFT"
1089VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001090> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001091></TR
1092><TR
1093><TD
1094WIDTH="20%"
1095ALIGN="RIGHT"
1096VALIGN="TOP"
1097><I
1098CLASS="EMPHASIS"
1099>Returns</I
1100> :</TD
1101><TD
1102WIDTH="80%"
1103ALIGN="LEFT"
1104VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001105>the resulting document tree</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001106></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001107></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001108></TABLE
1109><P
1110></P
1111></DIV
1112></DIV
1113><HR><DIV
1114CLASS="REFSECT2"
1115><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001116NAME="AEN17834"
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001117></A
1118><H3
1119><A
1120NAME="DOCBPARSEFILE"
1121></A
1122>docbParseFile ()</H3
1123><TABLE
1124BORDER="0"
1125BGCOLOR="#D6E8FF"
1126WIDTH="100%"
1127CELLPADDING="6"
1128><TR
1129><TD
1130><PRE
1131CLASS="PROGRAMLISTING"
1132><A
1133HREF="libxml-docbparser.html#DOCBDOCPTR"
1134>docbDocPtr</A
1135> docbParseFile (const char *filename,
1136 const char *encoding);</PRE
1137></TD
1138></TR
1139></TABLE
1140><P
1141>parse a Docbook SGML file and build a tree. Automatic support for
1142ZLIB/Compress compressed document is provided by default if found
1143at compile-time.</P
1144><P
1145></P
1146><DIV
1147CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001148><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001149NAME="AEN17841"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001150></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001151><P
1152></P
1153><TABLE
1154BORDER="0"
1155WIDTH="100%"
1156BGCOLOR="#FFD0D0"
1157CELLSPACING="0"
1158CELLPADDING="4"
1159CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001160><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001161><TR
1162><TD
1163WIDTH="20%"
1164ALIGN="RIGHT"
1165VALIGN="TOP"
1166><TT
1167CLASS="PARAMETER"
1168><I
1169>filename</I
1170></TT
1171>&nbsp;:</TD
1172><TD
1173WIDTH="80%"
1174ALIGN="LEFT"
1175VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001176> the filename</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001177></TR
1178><TR
1179><TD
1180WIDTH="20%"
1181ALIGN="RIGHT"
1182VALIGN="TOP"
1183><TT
1184CLASS="PARAMETER"
1185><I
1186>encoding</I
1187></TT
1188>&nbsp;:</TD
1189><TD
1190WIDTH="80%"
1191ALIGN="LEFT"
1192VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001193> a free form C string describing document encoding, or NULL</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001194></TR
1195><TR
1196><TD
1197WIDTH="20%"
1198ALIGN="RIGHT"
1199VALIGN="TOP"
1200><I
1201CLASS="EMPHASIS"
1202>Returns</I
1203> :</TD
1204><TD
1205WIDTH="80%"
1206ALIGN="LEFT"
1207VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001208>the resulting document tree</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001209></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001210></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001211></TABLE
1212><P
1213></P
1214></DIV
1215></DIV
1216><HR><DIV
1217CLASS="REFSECT2"
1218><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001219NAME="AEN17858"
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001220></A
1221><H3
1222><A
1223NAME="DOCBFREEPARSERCTXT"
1224></A
1225>docbFreeParserCtxt ()</H3
1226><TABLE
1227BORDER="0"
1228BGCOLOR="#D6E8FF"
1229WIDTH="100%"
1230CELLPADDING="6"
1231><TR
1232><TD
1233><PRE
1234CLASS="PROGRAMLISTING"
1235>void docbFreeParserCtxt (<A
1236HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1237>docbParserCtxtPtr</A
1238> ctxt);</PRE
1239></TD
1240></TR
1241></TABLE
1242><P
1243>Free all the memory used by a parser context. However the parsed
1244document in ctxt-&gt;myDoc is not freed.</P
1245><P
1246></P
1247><DIV
1248CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001249><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001250NAME="AEN17865"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001251></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001252><P
1253></P
1254><TABLE
1255BORDER="0"
1256WIDTH="100%"
1257BGCOLOR="#FFD0D0"
1258CELLSPACING="0"
1259CELLPADDING="4"
1260CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001261><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001262><TR
1263><TD
1264WIDTH="20%"
1265ALIGN="RIGHT"
1266VALIGN="TOP"
1267><TT
1268CLASS="PARAMETER"
1269><I
1270>ctxt</I
1271></TT
1272>&nbsp;:</TD
1273><TD
1274WIDTH="80%"
1275ALIGN="LEFT"
1276VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001277> an SGML parser context</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001278></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001279></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001280></TABLE
1281><P
1282></P
1283></DIV
1284></DIV
1285><HR><DIV
1286CLASS="REFSECT2"
1287><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001288NAME="AEN17874"
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001289></A
1290><H3
1291><A
1292NAME="DOCBCREATEPUSHPARSERCTXT"
1293></A
1294>docbCreatePushParserCtxt ()</H3
1295><TABLE
1296BORDER="0"
1297BGCOLOR="#D6E8FF"
1298WIDTH="100%"
1299CELLPADDING="6"
1300><TR
1301><TD
1302><PRE
1303CLASS="PROGRAMLISTING"
1304><A
1305HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1306>docbParserCtxtPtr</A
1307> docbCreatePushParserCtxt (<A
1308HREF="libxml-docbparser.html#DOCBSAXHANDLERPTR"
1309>docbSAXHandlerPtr</A
1310> sax,
1311 void *user_data,
1312 const char *chunk,
1313 int size,
1314 const char *filename,
1315 <A
1316HREF="libxml-encoding.html#XMLCHARENCODING"
1317>xmlCharEncoding</A
1318> enc);</PRE
1319></TD
1320></TR
1321></TABLE
1322><P
1323>Create a parser context for using the DocBook SGML parser in push mode
1324To allow content encoding detection, <TT
1325CLASS="PARAMETER"
1326><I
1327>size</I
1328></TT
1329> should be &gt;= 4
1330The value of <TT
1331CLASS="PARAMETER"
1332><I
1333>filename</I
1334></TT
1335> is used for fetching external entities
1336and error/warning reports.</P
1337><P
1338></P
1339><DIV
1340CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001341><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001342NAME="AEN17885"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001343></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001344><P
1345></P
1346><TABLE
1347BORDER="0"
1348WIDTH="100%"
1349BGCOLOR="#FFD0D0"
1350CELLSPACING="0"
1351CELLPADDING="4"
1352CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001353><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001354><TR
1355><TD
1356WIDTH="20%"
1357ALIGN="RIGHT"
1358VALIGN="TOP"
1359><TT
1360CLASS="PARAMETER"
1361><I
1362>sax</I
1363></TT
1364>&nbsp;:</TD
1365><TD
1366WIDTH="80%"
1367ALIGN="LEFT"
1368VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001369> a SAX handler</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001370></TR
1371><TR
1372><TD
1373WIDTH="20%"
1374ALIGN="RIGHT"
1375VALIGN="TOP"
1376><TT
1377CLASS="PARAMETER"
1378><I
1379>user_data</I
1380></TT
1381>&nbsp;:</TD
1382><TD
1383WIDTH="80%"
1384ALIGN="LEFT"
1385VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001386> The user data returned on SAX callbacks</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001387></TR
1388><TR
1389><TD
1390WIDTH="20%"
1391ALIGN="RIGHT"
1392VALIGN="TOP"
1393><TT
1394CLASS="PARAMETER"
1395><I
1396>chunk</I
1397></TT
1398>&nbsp;:</TD
1399><TD
1400WIDTH="80%"
1401ALIGN="LEFT"
1402VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001403> a pointer to an array of chars</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001404></TR
1405><TR
1406><TD
1407WIDTH="20%"
1408ALIGN="RIGHT"
1409VALIGN="TOP"
1410><TT
1411CLASS="PARAMETER"
1412><I
1413>size</I
1414></TT
1415>&nbsp;:</TD
1416><TD
1417WIDTH="80%"
1418ALIGN="LEFT"
1419VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001420> number of chars in the array</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001421></TR
1422><TR
1423><TD
1424WIDTH="20%"
1425ALIGN="RIGHT"
1426VALIGN="TOP"
1427><TT
1428CLASS="PARAMETER"
1429><I
1430>filename</I
1431></TT
1432>&nbsp;:</TD
1433><TD
1434WIDTH="80%"
1435ALIGN="LEFT"
1436VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001437> an optional file name or URI</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001438></TR
1439><TR
1440><TD
1441WIDTH="20%"
1442ALIGN="RIGHT"
1443VALIGN="TOP"
1444><TT
1445CLASS="PARAMETER"
1446><I
1447>enc</I
1448></TT
1449>&nbsp;:</TD
1450><TD
1451WIDTH="80%"
1452ALIGN="LEFT"
1453VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001454> an optional encoding</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001455></TR
1456><TR
1457><TD
1458WIDTH="20%"
1459ALIGN="RIGHT"
1460VALIGN="TOP"
1461><I
1462CLASS="EMPHASIS"
1463>Returns</I
1464> :</TD
1465><TD
1466WIDTH="80%"
1467ALIGN="LEFT"
1468VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001469>the new parser context or NULL</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001470></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001471></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001472></TABLE
1473><P
1474></P
1475></DIV
1476></DIV
1477><HR><DIV
1478CLASS="REFSECT2"
1479><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001480NAME="AEN17918"
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001481></A
1482><H3
1483><A
1484NAME="DOCBPARSECHUNK"
1485></A
1486>docbParseChunk ()</H3
1487><TABLE
1488BORDER="0"
1489BGCOLOR="#D6E8FF"
1490WIDTH="100%"
1491CELLPADDING="6"
1492><TR
1493><TD
1494><PRE
1495CLASS="PROGRAMLISTING"
1496>int docbParseChunk (<A
1497HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1498>docbParserCtxtPtr</A
1499> ctxt,
1500 const char *chunk,
1501 int size,
1502 int terminate);</PRE
1503></TD
1504></TR
1505></TABLE
1506><P
1507>Parse a Chunk of memory</P
1508><P
1509></P
1510><DIV
1511CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001512><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001513NAME="AEN17925"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001514></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001515><P
1516></P
1517><TABLE
1518BORDER="0"
1519WIDTH="100%"
1520BGCOLOR="#FFD0D0"
1521CELLSPACING="0"
1522CELLPADDING="4"
1523CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001524><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001525><TR
1526><TD
1527WIDTH="20%"
1528ALIGN="RIGHT"
1529VALIGN="TOP"
1530><TT
1531CLASS="PARAMETER"
1532><I
1533>ctxt</I
1534></TT
1535>&nbsp;:</TD
1536><TD
1537WIDTH="80%"
1538ALIGN="LEFT"
1539VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001540> an XML parser context</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001541></TR
1542><TR
1543><TD
1544WIDTH="20%"
1545ALIGN="RIGHT"
1546VALIGN="TOP"
1547><TT
1548CLASS="PARAMETER"
1549><I
1550>chunk</I
1551></TT
1552>&nbsp;:</TD
1553><TD
1554WIDTH="80%"
1555ALIGN="LEFT"
1556VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001557> an char array</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001558></TR
1559><TR
1560><TD
1561WIDTH="20%"
1562ALIGN="RIGHT"
1563VALIGN="TOP"
1564><TT
1565CLASS="PARAMETER"
1566><I
1567>size</I
1568></TT
1569>&nbsp;:</TD
1570><TD
1571WIDTH="80%"
1572ALIGN="LEFT"
1573VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001574> the size in byte of the chunk</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001575></TR
1576><TR
1577><TD
1578WIDTH="20%"
1579ALIGN="RIGHT"
1580VALIGN="TOP"
1581><TT
1582CLASS="PARAMETER"
1583><I
1584>terminate</I
1585></TT
1586>&nbsp;:</TD
1587><TD
1588WIDTH="80%"
1589ALIGN="LEFT"
1590VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001591> last chunk indicator</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001592></TR
1593><TR
1594><TD
1595WIDTH="20%"
1596ALIGN="RIGHT"
1597VALIGN="TOP"
1598><I
1599CLASS="EMPHASIS"
1600>Returns</I
1601> :</TD
1602><TD
1603WIDTH="80%"
1604ALIGN="LEFT"
1605VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001606>zero if no error, the xmlParserErrors otherwise.</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001607></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001608></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001609></TABLE
1610><P
1611></P
1612></DIV
1613></DIV
1614><HR><DIV
1615CLASS="REFSECT2"
1616><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001617NAME="AEN17950"
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001618></A
1619><H3
1620><A
1621NAME="DOCBCREATEFILEPARSERCTXT"
1622></A
1623>docbCreateFileParserCtxt ()</H3
1624><TABLE
1625BORDER="0"
1626BGCOLOR="#D6E8FF"
1627WIDTH="100%"
1628CELLPADDING="6"
1629><TR
1630><TD
1631><PRE
1632CLASS="PROGRAMLISTING"
1633><A
1634HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1635>docbParserCtxtPtr</A
1636> docbCreateFileParserCtxt (const char *filename,
1637 const char *encoding);</PRE
1638></TD
1639></TR
1640></TABLE
1641><P
1642>Create a parser context for a file content.
1643Automatic support for ZLIB/Compress compressed document is provided
1644by default if found at compile-time.</P
1645><P
1646></P
1647><DIV
1648CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001649><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001650NAME="AEN17957"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001651></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001652><P
1653></P
1654><TABLE
1655BORDER="0"
1656WIDTH="100%"
1657BGCOLOR="#FFD0D0"
1658CELLSPACING="0"
1659CELLPADDING="4"
1660CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001661><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001662><TR
1663><TD
1664WIDTH="20%"
1665ALIGN="RIGHT"
1666VALIGN="TOP"
1667><TT
1668CLASS="PARAMETER"
1669><I
1670>filename</I
1671></TT
1672>&nbsp;:</TD
1673><TD
1674WIDTH="80%"
1675ALIGN="LEFT"
1676VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001677> the filename</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001678></TR
1679><TR
1680><TD
1681WIDTH="20%"
1682ALIGN="RIGHT"
1683VALIGN="TOP"
1684><TT
1685CLASS="PARAMETER"
1686><I
1687>encoding</I
1688></TT
1689>&nbsp;:</TD
1690><TD
1691WIDTH="80%"
1692ALIGN="LEFT"
1693VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001694> the SGML document encoding, or NULL</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001695></TR
1696><TR
1697><TD
1698WIDTH="20%"
1699ALIGN="RIGHT"
1700VALIGN="TOP"
1701><I
1702CLASS="EMPHASIS"
1703>Returns</I
1704> :</TD
1705><TD
1706WIDTH="80%"
1707ALIGN="LEFT"
1708VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001709>the new parser context or NULL</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001710></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001711></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001712></TABLE
1713><P
1714></P
1715></DIV
1716></DIV
1717><HR><DIV
1718CLASS="REFSECT2"
1719><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001720NAME="AEN17974"
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001721></A
1722><H3
1723><A
1724NAME="DOCBPARSEDOCUMENT"
1725></A
1726>docbParseDocument ()</H3
1727><TABLE
1728BORDER="0"
1729BGCOLOR="#D6E8FF"
1730WIDTH="100%"
1731CELLPADDING="6"
1732><TR
1733><TD
1734><PRE
1735CLASS="PROGRAMLISTING"
1736>int docbParseDocument (<A
1737HREF="libxml-docbparser.html#DOCBPARSERCTXTPTR"
1738>docbParserCtxtPtr</A
1739> ctxt);</PRE
1740></TD
1741></TR
1742></TABLE
1743><P
1744>parse an SGML document (and build a tree if using the standard SAX
1745interface).</P
1746><P
1747></P
1748><DIV
1749CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001750><A
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001751NAME="AEN17981"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001752></A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001753><P
1754></P
1755><TABLE
1756BORDER="0"
1757WIDTH="100%"
1758BGCOLOR="#FFD0D0"
1759CELLSPACING="0"
1760CELLPADDING="4"
1761CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001762><TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001763><TR
1764><TD
1765WIDTH="20%"
1766ALIGN="RIGHT"
1767VALIGN="TOP"
1768><TT
1769CLASS="PARAMETER"
1770><I
1771>ctxt</I
1772></TT
1773>&nbsp;:</TD
1774><TD
1775WIDTH="80%"
1776ALIGN="LEFT"
1777VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001778> an SGML parser context</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001779></TR
1780><TR
1781><TD
1782WIDTH="20%"
1783ALIGN="RIGHT"
1784VALIGN="TOP"
1785><I
1786CLASS="EMPHASIS"
1787>Returns</I
1788> :</TD
1789><TD
1790WIDTH="80%"
1791ALIGN="LEFT"
1792VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001793>0, -1 in case of error. the parser context is augmented
1794as a result of the parsing.</TD
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001795></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001796></TBODY
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001797></TABLE
1798><P
1799></P
1800></DIV
1801></DIV
1802></DIV
1803><DIV
1804CLASS="NAVFOOTER"
1805><BR
1806CLEAR="all"><BR><TABLE
1807WIDTH="100%"
1808BORDER="0"
1809BGCOLOR="#000000"
1810CELLPADDING="1"
1811CELLSPACING="0"
1812><TR
1813><TD
1814WIDTH="25%"
1815BGCOLOR="#C00000"
1816ALIGN="left"
1817><A
1818HREF="libxml-catalog.html"
1819><FONT
1820COLOR="#FFFFFF"
1821SIZE="3"
1822><B
1823>&#60;&#60;&#60; Previous Page</B
1824></FONT
1825></A
1826></TD
1827><TD
1828WIDTH="25%"
1829BGCOLOR="#0000C0"
1830ALIGN="center"
1831><FONT
1832COLOR="#FFFFFF"
1833SIZE="3"
1834><B
1835><A
1836HREF="book1.html"
1837><FONT
1838COLOR="#FFFFFF"
1839SIZE="3"
1840><B
1841>Home</B
1842></FONT
1843></A
1844></B
1845></FONT
1846></TD
1847><TD
1848WIDTH="25%"
1849BGCOLOR="#00C000"
1850ALIGN="center"
1851><FONT
1852COLOR="#FFFFFF"
1853SIZE="3"
1854><B
1855><A
1856HREF="libxml-lib.html"
1857><FONT
1858COLOR="#FFFFFF"
1859SIZE="3"
1860><B
1861>Up</B
1862></FONT
1863></A
1864></B
1865></FONT
1866></TD
1867><TD
1868WIDTH="25%"
1869BGCOLOR="#C00000"
1870ALIGN="right"
1871><A
1872HREF="libxml-parserinternals.html"
1873><FONT
1874COLOR="#FFFFFF"
1875SIZE="3"
1876><B
1877>Next Page &#62;&#62;&#62;</B
1878></FONT
1879></A
1880></TD
1881></TR
1882><TR
1883><TD
1884COLSPAN="2"
1885ALIGN="left"
1886><FONT
1887COLOR="#FFFFFF"
1888SIZE="3"
1889><B
1890>catalog</B
1891></FONT
1892></TD
1893><TD
1894COLSPAN="2"
1895ALIGN="right"
1896><FONT
1897COLOR="#FFFFFF"
1898SIZE="3"
1899><B
1900>parserInternals</B
1901></FONT
1902></TD
1903></TR
1904></TABLE
1905></DIV
1906></BODY
1907></HTML
1908>