blob: c1873411650ad86b7f9cf30df49f2cb222abf815 [file] [log] [blame]
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001<HTML
2><HEAD
3><TITLE
4>HTMLparser</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +00008REL="HOME"
9TITLE="Gnome XML Library Reference Manual"
10HREF="book1.html"><LINK
11REL="UP"
Daniel Veillard35008381999-10-25 13:15:52 +000012TITLE="Libxml Library Reference"
13HREF="libxml-lib.html"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +000014REL="PREVIOUS"
Daniel Veillard6bd26dc1999-09-03 14:28:40 +000015TITLE="xml-error"
16HREF="gnome-xml-xml-error.html"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +000017REL="NEXT"
18TITLE="HTMLtree"
19HREF="gnome-xml-htmltree.html"></HEAD
20><BODY
21BGCOLOR="#FFFFFF"
22TEXT="#000000"
23><DIV
24CLASS="NAVHEADER"
25><TABLE
26WIDTH="100%"
27BORDER="0"
28BGCOLOR="#000000"
29CELLPADDING="1"
30CELLSPACING="0"
31><TR
32><TH
33COLSPAN="4"
34ALIGN="center"
35><FONT
36COLOR="#FFFFFF"
37SIZE="5"
38>Gnome XML Library Reference Manual</FONT
39></TH
40></TR
41><TR
42><TD
43WIDTH="25%"
44BGCOLOR="#C00000"
45ALIGN="left"
46><A
Daniel Veillard6bd26dc1999-09-03 14:28:40 +000047HREF="gnome-xml-xml-error.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +000048><FONT
49COLOR="#FFFFFF"
50SIZE="3"
51><B
52>&#60;&#60;&#60; Previous Page</B
53></FONT
54></A
55></TD
56><TD
57WIDTH="25%"
58BGCOLOR="#0000C0"
59ALIGN="center"
60><FONT
61COLOR="#FFFFFF"
62SIZE="3"
63><B
64><A
65HREF="book1.html"
66><FONT
67COLOR="#FFFFFF"
68SIZE="3"
69><B
70>Home</B
71></FONT
72></A
73></B
74></FONT
75></TD
76><TD
77WIDTH="25%"
78BGCOLOR="#00C000"
79ALIGN="center"
80><FONT
81COLOR="#FFFFFF"
82SIZE="3"
83><B
84><A
Daniel Veillard35008381999-10-25 13:15:52 +000085HREF="libxml-lib.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +000086><FONT
87COLOR="#FFFFFF"
88SIZE="3"
89><B
90>Up</B
91></FONT
92></A
93></B
94></FONT
95></TD
96><TD
97WIDTH="25%"
98BGCOLOR="#C00000"
99ALIGN="right"
100><A
101HREF="gnome-xml-htmltree.html"
102><FONT
103COLOR="#FFFFFF"
104SIZE="3"
105><B
106>Next Page &#62;&#62;&#62;</B
107></FONT
108></A
109></TD
110></TR
111></TABLE
112></DIV
113><H1
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000114>HTMLparser</H1
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000115><DIV
116CLASS="REFNAMEDIV"
117><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000118NAME="AEN9577"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000119></A
120><H2
121>Name</H2
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000122>HTMLparser &#8212; </DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000123><DIV
124CLASS="REFSYNOPSISDIV"
125><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000126NAME="AEN9580"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000127></A
128><H2
129>Synopsis</H2
130><TABLE
131BORDER="0"
132BGCOLOR="#D6E8FF"
133WIDTH="100%"
134CELLPADDING="6"
135><TR
136><TD
137><PRE
138CLASS="SYNOPSIS"
139>&#13;
140
141typedef <A
142HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXT"
143>htmlParserCtxt</A
144>;
145typedef <A
146HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
147>htmlParserCtxtPtr</A
148>;
149typedef <A
150HREF="gnome-xml-htmlparser.html#HTMLPARSERNODEINFO"
151>htmlParserNodeInfo</A
152>;
153typedef <A
154HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLER"
155>htmlSAXHandler</A
156>;
157typedef <A
158HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
159>htmlSAXHandlerPtr</A
160>;
161typedef <A
162HREF="gnome-xml-htmlparser.html#HTMLPARSERINPUT"
163>htmlParserInput</A
164>;
165typedef <A
166HREF="gnome-xml-htmlparser.html#HTMLPARSERINPUTPTR"
167>htmlParserInputPtr</A
168>;
169typedef <A
170HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
171>htmlDocPtr</A
172>;
173typedef <A
174HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
175>htmlNodePtr</A
176>;
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000177struct <A
178HREF="gnome-xml-htmlparser.html#HTMLELEMDESC"
179>htmlElemDesc</A
180>;
181typedef <A
182HREF="gnome-xml-htmlparser.html#HTMLELEMDESCPTR"
183>htmlElemDescPtr</A
184>;
185struct <A
186HREF="gnome-xml-htmlparser.html#HTMLENTITYDESC"
187>htmlEntityDesc</A
188>;
189typedef <A
190HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
191>htmlEntityDescPtr</A
192>;
193<A
194HREF="gnome-xml-htmlparser.html#HTMLELEMDESCPTR"
195>htmlElemDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000196> <A
197HREF="gnome-xml-htmlparser.html#HTMLTAGLOOKUP"
198>htmlTagLookup</A
199> (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000200HREF="gnome-xml-tree.html#XMLCHAR"
201>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000202> *tag);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000203<A
204HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
205>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000206> <A
207HREF="gnome-xml-htmlparser.html#HTMLENTITYLOOKUP"
208>htmlEntityLookup</A
209> (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000210HREF="gnome-xml-tree.html#XMLCHAR"
211>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000212> *name);
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000213<A
214HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
215>htmlEntityDescPtr</A
216> <A
217HREF="gnome-xml-htmlparser.html#HTMLENTITYVALUELOOKUP"
218>htmlEntityValueLookup</A
219> (int value);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000220int <A
221HREF="gnome-xml-htmlparser.html#HTMLISAUTOCLOSED"
222>htmlIsAutoClosed</A
223> (<A
224HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
225>htmlDocPtr</A
226> doc,
227 <A
228HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
229>htmlNodePtr</A
230> elem);
231int <A
232HREF="gnome-xml-htmlparser.html#HTMLAUTOCLOSETAG"
233>htmlAutoCloseTag</A
234> (<A
235HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
236>htmlDocPtr</A
237> doc,
238 const <A
239HREF="gnome-xml-tree.html#XMLCHAR"
240>xmlChar</A
241> *name,
242 <A
243HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
244>htmlNodePtr</A
245> elem);
246<A
247HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
248>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000249> <A
250HREF="gnome-xml-htmlparser.html#HTMLPARSEENTITYREF"
251>htmlParseEntityRef</A
252> (<A
253HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
254>htmlParserCtxtPtr</A
255> ctxt,
256 <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000257HREF="gnome-xml-tree.html#XMLCHAR"
258>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000259> **str);
260int <A
261HREF="gnome-xml-htmlparser.html#HTMLPARSECHARREF"
262>htmlParseCharRef</A
263> (<A
264HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
265>htmlParserCtxtPtr</A
266> ctxt);
267void <A
268HREF="gnome-xml-htmlparser.html#HTMLPARSEELEMENT"
269>htmlParseElement</A
270> (<A
271HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
272>htmlParserCtxtPtr</A
273> ctxt);
274<A
275HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
276>htmlDocPtr</A
277> <A
278HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEDOC"
279>htmlSAXParseDoc</A
280> (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000281HREF="gnome-xml-tree.html#XMLCHAR"
282>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000283> *cur,
284 const char *encoding,
285 <A
286HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
287>htmlSAXHandlerPtr</A
288> sax,
289 void *userData);
290<A
291HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
292>htmlDocPtr</A
293> <A
294HREF="gnome-xml-htmlparser.html#HTMLPARSEDOC"
295>htmlParseDoc</A
296> (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000297HREF="gnome-xml-tree.html#XMLCHAR"
298>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000299> *cur,
300 const char *encoding);
301<A
302HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
303>htmlDocPtr</A
304> <A
305HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEFILE"
306>htmlSAXParseFile</A
307> (const char *filename,
308 const char *encoding,
309 <A
310HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
311>htmlSAXHandlerPtr</A
312> sax,
313 void *userData);
314<A
315HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
316>htmlDocPtr</A
317> <A
318HREF="gnome-xml-htmlparser.html#HTMLPARSEFILE"
319>htmlParseFile</A
320> (const char *filename,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000321 const char *encoding);
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000322int <A
323HREF="gnome-xml-htmlparser.html#UTF8TOHTML"
324>UTF8ToHtml</A
325> (unsigned char *out,
326 int *outlen,
327 unsigned char *in,
328 int *inlen);
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000329int <A
330HREF="gnome-xml-htmlparser.html#HTMLENCODEENTITIES"
331>htmlEncodeEntities</A
332> (unsigned char *out,
333 int *outlen,
334 unsigned char *in,
335 int *inlen,
336 int quoteChar);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000337void <A
338HREF="gnome-xml-htmlparser.html#HTMLFREEPARSERCTXT"
339>htmlFreeParserCtxt</A
340> (<A
341HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
342>htmlParserCtxtPtr</A
343> ctxt);
344<A
345HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
346>htmlParserCtxtPtr</A
347> <A
348HREF="gnome-xml-htmlparser.html#HTMLCREATEPUSHPARSERCTXT"
349>htmlCreatePushParserCtxt</A
350> (<A
351HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
352>htmlSAXHandlerPtr</A
353> sax,
354 void *user_data,
355 const char *chunk,
356 int size,
357 const char *filename,
358 <A
359HREF="gnome-xml-encoding.html#XMLCHARENCODING"
360>xmlCharEncoding</A
361> enc);
362int <A
363HREF="gnome-xml-htmlparser.html#HTMLPARSECHUNK"
364>htmlParseChunk</A
365> (<A
366HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
367>htmlParserCtxtPtr</A
368> ctxt,
369 const char *chunk,
370 int size,
371 int terminate);</PRE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000372></TD
373></TR
374></TABLE
375></DIV
376><DIV
377CLASS="REFSECT1"
378><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000379NAME="AEN9641"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000380></A
381><H2
382>Description</H2
383><P
384></P
385></DIV
386><DIV
387CLASS="REFSECT1"
388><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000389NAME="AEN9644"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000390></A
391><H2
392>Details</H2
393><DIV
394CLASS="REFSECT2"
395><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000396NAME="AEN9646"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000397></A
398><H3
399><A
400NAME="HTMLPARSERCTXT"
401></A
402>htmlParserCtxt</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000403><TABLE
404BORDER="0"
405BGCOLOR="#D6E8FF"
406WIDTH="100%"
407CELLPADDING="6"
408><TR
409><TD
410><PRE
411CLASS="PROGRAMLISTING"
412>typedef xmlParserCtxt htmlParserCtxt;</PRE
413></TD
414></TR
415></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000416><P
417></P
418></DIV
419><HR><DIV
420CLASS="REFSECT2"
421><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000422NAME="AEN9651"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000423></A
424><H3
425><A
426NAME="HTMLPARSERCTXTPTR"
427></A
428>htmlParserCtxtPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000429><TABLE
430BORDER="0"
431BGCOLOR="#D6E8FF"
432WIDTH="100%"
433CELLPADDING="6"
434><TR
435><TD
436><PRE
437CLASS="PROGRAMLISTING"
438>typedef xmlParserCtxtPtr htmlParserCtxtPtr;</PRE
439></TD
440></TR
441></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000442><P
443></P
444></DIV
445><HR><DIV
446CLASS="REFSECT2"
447><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000448NAME="AEN9656"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000449></A
450><H3
451><A
452NAME="HTMLPARSERNODEINFO"
453></A
454>htmlParserNodeInfo</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000455><TABLE
456BORDER="0"
457BGCOLOR="#D6E8FF"
458WIDTH="100%"
459CELLPADDING="6"
460><TR
461><TD
462><PRE
463CLASS="PROGRAMLISTING"
464>typedef xmlParserNodeInfo htmlParserNodeInfo;</PRE
465></TD
466></TR
467></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000468><P
469></P
470></DIV
471><HR><DIV
472CLASS="REFSECT2"
473><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000474NAME="AEN9661"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000475></A
476><H3
477><A
478NAME="HTMLSAXHANDLER"
479></A
480>htmlSAXHandler</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000481><TABLE
482BORDER="0"
483BGCOLOR="#D6E8FF"
484WIDTH="100%"
485CELLPADDING="6"
486><TR
487><TD
488><PRE
489CLASS="PROGRAMLISTING"
490>typedef xmlSAXHandler htmlSAXHandler;</PRE
491></TD
492></TR
493></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000494><P
495></P
496></DIV
497><HR><DIV
498CLASS="REFSECT2"
499><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000500NAME="AEN9666"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000501></A
502><H3
503><A
504NAME="HTMLSAXHANDLERPTR"
505></A
506>htmlSAXHandlerPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000507><TABLE
508BORDER="0"
509BGCOLOR="#D6E8FF"
510WIDTH="100%"
511CELLPADDING="6"
512><TR
513><TD
514><PRE
515CLASS="PROGRAMLISTING"
516>typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;</PRE
517></TD
518></TR
519></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000520><P
521></P
522></DIV
523><HR><DIV
524CLASS="REFSECT2"
525><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000526NAME="AEN9671"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000527></A
528><H3
529><A
530NAME="HTMLPARSERINPUT"
531></A
532>htmlParserInput</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000533><TABLE
534BORDER="0"
535BGCOLOR="#D6E8FF"
536WIDTH="100%"
537CELLPADDING="6"
538><TR
539><TD
540><PRE
541CLASS="PROGRAMLISTING"
542>typedef xmlParserInput htmlParserInput;</PRE
543></TD
544></TR
545></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000546><P
547></P
548></DIV
549><HR><DIV
550CLASS="REFSECT2"
551><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000552NAME="AEN9676"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000553></A
554><H3
555><A
556NAME="HTMLPARSERINPUTPTR"
557></A
558>htmlParserInputPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000559><TABLE
560BORDER="0"
561BGCOLOR="#D6E8FF"
562WIDTH="100%"
563CELLPADDING="6"
564><TR
565><TD
566><PRE
567CLASS="PROGRAMLISTING"
568>typedef xmlParserInputPtr htmlParserInputPtr;</PRE
569></TD
570></TR
571></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000572><P
573></P
574></DIV
575><HR><DIV
576CLASS="REFSECT2"
577><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000578NAME="AEN9681"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000579></A
580><H3
581><A
582NAME="HTMLDOCPTR"
583></A
584>htmlDocPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000585><TABLE
586BORDER="0"
587BGCOLOR="#D6E8FF"
588WIDTH="100%"
589CELLPADDING="6"
590><TR
591><TD
592><PRE
593CLASS="PROGRAMLISTING"
594>typedef xmlDocPtr htmlDocPtr;</PRE
595></TD
596></TR
597></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000598><P
599></P
600></DIV
601><HR><DIV
602CLASS="REFSECT2"
603><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000604NAME="AEN9686"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000605></A
606><H3
607><A
608NAME="HTMLNODEPTR"
609></A
610>htmlNodePtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000611><TABLE
612BORDER="0"
613BGCOLOR="#D6E8FF"
614WIDTH="100%"
615CELLPADDING="6"
616><TR
617><TD
618><PRE
619CLASS="PROGRAMLISTING"
620>typedef xmlNodePtr htmlNodePtr;</PRE
621></TD
622></TR
623></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000624><P
625></P
626></DIV
627><HR><DIV
628CLASS="REFSECT2"
629><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000630NAME="AEN9691"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000631></A
632><H3
633><A
634NAME="HTMLELEMDESC"
635></A
636>struct htmlElemDesc</H3
637><TABLE
638BORDER="0"
639BGCOLOR="#D6E8FF"
640WIDTH="100%"
641CELLPADDING="6"
642><TR
643><TD
644><PRE
645CLASS="PROGRAMLISTING"
646>struct htmlElemDesc {
647 const char *name; /* The tag name */
648 int startTag; /* Whether the start tag can be implied */
649 int endTag; /* Whether the end tag can be implied */
650 int empty; /* Is this an empty element ? */
651 int depr; /* Is this a deprecated element ? */
652 int dtd; /* 1: only in Loose DTD, 2: only Frameset one */
653 const char *desc; /* the description */
654};</PRE
655></TD
656></TR
657></TABLE
658><P
659></P
660></DIV
661><HR><DIV
662CLASS="REFSECT2"
663><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000664NAME="AEN9696"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000665></A
666><H3
667><A
668NAME="HTMLELEMDESCPTR"
669></A
670>htmlElemDescPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000671><TABLE
672BORDER="0"
673BGCOLOR="#D6E8FF"
674WIDTH="100%"
675CELLPADDING="6"
676><TR
677><TD
678><PRE
679CLASS="PROGRAMLISTING"
680>typedef htmlElemDesc *htmlElemDescPtr;</PRE
681></TD
682></TR
683></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000684><P
685></P
686></DIV
687><HR><DIV
688CLASS="REFSECT2"
689><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000690NAME="AEN9701"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000691></A
692><H3
693><A
694NAME="HTMLENTITYDESC"
695></A
696>struct htmlEntityDesc</H3
697><TABLE
698BORDER="0"
699BGCOLOR="#D6E8FF"
700WIDTH="100%"
701CELLPADDING="6"
702><TR
703><TD
704><PRE
705CLASS="PROGRAMLISTING"
706>struct htmlEntityDesc {
707 int value; /* the UNICODE value for the character */
708 const char *name; /* The entity name */
709 const char *desc; /* the description */
710};</PRE
711></TD
712></TR
713></TABLE
714><P
715></P
716></DIV
717><HR><DIV
718CLASS="REFSECT2"
719><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000720NAME="AEN9706"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000721></A
722><H3
723><A
724NAME="HTMLENTITYDESCPTR"
725></A
726>htmlEntityDescPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000727><TABLE
728BORDER="0"
729BGCOLOR="#D6E8FF"
730WIDTH="100%"
731CELLPADDING="6"
732><TR
733><TD
734><PRE
735CLASS="PROGRAMLISTING"
736>typedef htmlEntityDesc *htmlEntityDescPtr;</PRE
737></TD
738></TR
739></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000740><P
741></P
742></DIV
743><HR><DIV
744CLASS="REFSECT2"
745><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000746NAME="AEN9711"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000747></A
748><H3
749><A
750NAME="HTMLTAGLOOKUP"
751></A
752>htmlTagLookup ()</H3
753><TABLE
754BORDER="0"
755BGCOLOR="#D6E8FF"
756WIDTH="100%"
757CELLPADDING="6"
758><TR
759><TD
760><PRE
761CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000762><A
763HREF="gnome-xml-htmlparser.html#HTMLELEMDESCPTR"
764>htmlElemDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000765> htmlTagLookup (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000766HREF="gnome-xml-tree.html#XMLCHAR"
767>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000768> *tag);</PRE
769></TD
770></TR
771></TABLE
772><P
773>Lookup the HTML tag in the ElementTable</P
774><P
775></P
776><DIV
777CLASS="INFORMALTABLE"
778><P
779></P
780><TABLE
781BORDER="0"
782WIDTH="100%"
783BGCOLOR="#FFD0D0"
784CELLSPACING="0"
785CELLPADDING="4"
786CLASS="CALSTABLE"
787><TR
788><TD
789WIDTH="20%"
790ALIGN="RIGHT"
791VALIGN="TOP"
792><TT
793CLASS="PARAMETER"
794><I
795>tag</I
796></TT
797>&nbsp;:</TD
798><TD
799WIDTH="80%"
800ALIGN="LEFT"
801VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000802> The tag name in lowercase</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000803></TR
804><TR
805><TD
806WIDTH="20%"
807ALIGN="RIGHT"
808VALIGN="TOP"
809><I
810CLASS="EMPHASIS"
811>Returns</I
812> :</TD
813><TD
814WIDTH="80%"
815ALIGN="LEFT"
816VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000817>the related htmlElemDescPtr or NULL if not found.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000818></TR
819></TABLE
820><P
821></P
822></DIV
823></DIV
824><HR><DIV
825CLASS="REFSECT2"
826><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000827NAME="AEN9732"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000828></A
829><H3
830><A
831NAME="HTMLENTITYLOOKUP"
832></A
833>htmlEntityLookup ()</H3
834><TABLE
835BORDER="0"
836BGCOLOR="#D6E8FF"
837WIDTH="100%"
838CELLPADDING="6"
839><TR
840><TD
841><PRE
842CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000843><A
844HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
845>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000846> htmlEntityLookup (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000847HREF="gnome-xml-tree.html#XMLCHAR"
848>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000849> *name);</PRE
850></TD
851></TR
852></TABLE
853><P
854>Lookup the given entity in EntitiesTable</P
855><P
856>TODO: the linear scan is really ugly, an hash table is really needed.</P
857><P
858></P
859><DIV
860CLASS="INFORMALTABLE"
861><P
862></P
863><TABLE
864BORDER="0"
865WIDTH="100%"
866BGCOLOR="#FFD0D0"
867CELLSPACING="0"
868CELLPADDING="4"
869CLASS="CALSTABLE"
870><TR
871><TD
872WIDTH="20%"
873ALIGN="RIGHT"
874VALIGN="TOP"
875><TT
876CLASS="PARAMETER"
877><I
878>name</I
879></TT
880>&nbsp;:</TD
881><TD
882WIDTH="80%"
883ALIGN="LEFT"
884VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000885> the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000886></TR
887><TR
888><TD
889WIDTH="20%"
890ALIGN="RIGHT"
891VALIGN="TOP"
892><I
893CLASS="EMPHASIS"
894>Returns</I
895> :</TD
896><TD
897WIDTH="80%"
898ALIGN="LEFT"
899VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000900>the associated htmlEntityDescPtr if found, NULL otherwise.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000901></TR
902></TABLE
903><P
904></P
905></DIV
906></DIV
907><HR><DIV
908CLASS="REFSECT2"
909><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000910NAME="AEN9754"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000911></A
912><H3
913><A
914NAME="HTMLENTITYVALUELOOKUP"
915></A
916>htmlEntityValueLookup ()</H3
917><TABLE
918BORDER="0"
919BGCOLOR="#D6E8FF"
920WIDTH="100%"
921CELLPADDING="6"
922><TR
923><TD
924><PRE
925CLASS="PROGRAMLISTING"
926><A
927HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
928>htmlEntityDescPtr</A
929> htmlEntityValueLookup (int value);</PRE
930></TD
931></TR
932></TABLE
933><P
934>Lookup the given entity in EntitiesTable</P
935><P
936>TODO: the linear scan is really ugly, an hash table is really needed.</P
937><P
938></P
939><DIV
940CLASS="INFORMALTABLE"
941><P
942></P
943><TABLE
944BORDER="0"
945WIDTH="100%"
946BGCOLOR="#FFD0D0"
947CELLSPACING="0"
948CELLPADDING="4"
949CLASS="CALSTABLE"
950><TR
951><TD
952WIDTH="20%"
953ALIGN="RIGHT"
954VALIGN="TOP"
955><TT
956CLASS="PARAMETER"
957><I
958>value</I
959></TT
960>&nbsp;:</TD
961><TD
962WIDTH="80%"
963ALIGN="LEFT"
964VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000965> the entity's unicode value</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000966></TR
967><TR
968><TD
969WIDTH="20%"
970ALIGN="RIGHT"
971VALIGN="TOP"
972><I
973CLASS="EMPHASIS"
974>Returns</I
975> :</TD
976><TD
977WIDTH="80%"
978ALIGN="LEFT"
979VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000980>the associated htmlEntityDescPtr if found, NULL otherwise.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000981></TR
982></TABLE
983><P
984></P
985></DIV
986></DIV
987><HR><DIV
988CLASS="REFSECT2"
989><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000990NAME="AEN9775"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000991></A
992><H3
993><A
994NAME="HTMLISAUTOCLOSED"
995></A
996>htmlIsAutoClosed ()</H3
997><TABLE
998BORDER="0"
999BGCOLOR="#D6E8FF"
1000WIDTH="100%"
1001CELLPADDING="6"
1002><TR
1003><TD
1004><PRE
1005CLASS="PROGRAMLISTING"
1006>int htmlIsAutoClosed (<A
1007HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1008>htmlDocPtr</A
1009> doc,
1010 <A
1011HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
1012>htmlNodePtr</A
1013> elem);</PRE
1014></TD
1015></TR
1016></TABLE
1017><P
1018>The HTmL DtD allows a tag to implicitely close other tags.
1019The list is kept in htmlStartClose array. This function checks
1020if a tag is autoclosed by one of it's child</P
1021><P
1022></P
1023><DIV
1024CLASS="INFORMALTABLE"
1025><P
1026></P
1027><TABLE
1028BORDER="0"
1029WIDTH="100%"
1030BGCOLOR="#FFD0D0"
1031CELLSPACING="0"
1032CELLPADDING="4"
1033CLASS="CALSTABLE"
1034><TR
1035><TD
1036WIDTH="20%"
1037ALIGN="RIGHT"
1038VALIGN="TOP"
1039><TT
1040CLASS="PARAMETER"
1041><I
1042>doc</I
1043></TT
1044>&nbsp;:</TD
1045><TD
1046WIDTH="80%"
1047ALIGN="LEFT"
1048VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001049> the HTML document</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001050></TR
1051><TR
1052><TD
1053WIDTH="20%"
1054ALIGN="RIGHT"
1055VALIGN="TOP"
1056><TT
1057CLASS="PARAMETER"
1058><I
1059>elem</I
1060></TT
1061>&nbsp;:</TD
1062><TD
1063WIDTH="80%"
1064ALIGN="LEFT"
1065VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001066> the HTML element</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001067></TR
1068><TR
1069><TD
1070WIDTH="20%"
1071ALIGN="RIGHT"
1072VALIGN="TOP"
1073><I
1074CLASS="EMPHASIS"
1075>Returns</I
1076> :</TD
1077><TD
1078WIDTH="80%"
1079ALIGN="LEFT"
1080VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001081>1 if autoclosed, 0 otherwise</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001082></TR
1083></TABLE
1084><P
1085></P
1086></DIV
1087></DIV
1088><HR><DIV
1089CLASS="REFSECT2"
1090><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001091NAME="AEN9800"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001092></A
1093><H3
1094><A
1095NAME="HTMLAUTOCLOSETAG"
1096></A
1097>htmlAutoCloseTag ()</H3
1098><TABLE
1099BORDER="0"
1100BGCOLOR="#D6E8FF"
1101WIDTH="100%"
1102CELLPADDING="6"
1103><TR
1104><TD
1105><PRE
1106CLASS="PROGRAMLISTING"
1107>int htmlAutoCloseTag (<A
1108HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1109>htmlDocPtr</A
1110> doc,
1111 const <A
1112HREF="gnome-xml-tree.html#XMLCHAR"
1113>xmlChar</A
1114> *name,
1115 <A
1116HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
1117>htmlNodePtr</A
1118> elem);</PRE
1119></TD
1120></TR
1121></TABLE
1122><P
1123>The HTmL DtD allows a tag to implicitely close other tags.
1124The list is kept in htmlStartClose array. This function checks
1125if the element or one of it's children would autoclose the
1126given tag.</P
1127><P
1128></P
1129><DIV
1130CLASS="INFORMALTABLE"
1131><P
1132></P
1133><TABLE
1134BORDER="0"
1135WIDTH="100%"
1136BGCOLOR="#FFD0D0"
1137CELLSPACING="0"
1138CELLPADDING="4"
1139CLASS="CALSTABLE"
1140><TR
1141><TD
1142WIDTH="20%"
1143ALIGN="RIGHT"
1144VALIGN="TOP"
1145><TT
1146CLASS="PARAMETER"
1147><I
1148>doc</I
1149></TT
1150>&nbsp;:</TD
1151><TD
1152WIDTH="80%"
1153ALIGN="LEFT"
1154VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001155> the HTML document</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001156></TR
1157><TR
1158><TD
1159WIDTH="20%"
1160ALIGN="RIGHT"
1161VALIGN="TOP"
1162><TT
1163CLASS="PARAMETER"
1164><I
1165>name</I
1166></TT
1167>&nbsp;:</TD
1168><TD
1169WIDTH="80%"
1170ALIGN="LEFT"
1171VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001172> The tag name</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001173></TR
1174><TR
1175><TD
1176WIDTH="20%"
1177ALIGN="RIGHT"
1178VALIGN="TOP"
1179><TT
1180CLASS="PARAMETER"
1181><I
1182>elem</I
1183></TT
1184>&nbsp;:</TD
1185><TD
1186WIDTH="80%"
1187ALIGN="LEFT"
1188VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001189> the HTML element</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001190></TR
1191><TR
1192><TD
1193WIDTH="20%"
1194ALIGN="RIGHT"
1195VALIGN="TOP"
1196><I
1197CLASS="EMPHASIS"
1198>Returns</I
1199> :</TD
1200><TD
1201WIDTH="80%"
1202ALIGN="LEFT"
1203VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001204>1 if autoclose, 0 otherwise</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001205></TR
1206></TABLE
1207><P
1208></P
1209></DIV
1210></DIV
1211><HR><DIV
1212CLASS="REFSECT2"
1213><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001214NAME="AEN9830"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001215></A
1216><H3
1217><A
1218NAME="HTMLPARSEENTITYREF"
1219></A
1220>htmlParseEntityRef ()</H3
1221><TABLE
1222BORDER="0"
1223BGCOLOR="#D6E8FF"
1224WIDTH="100%"
1225CELLPADDING="6"
1226><TR
1227><TD
1228><PRE
1229CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001230><A
1231HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
1232>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001233> htmlParseEntityRef (<A
1234HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1235>htmlParserCtxtPtr</A
1236> ctxt,
1237 <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001238HREF="gnome-xml-tree.html#XMLCHAR"
1239>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001240> **str);</PRE
1241></TD
1242></TR
1243></TABLE
1244><P
1245>parse an HTML ENTITY references</P
1246><P
1247>[68] EntityRef ::= '&amp;' Name ';'</P
1248><P
1249></P
1250><DIV
1251CLASS="INFORMALTABLE"
1252><P
1253></P
1254><TABLE
1255BORDER="0"
1256WIDTH="100%"
1257BGCOLOR="#FFD0D0"
1258CELLSPACING="0"
1259CELLPADDING="4"
1260CLASS="CALSTABLE"
1261><TR
1262><TD
1263WIDTH="20%"
1264ALIGN="RIGHT"
1265VALIGN="TOP"
1266><TT
1267CLASS="PARAMETER"
1268><I
1269>ctxt</I
1270></TT
1271>&nbsp;:</TD
1272><TD
1273WIDTH="80%"
1274ALIGN="LEFT"
1275VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001276> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001277></TR
1278><TR
1279><TD
1280WIDTH="20%"
1281ALIGN="RIGHT"
1282VALIGN="TOP"
1283><TT
1284CLASS="PARAMETER"
1285><I
1286>str</I
1287></TT
1288>&nbsp;:</TD
1289><TD
1290WIDTH="80%"
1291ALIGN="LEFT"
1292VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001293> location to store the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001294></TR
1295><TR
1296><TD
1297WIDTH="20%"
1298ALIGN="RIGHT"
1299VALIGN="TOP"
1300><I
1301CLASS="EMPHASIS"
1302>Returns</I
1303> :</TD
1304><TD
1305WIDTH="80%"
1306ALIGN="LEFT"
1307VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001308>the associated htmlEntityDescPtr if found, or NULL otherwise,
1309if non-NULL *str will have to be freed by the caller.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001310></TR
1311></TABLE
1312><P
1313></P
1314></DIV
1315></DIV
1316><HR><DIV
1317CLASS="REFSECT2"
1318><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001319NAME="AEN9857"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001320></A
1321><H3
1322><A
1323NAME="HTMLPARSECHARREF"
1324></A
1325>htmlParseCharRef ()</H3
1326><TABLE
1327BORDER="0"
1328BGCOLOR="#D6E8FF"
1329WIDTH="100%"
1330CELLPADDING="6"
1331><TR
1332><TD
1333><PRE
1334CLASS="PROGRAMLISTING"
1335>int htmlParseCharRef (<A
1336HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1337>htmlParserCtxtPtr</A
1338> ctxt);</PRE
1339></TD
1340></TR
1341></TABLE
1342><P
1343>parse Reference declarations</P
1344><P
1345>[66] CharRef ::= '&amp;#' [0-9]+ ';' |
1346'&amp;<GTKDOCLINK
1347HREF="X"
1348>x</GTKDOCLINK
1349>' [0-9a-fA-F]+ ';'</P
1350><P
1351></P
1352><DIV
1353CLASS="INFORMALTABLE"
1354><P
1355></P
1356><TABLE
1357BORDER="0"
1358WIDTH="100%"
1359BGCOLOR="#FFD0D0"
1360CELLSPACING="0"
1361CELLPADDING="4"
1362CLASS="CALSTABLE"
1363><TR
1364><TD
1365WIDTH="20%"
1366ALIGN="RIGHT"
1367VALIGN="TOP"
1368><TT
1369CLASS="PARAMETER"
1370><I
1371>ctxt</I
1372></TT
1373>&nbsp;:</TD
1374><TD
1375WIDTH="80%"
1376ALIGN="LEFT"
1377VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001378> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001379></TR
1380><TR
1381><TD
1382WIDTH="20%"
1383ALIGN="RIGHT"
1384VALIGN="TOP"
1385><I
1386CLASS="EMPHASIS"
1387>Returns</I
1388> :</TD
1389><TD
1390WIDTH="80%"
1391ALIGN="LEFT"
1392VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001393>the value parsed (as an int)</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001394></TR
1395></TABLE
1396><P
1397></P
1398></DIV
1399></DIV
1400><HR><DIV
1401CLASS="REFSECT2"
1402><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001403NAME="AEN9879"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001404></A
1405><H3
1406><A
1407NAME="HTMLPARSEELEMENT"
1408></A
1409>htmlParseElement ()</H3
1410><TABLE
1411BORDER="0"
1412BGCOLOR="#D6E8FF"
1413WIDTH="100%"
1414CELLPADDING="6"
1415><TR
1416><TD
1417><PRE
1418CLASS="PROGRAMLISTING"
1419>void htmlParseElement (<A
1420HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1421>htmlParserCtxtPtr</A
1422> ctxt);</PRE
1423></TD
1424></TR
1425></TABLE
1426><P
1427>parse an HTML element, this is highly recursive</P
1428><P
1429>[39] element ::= EmptyElemTag | STag content ETag</P
1430><P
1431>[41] Attribute ::= Name Eq AttValue</P
1432><P
1433></P
1434><DIV
1435CLASS="INFORMALTABLE"
1436><P
1437></P
1438><TABLE
1439BORDER="0"
1440WIDTH="100%"
1441BGCOLOR="#FFD0D0"
1442CELLSPACING="0"
1443CELLPADDING="4"
1444CLASS="CALSTABLE"
1445><TR
1446><TD
1447WIDTH="20%"
1448ALIGN="RIGHT"
1449VALIGN="TOP"
1450><TT
1451CLASS="PARAMETER"
1452><I
1453>ctxt</I
1454></TT
1455>&nbsp;:</TD
1456><TD
1457WIDTH="80%"
1458ALIGN="LEFT"
1459VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001460> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001461></TR
1462></TABLE
1463><P
1464></P
1465></DIV
1466></DIV
1467><HR><DIV
1468CLASS="REFSECT2"
1469><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001470NAME="AEN9897"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001471></A
1472><H3
1473><A
1474NAME="HTMLSAXPARSEDOC"
1475></A
1476>htmlSAXParseDoc ()</H3
1477><TABLE
1478BORDER="0"
1479BGCOLOR="#D6E8FF"
1480WIDTH="100%"
1481CELLPADDING="6"
1482><TR
1483><TD
1484><PRE
1485CLASS="PROGRAMLISTING"
1486><A
1487HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1488>htmlDocPtr</A
1489> htmlSAXParseDoc (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001490HREF="gnome-xml-tree.html#XMLCHAR"
1491>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001492> *cur,
1493 const char *encoding,
1494 <A
1495HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1496>htmlSAXHandlerPtr</A
1497> sax,
1498 void *userData);</PRE
1499></TD
1500></TR
1501></TABLE
1502><P
1503>parse an HTML in-memory document and build a tree.
1504It use the given SAX function block to handle the parsing callback.
1505If sax is NULL, fallback to the default DOM tree building routines.</P
1506><P
1507></P
1508><DIV
1509CLASS="INFORMALTABLE"
1510><P
1511></P
1512><TABLE
1513BORDER="0"
1514WIDTH="100%"
1515BGCOLOR="#FFD0D0"
1516CELLSPACING="0"
1517CELLPADDING="4"
1518CLASS="CALSTABLE"
1519><TR
1520><TD
1521WIDTH="20%"
1522ALIGN="RIGHT"
1523VALIGN="TOP"
1524><TT
1525CLASS="PARAMETER"
1526><I
1527>cur</I
1528></TT
1529>&nbsp;:</TD
1530><TD
1531WIDTH="80%"
1532ALIGN="LEFT"
1533VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001534> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001535></TR
1536><TR
1537><TD
1538WIDTH="20%"
1539ALIGN="RIGHT"
1540VALIGN="TOP"
1541><TT
1542CLASS="PARAMETER"
1543><I
1544>encoding</I
1545></TT
1546>&nbsp;:</TD
1547><TD
1548WIDTH="80%"
1549ALIGN="LEFT"
1550VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001551> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001552></TR
1553><TR
1554><TD
1555WIDTH="20%"
1556ALIGN="RIGHT"
1557VALIGN="TOP"
1558><TT
1559CLASS="PARAMETER"
1560><I
1561>sax</I
1562></TT
1563>&nbsp;:</TD
1564><TD
1565WIDTH="80%"
1566ALIGN="LEFT"
1567VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001568> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001569></TR
1570><TR
1571><TD
1572WIDTH="20%"
1573ALIGN="RIGHT"
1574VALIGN="TOP"
1575><TT
1576CLASS="PARAMETER"
1577><I
1578>userData</I
1579></TT
1580>&nbsp;:</TD
1581><TD
1582WIDTH="80%"
1583ALIGN="LEFT"
1584VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001585> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001586></TR
1587><TR
1588><TD
1589WIDTH="20%"
1590ALIGN="RIGHT"
1591VALIGN="TOP"
1592><I
1593CLASS="EMPHASIS"
1594>Returns</I
1595> :</TD
1596><TD
1597WIDTH="80%"
1598ALIGN="LEFT"
1599VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001600>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001601></TR
1602></TABLE
1603><P
1604></P
1605></DIV
1606></DIV
1607><HR><DIV
1608CLASS="REFSECT2"
1609><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001610NAME="AEN9931"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001611></A
1612><H3
1613><A
1614NAME="HTMLPARSEDOC"
1615></A
1616>htmlParseDoc ()</H3
1617><TABLE
1618BORDER="0"
1619BGCOLOR="#D6E8FF"
1620WIDTH="100%"
1621CELLPADDING="6"
1622><TR
1623><TD
1624><PRE
1625CLASS="PROGRAMLISTING"
1626><A
1627HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1628>htmlDocPtr</A
1629> htmlParseDoc (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001630HREF="gnome-xml-tree.html#XMLCHAR"
1631>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001632> *cur,
1633 const char *encoding);</PRE
1634></TD
1635></TR
1636></TABLE
1637><P
1638>parse an HTML in-memory document and build a tree.</P
1639><P
1640></P
1641><DIV
1642CLASS="INFORMALTABLE"
1643><P
1644></P
1645><TABLE
1646BORDER="0"
1647WIDTH="100%"
1648BGCOLOR="#FFD0D0"
1649CELLSPACING="0"
1650CELLPADDING="4"
1651CLASS="CALSTABLE"
1652><TR
1653><TD
1654WIDTH="20%"
1655ALIGN="RIGHT"
1656VALIGN="TOP"
1657><TT
1658CLASS="PARAMETER"
1659><I
1660>cur</I
1661></TT
1662>&nbsp;:</TD
1663><TD
1664WIDTH="80%"
1665ALIGN="LEFT"
1666VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001667> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001668></TR
1669><TR
1670><TD
1671WIDTH="20%"
1672ALIGN="RIGHT"
1673VALIGN="TOP"
1674><TT
1675CLASS="PARAMETER"
1676><I
1677>encoding</I
1678></TT
1679>&nbsp;:</TD
1680><TD
1681WIDTH="80%"
1682ALIGN="LEFT"
1683VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001684> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001685></TR
1686><TR
1687><TD
1688WIDTH="20%"
1689ALIGN="RIGHT"
1690VALIGN="TOP"
1691><I
1692CLASS="EMPHASIS"
1693>Returns</I
1694> :</TD
1695><TD
1696WIDTH="80%"
1697ALIGN="LEFT"
1698VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001699>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001700></TR
1701></TABLE
1702><P
1703></P
1704></DIV
1705></DIV
1706><HR><DIV
1707CLASS="REFSECT2"
1708><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001709NAME="AEN9956"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001710></A
1711><H3
1712><A
1713NAME="HTMLSAXPARSEFILE"
1714></A
1715>htmlSAXParseFile ()</H3
1716><TABLE
1717BORDER="0"
1718BGCOLOR="#D6E8FF"
1719WIDTH="100%"
1720CELLPADDING="6"
1721><TR
1722><TD
1723><PRE
1724CLASS="PROGRAMLISTING"
1725><A
1726HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1727>htmlDocPtr</A
1728> htmlSAXParseFile (const char *filename,
1729 const char *encoding,
1730 <A
1731HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1732>htmlSAXHandlerPtr</A
1733> sax,
1734 void *userData);</PRE
1735></TD
1736></TR
1737></TABLE
1738><P
1739>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1740compressed document is provided by default if found at compile-time.
1741It use the given SAX function block to handle the parsing callback.
1742If sax is NULL, fallback to the default DOM tree building routines.</P
1743><P
1744></P
1745><DIV
1746CLASS="INFORMALTABLE"
1747><P
1748></P
1749><TABLE
1750BORDER="0"
1751WIDTH="100%"
1752BGCOLOR="#FFD0D0"
1753CELLSPACING="0"
1754CELLPADDING="4"
1755CLASS="CALSTABLE"
1756><TR
1757><TD
1758WIDTH="20%"
1759ALIGN="RIGHT"
1760VALIGN="TOP"
1761><TT
1762CLASS="PARAMETER"
1763><I
1764>filename</I
1765></TT
1766>&nbsp;:</TD
1767><TD
1768WIDTH="80%"
1769ALIGN="LEFT"
1770VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001771> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001772></TR
1773><TR
1774><TD
1775WIDTH="20%"
1776ALIGN="RIGHT"
1777VALIGN="TOP"
1778><TT
1779CLASS="PARAMETER"
1780><I
1781>encoding</I
1782></TT
1783>&nbsp;:</TD
1784><TD
1785WIDTH="80%"
1786ALIGN="LEFT"
1787VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001788> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001789></TR
1790><TR
1791><TD
1792WIDTH="20%"
1793ALIGN="RIGHT"
1794VALIGN="TOP"
1795><TT
1796CLASS="PARAMETER"
1797><I
1798>sax</I
1799></TT
1800>&nbsp;:</TD
1801><TD
1802WIDTH="80%"
1803ALIGN="LEFT"
1804VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001805> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001806></TR
1807><TR
1808><TD
1809WIDTH="20%"
1810ALIGN="RIGHT"
1811VALIGN="TOP"
1812><TT
1813CLASS="PARAMETER"
1814><I
1815>userData</I
1816></TT
1817>&nbsp;:</TD
1818><TD
1819WIDTH="80%"
1820ALIGN="LEFT"
1821VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001822> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001823></TR
1824><TR
1825><TD
1826WIDTH="20%"
1827ALIGN="RIGHT"
1828VALIGN="TOP"
1829><I
1830CLASS="EMPHASIS"
1831>Returns</I
1832> :</TD
1833><TD
1834WIDTH="80%"
1835ALIGN="LEFT"
1836VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001837>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001838></TR
1839></TABLE
1840><P
1841></P
1842></DIV
1843></DIV
1844><HR><DIV
1845CLASS="REFSECT2"
1846><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001847NAME="AEN9989"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001848></A
1849><H3
1850><A
1851NAME="HTMLPARSEFILE"
1852></A
1853>htmlParseFile ()</H3
1854><TABLE
1855BORDER="0"
1856BGCOLOR="#D6E8FF"
1857WIDTH="100%"
1858CELLPADDING="6"
1859><TR
1860><TD
1861><PRE
1862CLASS="PROGRAMLISTING"
1863><A
1864HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1865>htmlDocPtr</A
1866> htmlParseFile (const char *filename,
1867 const char *encoding);</PRE
1868></TD
1869></TR
1870></TABLE
1871><P
1872>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1873compressed document is provided by default if found at compile-time.</P
1874><P
1875></P
1876><DIV
1877CLASS="INFORMALTABLE"
1878><P
1879></P
1880><TABLE
1881BORDER="0"
1882WIDTH="100%"
1883BGCOLOR="#FFD0D0"
1884CELLSPACING="0"
1885CELLPADDING="4"
1886CLASS="CALSTABLE"
1887><TR
1888><TD
1889WIDTH="20%"
1890ALIGN="RIGHT"
1891VALIGN="TOP"
1892><TT
1893CLASS="PARAMETER"
1894><I
1895>filename</I
1896></TT
1897>&nbsp;:</TD
1898><TD
1899WIDTH="80%"
1900ALIGN="LEFT"
1901VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001902> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001903></TR
1904><TR
1905><TD
1906WIDTH="20%"
1907ALIGN="RIGHT"
1908VALIGN="TOP"
1909><TT
1910CLASS="PARAMETER"
1911><I
1912>encoding</I
1913></TT
1914>&nbsp;:</TD
1915><TD
1916WIDTH="80%"
1917ALIGN="LEFT"
1918VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001919> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001920></TR
1921><TR
1922><TD
1923WIDTH="20%"
1924ALIGN="RIGHT"
1925VALIGN="TOP"
1926><I
1927CLASS="EMPHASIS"
1928>Returns</I
1929> :</TD
1930><TD
1931WIDTH="80%"
1932ALIGN="LEFT"
1933VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001934>the resulting document tree</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001935></TR
1936></TABLE
1937><P
1938></P
1939></DIV
1940></DIV
1941><HR><DIV
1942CLASS="REFSECT2"
1943><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001944NAME="AEN10013"
Daniel Veillarde46e20d2000-07-14 15:02:46 +00001945></A
1946><H3
1947><A
1948NAME="UTF8TOHTML"
1949></A
1950>UTF8ToHtml ()</H3
1951><TABLE
1952BORDER="0"
1953BGCOLOR="#D6E8FF"
1954WIDTH="100%"
1955CELLPADDING="6"
1956><TR
1957><TD
1958><PRE
1959CLASS="PROGRAMLISTING"
1960>int UTF8ToHtml (unsigned char *out,
1961 int *outlen,
1962 unsigned char *in,
1963 int *inlen);</PRE
1964></TD
1965></TR
1966></TABLE
1967><P
1968>Take a block of UTF-8 chars in and try to convert it to an ASCII
1969plus HTML entities block of chars out.</P
1970><P
1971></P
1972><DIV
1973CLASS="INFORMALTABLE"
1974><P
1975></P
1976><TABLE
1977BORDER="0"
1978WIDTH="100%"
1979BGCOLOR="#FFD0D0"
1980CELLSPACING="0"
1981CELLPADDING="4"
1982CLASS="CALSTABLE"
1983><TR
1984><TD
1985WIDTH="20%"
1986ALIGN="RIGHT"
1987VALIGN="TOP"
1988><TT
1989CLASS="PARAMETER"
1990><I
1991>out</I
1992></TT
1993>&nbsp;:</TD
1994><TD
1995WIDTH="80%"
1996ALIGN="LEFT"
1997VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001998> a pointer to an array of bytes to store the result</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00001999></TR
2000><TR
2001><TD
2002WIDTH="20%"
2003ALIGN="RIGHT"
2004VALIGN="TOP"
2005><TT
2006CLASS="PARAMETER"
2007><I
2008>outlen</I
2009></TT
2010>&nbsp;:</TD
2011><TD
2012WIDTH="80%"
2013ALIGN="LEFT"
2014VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002015> the length of <TT
2016CLASS="PARAMETER"
2017><I
2018>out</I
2019></TT
2020></TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002021></TR
2022><TR
2023><TD
2024WIDTH="20%"
2025ALIGN="RIGHT"
2026VALIGN="TOP"
2027><TT
2028CLASS="PARAMETER"
2029><I
2030>in</I
2031></TT
2032>&nbsp;:</TD
2033><TD
2034WIDTH="80%"
2035ALIGN="LEFT"
2036VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002037> a pointer to an array of UTF-8 chars</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002038></TR
2039><TR
2040><TD
2041WIDTH="20%"
2042ALIGN="RIGHT"
2043VALIGN="TOP"
2044><TT
2045CLASS="PARAMETER"
2046><I
2047>inlen</I
2048></TT
2049>&nbsp;:</TD
2050><TD
2051WIDTH="80%"
2052ALIGN="LEFT"
2053VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002054> the length of <TT
2055CLASS="PARAMETER"
2056><I
2057>in</I
2058></TT
2059></TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002060></TR
2061><TR
2062><TD
2063WIDTH="20%"
2064ALIGN="RIGHT"
2065VALIGN="TOP"
2066><I
2067CLASS="EMPHASIS"
2068>Returns</I
2069> :</TD
2070><TD
2071WIDTH="80%"
2072ALIGN="LEFT"
2073VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002074>0 if success, -2 if the transcoding fails, or -1 otherwise
2075The value of <TT
2076CLASS="PARAMETER"
2077><I
2078>inlen</I
2079></TT
2080> after return is the number of octets consumed
2081as the return value is positive, else unpredictiable.
2082The value of <TT
2083CLASS="PARAMETER"
2084><I
2085>outlen</I
2086></TT
2087> after return is the number of octets consumed.</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002088></TR
2089></TABLE
2090><P
2091></P
2092></DIV
2093></DIV
2094><HR><DIV
2095CLASS="REFSECT2"
2096><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002097NAME="AEN10048"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002098></A
2099><H3
2100><A
2101NAME="HTMLENCODEENTITIES"
2102></A
2103>htmlEncodeEntities ()</H3
2104><TABLE
2105BORDER="0"
2106BGCOLOR="#D6E8FF"
2107WIDTH="100%"
2108CELLPADDING="6"
2109><TR
2110><TD
2111><PRE
2112CLASS="PROGRAMLISTING"
2113>int htmlEncodeEntities (unsigned char *out,
2114 int *outlen,
2115 unsigned char *in,
2116 int *inlen,
2117 int quoteChar);</PRE
2118></TD
2119></TR
2120></TABLE
2121><P
2122>Take a block of UTF-8 chars in and try to convert it to an ASCII
2123plus HTML entities block of chars out.</P
2124><P
2125></P
2126><DIV
2127CLASS="INFORMALTABLE"
2128><P
2129></P
2130><TABLE
2131BORDER="0"
2132WIDTH="100%"
2133BGCOLOR="#FFD0D0"
2134CELLSPACING="0"
2135CELLPADDING="4"
2136CLASS="CALSTABLE"
2137><TR
2138><TD
2139WIDTH="20%"
2140ALIGN="RIGHT"
2141VALIGN="TOP"
2142><TT
2143CLASS="PARAMETER"
2144><I
2145>out</I
2146></TT
2147>&nbsp;:</TD
2148><TD
2149WIDTH="80%"
2150ALIGN="LEFT"
2151VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002152> a pointer to an array of bytes to store the result</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002153></TR
2154><TR
2155><TD
2156WIDTH="20%"
2157ALIGN="RIGHT"
2158VALIGN="TOP"
2159><TT
2160CLASS="PARAMETER"
2161><I
2162>outlen</I
2163></TT
2164>&nbsp;:</TD
2165><TD
2166WIDTH="80%"
2167ALIGN="LEFT"
2168VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002169> the length of <TT
2170CLASS="PARAMETER"
2171><I
2172>out</I
2173></TT
2174></TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002175></TR
2176><TR
2177><TD
2178WIDTH="20%"
2179ALIGN="RIGHT"
2180VALIGN="TOP"
2181><TT
2182CLASS="PARAMETER"
2183><I
2184>in</I
2185></TT
2186>&nbsp;:</TD
2187><TD
2188WIDTH="80%"
2189ALIGN="LEFT"
2190VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002191> a pointer to an array of UTF-8 chars</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002192></TR
2193><TR
2194><TD
2195WIDTH="20%"
2196ALIGN="RIGHT"
2197VALIGN="TOP"
2198><TT
2199CLASS="PARAMETER"
2200><I
2201>inlen</I
2202></TT
2203>&nbsp;:</TD
2204><TD
2205WIDTH="80%"
2206ALIGN="LEFT"
2207VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002208> the length of <TT
2209CLASS="PARAMETER"
2210><I
2211>in</I
2212></TT
2213></TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002214></TR
2215><TR
2216><TD
2217WIDTH="20%"
2218ALIGN="RIGHT"
2219VALIGN="TOP"
2220><TT
2221CLASS="PARAMETER"
2222><I
2223>quoteChar</I
2224></TT
2225>&nbsp;:</TD
2226><TD
2227WIDTH="80%"
2228ALIGN="LEFT"
2229VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002230> the quote character to escape (' or ") or zero.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002231></TR
2232><TR
2233><TD
2234WIDTH="20%"
2235ALIGN="RIGHT"
2236VALIGN="TOP"
2237><I
2238CLASS="EMPHASIS"
2239>Returns</I
2240> :</TD
2241><TD
2242WIDTH="80%"
2243ALIGN="LEFT"
2244VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002245>0 if success, -2 if the transcoding fails, or -1 otherwise
2246The value of <TT
2247CLASS="PARAMETER"
2248><I
2249>inlen</I
2250></TT
2251> after return is the number of octets consumed
2252as the return value is positive, else unpredictiable.
2253The value of <TT
2254CLASS="PARAMETER"
2255><I
2256>outlen</I
2257></TT
2258> after return is the number of octets consumed.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002259></TR
2260></TABLE
2261><P
2262></P
2263></DIV
2264></DIV
2265><HR><DIV
2266CLASS="REFSECT2"
2267><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002268NAME="AEN10087"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002269></A
2270><H3
2271><A
2272NAME="HTMLFREEPARSERCTXT"
2273></A
2274>htmlFreeParserCtxt ()</H3
2275><TABLE
2276BORDER="0"
2277BGCOLOR="#D6E8FF"
2278WIDTH="100%"
2279CELLPADDING="6"
2280><TR
2281><TD
2282><PRE
2283CLASS="PROGRAMLISTING"
2284>void htmlFreeParserCtxt (<A
2285HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
2286>htmlParserCtxtPtr</A
2287> ctxt);</PRE
2288></TD
2289></TR
2290></TABLE
2291><P
2292>Free all the memory used by a parser context. However the parsed
2293document in ctxt-&gt;myDoc is not freed.</P
2294><P
2295></P
2296><DIV
2297CLASS="INFORMALTABLE"
2298><P
2299></P
2300><TABLE
2301BORDER="0"
2302WIDTH="100%"
2303BGCOLOR="#FFD0D0"
2304CELLSPACING="0"
2305CELLPADDING="4"
2306CLASS="CALSTABLE"
2307><TR
2308><TD
2309WIDTH="20%"
2310ALIGN="RIGHT"
2311VALIGN="TOP"
2312><TT
2313CLASS="PARAMETER"
2314><I
2315>ctxt</I
2316></TT
2317>&nbsp;:</TD
2318><TD
2319WIDTH="80%"
2320ALIGN="LEFT"
2321VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002322> an HTML parser context</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002323></TR
2324></TABLE
2325><P
2326></P
2327></DIV
2328></DIV
2329><HR><DIV
2330CLASS="REFSECT2"
2331><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002332NAME="AEN10103"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002333></A
2334><H3
2335><A
2336NAME="HTMLCREATEPUSHPARSERCTXT"
2337></A
2338>htmlCreatePushParserCtxt ()</H3
2339><TABLE
2340BORDER="0"
2341BGCOLOR="#D6E8FF"
2342WIDTH="100%"
2343CELLPADDING="6"
2344><TR
2345><TD
2346><PRE
2347CLASS="PROGRAMLISTING"
2348><A
2349HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
2350>htmlParserCtxtPtr</A
2351> htmlCreatePushParserCtxt (<A
2352HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
2353>htmlSAXHandlerPtr</A
2354> sax,
2355 void *user_data,
2356 const char *chunk,
2357 int size,
2358 const char *filename,
2359 <A
2360HREF="gnome-xml-encoding.html#XMLCHARENCODING"
2361>xmlCharEncoding</A
2362> enc);</PRE
2363></TD
2364></TR
2365></TABLE
2366><P
2367>Create a parser context for using the HTML parser in push mode
2368To allow content encoding detection, <TT
2369CLASS="PARAMETER"
2370><I
2371>size</I
2372></TT
2373> should be &gt;= 4
2374The value of <TT
2375CLASS="PARAMETER"
2376><I
2377>filename</I
2378></TT
2379> is used for fetching external entities
2380and error/warning reports.</P
2381><P
2382></P
2383><DIV
2384CLASS="INFORMALTABLE"
2385><P
2386></P
2387><TABLE
2388BORDER="0"
2389WIDTH="100%"
2390BGCOLOR="#FFD0D0"
2391CELLSPACING="0"
2392CELLPADDING="4"
2393CLASS="CALSTABLE"
2394><TR
2395><TD
2396WIDTH="20%"
2397ALIGN="RIGHT"
2398VALIGN="TOP"
2399><TT
2400CLASS="PARAMETER"
2401><I
2402>sax</I
2403></TT
2404>&nbsp;:</TD
2405><TD
2406WIDTH="80%"
2407ALIGN="LEFT"
2408VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002409> a SAX handler</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002410></TR
2411><TR
2412><TD
2413WIDTH="20%"
2414ALIGN="RIGHT"
2415VALIGN="TOP"
2416><TT
2417CLASS="PARAMETER"
2418><I
2419>user_data</I
2420></TT
2421>&nbsp;:</TD
2422><TD
2423WIDTH="80%"
2424ALIGN="LEFT"
2425VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002426> The user data returned on SAX callbacks</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002427></TR
2428><TR
2429><TD
2430WIDTH="20%"
2431ALIGN="RIGHT"
2432VALIGN="TOP"
2433><TT
2434CLASS="PARAMETER"
2435><I
2436>chunk</I
2437></TT
2438>&nbsp;:</TD
2439><TD
2440WIDTH="80%"
2441ALIGN="LEFT"
2442VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002443> a pointer to an array of chars</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002444></TR
2445><TR
2446><TD
2447WIDTH="20%"
2448ALIGN="RIGHT"
2449VALIGN="TOP"
2450><TT
2451CLASS="PARAMETER"
2452><I
2453>size</I
2454></TT
2455>&nbsp;:</TD
2456><TD
2457WIDTH="80%"
2458ALIGN="LEFT"
2459VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002460> number of chars in the array</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002461></TR
2462><TR
2463><TD
2464WIDTH="20%"
2465ALIGN="RIGHT"
2466VALIGN="TOP"
2467><TT
2468CLASS="PARAMETER"
2469><I
2470>filename</I
2471></TT
2472>&nbsp;:</TD
2473><TD
2474WIDTH="80%"
2475ALIGN="LEFT"
2476VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002477> an optional file name or URI</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002478></TR
2479><TR
2480><TD
2481WIDTH="20%"
2482ALIGN="RIGHT"
2483VALIGN="TOP"
2484><TT
2485CLASS="PARAMETER"
2486><I
2487>enc</I
2488></TT
2489>&nbsp;:</TD
2490><TD
2491WIDTH="80%"
2492ALIGN="LEFT"
2493VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002494> an optional encoding</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002495></TR
2496><TR
2497><TD
2498WIDTH="20%"
2499ALIGN="RIGHT"
2500VALIGN="TOP"
2501><I
2502CLASS="EMPHASIS"
2503>Returns</I
2504> :</TD
2505><TD
2506WIDTH="80%"
2507ALIGN="LEFT"
2508VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002509>the new parser context or NULL</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002510></TR
2511></TABLE
2512><P
2513></P
2514></DIV
2515></DIV
2516><HR><DIV
2517CLASS="REFSECT2"
2518><A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002519NAME="AEN10147"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002520></A
2521><H3
2522><A
2523NAME="HTMLPARSECHUNK"
2524></A
2525>htmlParseChunk ()</H3
2526><TABLE
2527BORDER="0"
2528BGCOLOR="#D6E8FF"
2529WIDTH="100%"
2530CELLPADDING="6"
2531><TR
2532><TD
2533><PRE
2534CLASS="PROGRAMLISTING"
2535>int htmlParseChunk (<A
2536HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
2537>htmlParserCtxtPtr</A
2538> ctxt,
2539 const char *chunk,
2540 int size,
2541 int terminate);</PRE
2542></TD
2543></TR
2544></TABLE
2545><P
2546>Parse a Chunk of memory</P
2547><P
2548></P
2549><DIV
2550CLASS="INFORMALTABLE"
2551><P
2552></P
2553><TABLE
2554BORDER="0"
2555WIDTH="100%"
2556BGCOLOR="#FFD0D0"
2557CELLSPACING="0"
2558CELLPADDING="4"
2559CLASS="CALSTABLE"
2560><TR
2561><TD
2562WIDTH="20%"
2563ALIGN="RIGHT"
2564VALIGN="TOP"
2565><TT
2566CLASS="PARAMETER"
2567><I
2568>ctxt</I
2569></TT
2570>&nbsp;:</TD
2571><TD
2572WIDTH="80%"
2573ALIGN="LEFT"
2574VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002575> an XML parser context</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002576></TR
2577><TR
2578><TD
2579WIDTH="20%"
2580ALIGN="RIGHT"
2581VALIGN="TOP"
2582><TT
2583CLASS="PARAMETER"
2584><I
2585>chunk</I
2586></TT
2587>&nbsp;:</TD
2588><TD
2589WIDTH="80%"
2590ALIGN="LEFT"
2591VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002592> an char array</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002593></TR
2594><TR
2595><TD
2596WIDTH="20%"
2597ALIGN="RIGHT"
2598VALIGN="TOP"
2599><TT
2600CLASS="PARAMETER"
2601><I
2602>size</I
2603></TT
2604>&nbsp;:</TD
2605><TD
2606WIDTH="80%"
2607ALIGN="LEFT"
2608VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002609> the size in byte of the chunk</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002610></TR
2611><TR
2612><TD
2613WIDTH="20%"
2614ALIGN="RIGHT"
2615VALIGN="TOP"
2616><TT
2617CLASS="PARAMETER"
2618><I
2619>terminate</I
2620></TT
2621>&nbsp;:</TD
2622><TD
2623WIDTH="80%"
2624ALIGN="LEFT"
2625VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002626> last chunk indicator</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002627></TR
2628><TR
2629><TD
2630WIDTH="20%"
2631ALIGN="RIGHT"
2632VALIGN="TOP"
2633><I
2634CLASS="EMPHASIS"
2635>Returns</I
2636> :</TD
2637><TD
2638WIDTH="80%"
2639ALIGN="LEFT"
2640VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002641>zero if no error, the xmlParserErrors otherwise.</TD
Daniel Veillard437b87b2000-01-03 17:30:46 +00002642></TR
2643></TABLE
2644><P
2645></P
2646></DIV
2647></DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002648></DIV
2649><DIV
2650CLASS="NAVFOOTER"
Daniel Veillard00fdf371999-10-08 09:40:39 +00002651><BR
2652CLEAR="all"><BR><TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002653WIDTH="100%"
2654BORDER="0"
2655BGCOLOR="#000000"
2656CELLPADDING="1"
2657CELLSPACING="0"
2658><TR
2659><TD
2660WIDTH="25%"
2661BGCOLOR="#C00000"
2662ALIGN="left"
2663><A
Daniel Veillard6bd26dc1999-09-03 14:28:40 +00002664HREF="gnome-xml-xml-error.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002665><FONT
2666COLOR="#FFFFFF"
2667SIZE="3"
2668><B
2669>&#60;&#60;&#60; Previous Page</B
2670></FONT
2671></A
2672></TD
2673><TD
2674WIDTH="25%"
2675BGCOLOR="#0000C0"
2676ALIGN="center"
2677><FONT
2678COLOR="#FFFFFF"
2679SIZE="3"
2680><B
2681><A
2682HREF="book1.html"
2683><FONT
2684COLOR="#FFFFFF"
2685SIZE="3"
2686><B
2687>Home</B
2688></FONT
2689></A
2690></B
2691></FONT
2692></TD
2693><TD
2694WIDTH="25%"
2695BGCOLOR="#00C000"
2696ALIGN="center"
2697><FONT
2698COLOR="#FFFFFF"
2699SIZE="3"
2700><B
2701><A
Daniel Veillard35008381999-10-25 13:15:52 +00002702HREF="libxml-lib.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002703><FONT
2704COLOR="#FFFFFF"
2705SIZE="3"
2706><B
2707>Up</B
2708></FONT
2709></A
2710></B
2711></FONT
2712></TD
2713><TD
2714WIDTH="25%"
2715BGCOLOR="#C00000"
2716ALIGN="right"
2717><A
2718HREF="gnome-xml-htmltree.html"
2719><FONT
2720COLOR="#FFFFFF"
2721SIZE="3"
2722><B
2723>Next Page &#62;&#62;&#62;</B
2724></FONT
2725></A
2726></TD
2727></TR
2728><TR
2729><TD
2730COLSPAN="2"
2731ALIGN="left"
2732><FONT
2733COLOR="#FFFFFF"
2734SIZE="3"
2735><B
Daniel Veillard6bd26dc1999-09-03 14:28:40 +00002736>xml-error</B
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002737></FONT
2738></TD
2739><TD
2740COLSPAN="2"
2741ALIGN="right"
2742><FONT
2743COLOR="#FFFFFF"
2744SIZE="3"
2745><B
2746>HTMLtree</B
2747></FONT
2748></TD
2749></TR
2750></TABLE
2751></DIV
2752></BODY
2753></HTML
2754>