blob: 8e63df450c05d4a2a89fbf5a9bac10133d1ff2f1 [file] [log] [blame]
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001<HTML
2><HEAD
3><TITLE
4>HTMLparser</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillardf3a73582000-01-05 14:58:39 +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 Veillardf3a73582000-01-05 14:58:39 +0000114>HTMLparser</H1
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000115><DIV
116CLASS="REFNAMEDIV"
117><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000118NAME="AEN8547"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000119></A
120><H2
121>Name</H2
Daniel Veillardf3a73582000-01-05 14:58:39 +0000122>HTMLparser &#8212; </DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000123><DIV
124CLASS="REFSYNOPSISDIV"
125><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000126NAME="AEN8550"
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 Veillardf3a73582000-01-05 14:58:39 +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 Veillardf3a73582000-01-05 14:58:39 +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 Veillardf3a73582000-01-05 14:58:39 +0000213int <A
214HREF="gnome-xml-htmlparser.html#HTMLISAUTOCLOSED"
215>htmlIsAutoClosed</A
216> (<A
217HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
218>htmlDocPtr</A
219> doc,
220 <A
221HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
222>htmlNodePtr</A
223> elem);
224int <A
225HREF="gnome-xml-htmlparser.html#HTMLAUTOCLOSETAG"
226>htmlAutoCloseTag</A
227> (<A
228HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
229>htmlDocPtr</A
230> doc,
231 const <A
232HREF="gnome-xml-tree.html#XMLCHAR"
233>xmlChar</A
234> *name,
235 <A
236HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
237>htmlNodePtr</A
238> elem);
239<A
240HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
241>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000242> <A
243HREF="gnome-xml-htmlparser.html#HTMLPARSEENTITYREF"
244>htmlParseEntityRef</A
245> (<A
246HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
247>htmlParserCtxtPtr</A
248> ctxt,
249 <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000250HREF="gnome-xml-tree.html#XMLCHAR"
251>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000252> **str);
253int <A
254HREF="gnome-xml-htmlparser.html#HTMLPARSECHARREF"
255>htmlParseCharRef</A
256> (<A
257HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
258>htmlParserCtxtPtr</A
259> ctxt);
260void <A
261HREF="gnome-xml-htmlparser.html#HTMLPARSEELEMENT"
262>htmlParseElement</A
263> (<A
264HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
265>htmlParserCtxtPtr</A
266> ctxt);
267<A
268HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
269>htmlDocPtr</A
270> <A
271HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEDOC"
272>htmlSAXParseDoc</A
273> (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000274HREF="gnome-xml-tree.html#XMLCHAR"
275>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000276> *cur,
277 const char *encoding,
278 <A
279HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
280>htmlSAXHandlerPtr</A
281> sax,
282 void *userData);
283<A
284HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
285>htmlDocPtr</A
286> <A
287HREF="gnome-xml-htmlparser.html#HTMLPARSEDOC"
288>htmlParseDoc</A
289> (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000290HREF="gnome-xml-tree.html#XMLCHAR"
291>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000292> *cur,
293 const char *encoding);
294<A
295HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
296>htmlDocPtr</A
297> <A
298HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEFILE"
299>htmlSAXParseFile</A
300> (const char *filename,
301 const char *encoding,
302 <A
303HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
304>htmlSAXHandlerPtr</A
305> sax,
306 void *userData);
307<A
308HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
309>htmlDocPtr</A
310> <A
311HREF="gnome-xml-htmlparser.html#HTMLPARSEFILE"
312>htmlParseFile</A
313> (const char *filename,
Daniel Veillardf3a73582000-01-05 14:58:39 +0000314 const char *encoding);
315void <A
316HREF="gnome-xml-htmlparser.html#HTMLFREEPARSERCTXT"
317>htmlFreeParserCtxt</A
318> (<A
319HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
320>htmlParserCtxtPtr</A
321> ctxt);
322<A
323HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
324>htmlParserCtxtPtr</A
325> <A
326HREF="gnome-xml-htmlparser.html#HTMLCREATEPUSHPARSERCTXT"
327>htmlCreatePushParserCtxt</A
328> (<A
329HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
330>htmlSAXHandlerPtr</A
331> sax,
332 void *user_data,
333 const char *chunk,
334 int size,
335 const char *filename,
336 <A
337HREF="gnome-xml-encoding.html#XMLCHARENCODING"
338>xmlCharEncoding</A
339> enc);
340int <A
341HREF="gnome-xml-htmlparser.html#HTMLPARSECHUNK"
342>htmlParseChunk</A
343> (<A
344HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
345>htmlParserCtxtPtr</A
346> ctxt,
347 const char *chunk,
348 int size,
349 int terminate);</PRE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000350></TD
351></TR
352></TABLE
353></DIV
354><DIV
355CLASS="REFSECT1"
356><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000357NAME="AEN8607"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000358></A
359><H2
360>Description</H2
361><P
362></P
363></DIV
364><DIV
365CLASS="REFSECT1"
366><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000367NAME="AEN8610"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000368></A
369><H2
370>Details</H2
371><DIV
372CLASS="REFSECT2"
373><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000374NAME="AEN8612"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000375></A
376><H3
377><A
378NAME="HTMLPARSERCTXT"
379></A
380>htmlParserCtxt</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000381><TABLE
382BORDER="0"
383BGCOLOR="#D6E8FF"
384WIDTH="100%"
385CELLPADDING="6"
386><TR
387><TD
388><PRE
389CLASS="PROGRAMLISTING"
390>typedef xmlParserCtxt htmlParserCtxt;</PRE
391></TD
392></TR
393></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000394><P
395></P
396></DIV
397><HR><DIV
398CLASS="REFSECT2"
399><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000400NAME="AEN8617"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000401></A
402><H3
403><A
404NAME="HTMLPARSERCTXTPTR"
405></A
406>htmlParserCtxtPtr</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000407><TABLE
408BORDER="0"
409BGCOLOR="#D6E8FF"
410WIDTH="100%"
411CELLPADDING="6"
412><TR
413><TD
414><PRE
415CLASS="PROGRAMLISTING"
416>typedef xmlParserCtxtPtr htmlParserCtxtPtr;</PRE
417></TD
418></TR
419></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000420><P
421></P
422></DIV
423><HR><DIV
424CLASS="REFSECT2"
425><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000426NAME="AEN8622"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000427></A
428><H3
429><A
430NAME="HTMLPARSERNODEINFO"
431></A
432>htmlParserNodeInfo</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000433><TABLE
434BORDER="0"
435BGCOLOR="#D6E8FF"
436WIDTH="100%"
437CELLPADDING="6"
438><TR
439><TD
440><PRE
441CLASS="PROGRAMLISTING"
442>typedef xmlParserNodeInfo htmlParserNodeInfo;</PRE
443></TD
444></TR
445></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000446><P
447></P
448></DIV
449><HR><DIV
450CLASS="REFSECT2"
451><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000452NAME="AEN8627"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000453></A
454><H3
455><A
456NAME="HTMLSAXHANDLER"
457></A
458>htmlSAXHandler</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000459><TABLE
460BORDER="0"
461BGCOLOR="#D6E8FF"
462WIDTH="100%"
463CELLPADDING="6"
464><TR
465><TD
466><PRE
467CLASS="PROGRAMLISTING"
468>typedef xmlSAXHandler htmlSAXHandler;</PRE
469></TD
470></TR
471></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000472><P
473></P
474></DIV
475><HR><DIV
476CLASS="REFSECT2"
477><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000478NAME="AEN8632"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000479></A
480><H3
481><A
482NAME="HTMLSAXHANDLERPTR"
483></A
484>htmlSAXHandlerPtr</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000485><TABLE
486BORDER="0"
487BGCOLOR="#D6E8FF"
488WIDTH="100%"
489CELLPADDING="6"
490><TR
491><TD
492><PRE
493CLASS="PROGRAMLISTING"
494>typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;</PRE
495></TD
496></TR
497></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000498><P
499></P
500></DIV
501><HR><DIV
502CLASS="REFSECT2"
503><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000504NAME="AEN8637"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000505></A
506><H3
507><A
508NAME="HTMLPARSERINPUT"
509></A
510>htmlParserInput</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000511><TABLE
512BORDER="0"
513BGCOLOR="#D6E8FF"
514WIDTH="100%"
515CELLPADDING="6"
516><TR
517><TD
518><PRE
519CLASS="PROGRAMLISTING"
520>typedef xmlParserInput htmlParserInput;</PRE
521></TD
522></TR
523></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000524><P
525></P
526></DIV
527><HR><DIV
528CLASS="REFSECT2"
529><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000530NAME="AEN8642"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000531></A
532><H3
533><A
534NAME="HTMLPARSERINPUTPTR"
535></A
536>htmlParserInputPtr</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000537><TABLE
538BORDER="0"
539BGCOLOR="#D6E8FF"
540WIDTH="100%"
541CELLPADDING="6"
542><TR
543><TD
544><PRE
545CLASS="PROGRAMLISTING"
546>typedef xmlParserInputPtr htmlParserInputPtr;</PRE
547></TD
548></TR
549></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000550><P
551></P
552></DIV
553><HR><DIV
554CLASS="REFSECT2"
555><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000556NAME="AEN8647"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000557></A
558><H3
559><A
560NAME="HTMLDOCPTR"
561></A
562>htmlDocPtr</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000563><TABLE
564BORDER="0"
565BGCOLOR="#D6E8FF"
566WIDTH="100%"
567CELLPADDING="6"
568><TR
569><TD
570><PRE
571CLASS="PROGRAMLISTING"
572>typedef xmlDocPtr htmlDocPtr;</PRE
573></TD
574></TR
575></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000576><P
577></P
578></DIV
579><HR><DIV
580CLASS="REFSECT2"
581><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000582NAME="AEN8652"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000583></A
584><H3
585><A
586NAME="HTMLNODEPTR"
587></A
588>htmlNodePtr</H3
Daniel Veillardf3a73582000-01-05 14:58:39 +0000589><TABLE
590BORDER="0"
591BGCOLOR="#D6E8FF"
592WIDTH="100%"
593CELLPADDING="6"
594><TR
595><TD
596><PRE
597CLASS="PROGRAMLISTING"
598>typedef xmlNodePtr htmlNodePtr;</PRE
599></TD
600></TR
601></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000602><P
603></P
604></DIV
605><HR><DIV
606CLASS="REFSECT2"
607><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000608NAME="AEN8657"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000609></A
610><H3
611><A
612NAME="HTMLELEMDESC"
613></A
614>struct htmlElemDesc</H3
615><TABLE
616BORDER="0"
617BGCOLOR="#D6E8FF"
618WIDTH="100%"
619CELLPADDING="6"
620><TR
621><TD
622><PRE
623CLASS="PROGRAMLISTING"
624>struct htmlElemDesc {
625 const char *name; /* The tag name */
626 int startTag; /* Whether the start tag can be implied */
627 int endTag; /* Whether the end tag can be implied */
628 int empty; /* Is this an empty element ? */
629 int depr; /* Is this a deprecated element ? */
630 int dtd; /* 1: only in Loose DTD, 2: only Frameset one */
631 const char *desc; /* the description */
632};</PRE
633></TD
634></TR
635></TABLE
636><P
637></P
638></DIV
639><HR><DIV
640CLASS="REFSECT2"
641><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000642NAME="AEN8662"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000643></A
644><H3
645><A
646NAME="HTMLELEMDESCPTR"
647></A
648>htmlElemDescPtr</H3
649><TABLE
650BORDER="0"
651BGCOLOR="#D6E8FF"
652WIDTH="100%"
653CELLPADDING="6"
654><TR
655><TD
656><PRE
657CLASS="PROGRAMLISTING"
658>typedef htmlElemDesc *htmlElemDescPtr;</PRE
659></TD
660></TR
661></TABLE
662><P
663></P
664></DIV
665><HR><DIV
666CLASS="REFSECT2"
667><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000668NAME="AEN8667"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000669></A
670><H3
671><A
672NAME="HTMLENTITYDESC"
673></A
674>struct htmlEntityDesc</H3
675><TABLE
676BORDER="0"
677BGCOLOR="#D6E8FF"
678WIDTH="100%"
679CELLPADDING="6"
680><TR
681><TD
682><PRE
683CLASS="PROGRAMLISTING"
684>struct htmlEntityDesc {
685 int value; /* the UNICODE value for the character */
686 const char *name; /* The entity name */
687 const char *desc; /* the description */
688};</PRE
689></TD
690></TR
691></TABLE
692><P
693></P
694></DIV
695><HR><DIV
696CLASS="REFSECT2"
697><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000698NAME="AEN8672"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000699></A
700><H3
701><A
702NAME="HTMLENTITYDESCPTR"
703></A
704>htmlEntityDescPtr</H3
705><TABLE
706BORDER="0"
707BGCOLOR="#D6E8FF"
708WIDTH="100%"
709CELLPADDING="6"
710><TR
711><TD
712><PRE
713CLASS="PROGRAMLISTING"
714>typedef htmlEntityDesc *htmlEntityDescPtr;</PRE
715></TD
716></TR
717></TABLE
718><P
719></P
720></DIV
721><HR><DIV
722CLASS="REFSECT2"
723><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000724NAME="AEN8677"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000725></A
726><H3
727><A
728NAME="HTMLTAGLOOKUP"
729></A
730>htmlTagLookup ()</H3
731><TABLE
732BORDER="0"
733BGCOLOR="#D6E8FF"
734WIDTH="100%"
735CELLPADDING="6"
736><TR
737><TD
738><PRE
739CLASS="PROGRAMLISTING"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000740><A
741HREF="gnome-xml-htmlparser.html#HTMLELEMDESCPTR"
742>htmlElemDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000743> htmlTagLookup (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000744HREF="gnome-xml-tree.html#XMLCHAR"
745>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000746> *tag);</PRE
747></TD
748></TR
749></TABLE
750><P
751>Lookup the HTML tag in the ElementTable</P
752><P
753></P
754><DIV
755CLASS="INFORMALTABLE"
756><P
757></P
758><TABLE
759BORDER="0"
760WIDTH="100%"
761BGCOLOR="#FFD0D0"
762CELLSPACING="0"
763CELLPADDING="4"
764CLASS="CALSTABLE"
765><TR
766><TD
767WIDTH="20%"
768ALIGN="RIGHT"
769VALIGN="TOP"
770><TT
771CLASS="PARAMETER"
772><I
773>tag</I
774></TT
775>&nbsp;:</TD
776><TD
777WIDTH="80%"
778ALIGN="LEFT"
779VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000780> The tag name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000781></TR
782><TR
783><TD
784WIDTH="20%"
785ALIGN="RIGHT"
786VALIGN="TOP"
787><I
788CLASS="EMPHASIS"
789>Returns</I
790> :</TD
791><TD
792WIDTH="80%"
793ALIGN="LEFT"
794VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000795>the related htmlElemDescPtr or NULL if not found.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000796></TR
797></TABLE
798><P
799></P
800></DIV
801></DIV
802><HR><DIV
803CLASS="REFSECT2"
804><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000805NAME="AEN8698"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000806></A
807><H3
808><A
809NAME="HTMLENTITYLOOKUP"
810></A
811>htmlEntityLookup ()</H3
812><TABLE
813BORDER="0"
814BGCOLOR="#D6E8FF"
815WIDTH="100%"
816CELLPADDING="6"
817><TR
818><TD
819><PRE
820CLASS="PROGRAMLISTING"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000821><A
822HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
823>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000824> htmlEntityLookup (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000825HREF="gnome-xml-tree.html#XMLCHAR"
826>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000827> *name);</PRE
828></TD
829></TR
830></TABLE
831><P
832>Lookup the given entity in EntitiesTable</P
833><P
834>TODO: the linear scan is really ugly, an hash table is really needed.</P
835><P
836></P
837><DIV
838CLASS="INFORMALTABLE"
839><P
840></P
841><TABLE
842BORDER="0"
843WIDTH="100%"
844BGCOLOR="#FFD0D0"
845CELLSPACING="0"
846CELLPADDING="4"
847CLASS="CALSTABLE"
848><TR
849><TD
850WIDTH="20%"
851ALIGN="RIGHT"
852VALIGN="TOP"
853><TT
854CLASS="PARAMETER"
855><I
856>name</I
857></TT
858>&nbsp;:</TD
859><TD
860WIDTH="80%"
861ALIGN="LEFT"
862VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000863> the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000864></TR
865><TR
866><TD
867WIDTH="20%"
868ALIGN="RIGHT"
869VALIGN="TOP"
870><I
871CLASS="EMPHASIS"
872>Returns</I
873> :</TD
874><TD
875WIDTH="80%"
876ALIGN="LEFT"
877VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000878>the associated htmlEntityDescPtr if found, NULL otherwise.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000879></TR
880></TABLE
881><P
882></P
883></DIV
884></DIV
885><HR><DIV
886CLASS="REFSECT2"
887><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000888NAME="AEN8720"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000889></A
890><H3
891><A
892NAME="HTMLISAUTOCLOSED"
893></A
894>htmlIsAutoClosed ()</H3
895><TABLE
896BORDER="0"
897BGCOLOR="#D6E8FF"
898WIDTH="100%"
899CELLPADDING="6"
900><TR
901><TD
902><PRE
903CLASS="PROGRAMLISTING"
904>int htmlIsAutoClosed (<A
905HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
906>htmlDocPtr</A
907> doc,
908 <A
909HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
910>htmlNodePtr</A
911> elem);</PRE
912></TD
913></TR
914></TABLE
915><P
916>The HTmL DtD allows a tag to implicitely close other tags.
917The list is kept in htmlStartClose array. This function checks
918if a tag is autoclosed by one of it's child</P
919><P
920></P
921><DIV
922CLASS="INFORMALTABLE"
923><P
924></P
925><TABLE
926BORDER="0"
927WIDTH="100%"
928BGCOLOR="#FFD0D0"
929CELLSPACING="0"
930CELLPADDING="4"
931CLASS="CALSTABLE"
932><TR
933><TD
934WIDTH="20%"
935ALIGN="RIGHT"
936VALIGN="TOP"
937><TT
938CLASS="PARAMETER"
939><I
940>doc</I
941></TT
942>&nbsp;:</TD
943><TD
944WIDTH="80%"
945ALIGN="LEFT"
946VALIGN="TOP"
947> the HTML document</TD
948></TR
949><TR
950><TD
951WIDTH="20%"
952ALIGN="RIGHT"
953VALIGN="TOP"
954><TT
955CLASS="PARAMETER"
956><I
957>elem</I
958></TT
959>&nbsp;:</TD
960><TD
961WIDTH="80%"
962ALIGN="LEFT"
963VALIGN="TOP"
964> the HTML element</TD
965></TR
966><TR
967><TD
968WIDTH="20%"
969ALIGN="RIGHT"
970VALIGN="TOP"
971><I
972CLASS="EMPHASIS"
973>Returns</I
974> :</TD
975><TD
976WIDTH="80%"
977ALIGN="LEFT"
978VALIGN="TOP"
979>1 if autoclosed, 0 otherwise</TD
980></TR
981></TABLE
982><P
983></P
984></DIV
985></DIV
986><HR><DIV
987CLASS="REFSECT2"
988><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000989NAME="AEN8745"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000990></A
991><H3
992><A
993NAME="HTMLAUTOCLOSETAG"
994></A
995>htmlAutoCloseTag ()</H3
996><TABLE
997BORDER="0"
998BGCOLOR="#D6E8FF"
999WIDTH="100%"
1000CELLPADDING="6"
1001><TR
1002><TD
1003><PRE
1004CLASS="PROGRAMLISTING"
1005>int htmlAutoCloseTag (<A
1006HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1007>htmlDocPtr</A
1008> doc,
1009 const <A
1010HREF="gnome-xml-tree.html#XMLCHAR"
1011>xmlChar</A
1012> *name,
1013 <A
1014HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
1015>htmlNodePtr</A
1016> elem);</PRE
1017></TD
1018></TR
1019></TABLE
1020><P
1021>The HTmL DtD allows a tag to implicitely close other tags.
1022The list is kept in htmlStartClose array. This function checks
1023if the element or one of it's children would autoclose the
1024given tag.</P
1025><P
1026></P
1027><DIV
1028CLASS="INFORMALTABLE"
1029><P
1030></P
1031><TABLE
1032BORDER="0"
1033WIDTH="100%"
1034BGCOLOR="#FFD0D0"
1035CELLSPACING="0"
1036CELLPADDING="4"
1037CLASS="CALSTABLE"
1038><TR
1039><TD
1040WIDTH="20%"
1041ALIGN="RIGHT"
1042VALIGN="TOP"
1043><TT
1044CLASS="PARAMETER"
1045><I
1046>doc</I
1047></TT
1048>&nbsp;:</TD
1049><TD
1050WIDTH="80%"
1051ALIGN="LEFT"
1052VALIGN="TOP"
1053> the HTML document</TD
1054></TR
1055><TR
1056><TD
1057WIDTH="20%"
1058ALIGN="RIGHT"
1059VALIGN="TOP"
1060><TT
1061CLASS="PARAMETER"
1062><I
1063>name</I
1064></TT
1065>&nbsp;:</TD
1066><TD
1067WIDTH="80%"
1068ALIGN="LEFT"
1069VALIGN="TOP"
1070> The tag name</TD
1071></TR
1072><TR
1073><TD
1074WIDTH="20%"
1075ALIGN="RIGHT"
1076VALIGN="TOP"
1077><TT
1078CLASS="PARAMETER"
1079><I
1080>elem</I
1081></TT
1082>&nbsp;:</TD
1083><TD
1084WIDTH="80%"
1085ALIGN="LEFT"
1086VALIGN="TOP"
1087> the HTML element</TD
1088></TR
1089><TR
1090><TD
1091WIDTH="20%"
1092ALIGN="RIGHT"
1093VALIGN="TOP"
1094><I
1095CLASS="EMPHASIS"
1096>Returns</I
1097> :</TD
1098><TD
1099WIDTH="80%"
1100ALIGN="LEFT"
1101VALIGN="TOP"
1102>1 if autoclose, 0 otherwise</TD
1103></TR
1104></TABLE
1105><P
1106></P
1107></DIV
1108></DIV
1109><HR><DIV
1110CLASS="REFSECT2"
1111><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001112NAME="AEN8775"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001113></A
1114><H3
1115><A
1116NAME="HTMLPARSEENTITYREF"
1117></A
1118>htmlParseEntityRef ()</H3
1119><TABLE
1120BORDER="0"
1121BGCOLOR="#D6E8FF"
1122WIDTH="100%"
1123CELLPADDING="6"
1124><TR
1125><TD
1126><PRE
1127CLASS="PROGRAMLISTING"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001128><A
1129HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
1130>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001131> htmlParseEntityRef (<A
1132HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1133>htmlParserCtxtPtr</A
1134> ctxt,
1135 <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001136HREF="gnome-xml-tree.html#XMLCHAR"
1137>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001138> **str);</PRE
1139></TD
1140></TR
1141></TABLE
1142><P
1143>parse an HTML ENTITY references</P
1144><P
1145>[68] EntityRef ::= '&amp;' Name ';'</P
1146><P
1147></P
1148><DIV
1149CLASS="INFORMALTABLE"
1150><P
1151></P
1152><TABLE
1153BORDER="0"
1154WIDTH="100%"
1155BGCOLOR="#FFD0D0"
1156CELLSPACING="0"
1157CELLPADDING="4"
1158CLASS="CALSTABLE"
1159><TR
1160><TD
1161WIDTH="20%"
1162ALIGN="RIGHT"
1163VALIGN="TOP"
1164><TT
1165CLASS="PARAMETER"
1166><I
1167>ctxt</I
1168></TT
1169>&nbsp;:</TD
1170><TD
1171WIDTH="80%"
1172ALIGN="LEFT"
1173VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001174> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001175></TR
1176><TR
1177><TD
1178WIDTH="20%"
1179ALIGN="RIGHT"
1180VALIGN="TOP"
1181><TT
1182CLASS="PARAMETER"
1183><I
1184>str</I
1185></TT
1186>&nbsp;:</TD
1187><TD
1188WIDTH="80%"
1189ALIGN="LEFT"
1190VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001191> location to store the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001192></TR
1193><TR
1194><TD
1195WIDTH="20%"
1196ALIGN="RIGHT"
1197VALIGN="TOP"
1198><I
1199CLASS="EMPHASIS"
1200>Returns</I
1201> :</TD
1202><TD
1203WIDTH="80%"
1204ALIGN="LEFT"
1205VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001206>the associated htmlEntityDescPtr if found, or NULL otherwise,
1207if non-NULL *str will have to be freed by the caller.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001208></TR
1209></TABLE
1210><P
1211></P
1212></DIV
1213></DIV
1214><HR><DIV
1215CLASS="REFSECT2"
1216><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001217NAME="AEN8802"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001218></A
1219><H3
1220><A
1221NAME="HTMLPARSECHARREF"
1222></A
1223>htmlParseCharRef ()</H3
1224><TABLE
1225BORDER="0"
1226BGCOLOR="#D6E8FF"
1227WIDTH="100%"
1228CELLPADDING="6"
1229><TR
1230><TD
1231><PRE
1232CLASS="PROGRAMLISTING"
1233>int htmlParseCharRef (<A
1234HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1235>htmlParserCtxtPtr</A
1236> ctxt);</PRE
1237></TD
1238></TR
1239></TABLE
1240><P
1241>parse Reference declarations</P
1242><P
1243>[66] CharRef ::= '&amp;#' [0-9]+ ';' |
1244'&amp;<GTKDOCLINK
1245HREF="X"
1246>x</GTKDOCLINK
1247>' [0-9a-fA-F]+ ';'</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 Veillardf3a73582000-01-05 14:58:39 +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><I
1284CLASS="EMPHASIS"
1285>Returns</I
1286> :</TD
1287><TD
1288WIDTH="80%"
1289ALIGN="LEFT"
1290VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001291>the value parsed (as an int)</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001292></TR
1293></TABLE
1294><P
1295></P
1296></DIV
1297></DIV
1298><HR><DIV
1299CLASS="REFSECT2"
1300><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001301NAME="AEN8824"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001302></A
1303><H3
1304><A
1305NAME="HTMLPARSEELEMENT"
1306></A
1307>htmlParseElement ()</H3
1308><TABLE
1309BORDER="0"
1310BGCOLOR="#D6E8FF"
1311WIDTH="100%"
1312CELLPADDING="6"
1313><TR
1314><TD
1315><PRE
1316CLASS="PROGRAMLISTING"
1317>void htmlParseElement (<A
1318HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1319>htmlParserCtxtPtr</A
1320> ctxt);</PRE
1321></TD
1322></TR
1323></TABLE
1324><P
1325>parse an HTML element, this is highly recursive</P
1326><P
1327>[39] element ::= EmptyElemTag | STag content ETag</P
1328><P
1329>[41] Attribute ::= Name Eq AttValue</P
1330><P
1331></P
1332><DIV
1333CLASS="INFORMALTABLE"
1334><P
1335></P
1336><TABLE
1337BORDER="0"
1338WIDTH="100%"
1339BGCOLOR="#FFD0D0"
1340CELLSPACING="0"
1341CELLPADDING="4"
1342CLASS="CALSTABLE"
1343><TR
1344><TD
1345WIDTH="20%"
1346ALIGN="RIGHT"
1347VALIGN="TOP"
1348><TT
1349CLASS="PARAMETER"
1350><I
1351>ctxt</I
1352></TT
1353>&nbsp;:</TD
1354><TD
1355WIDTH="80%"
1356ALIGN="LEFT"
1357VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001358> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001359></TR
1360></TABLE
1361><P
1362></P
1363></DIV
1364></DIV
1365><HR><DIV
1366CLASS="REFSECT2"
1367><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001368NAME="AEN8842"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001369></A
1370><H3
1371><A
1372NAME="HTMLSAXPARSEDOC"
1373></A
1374>htmlSAXParseDoc ()</H3
1375><TABLE
1376BORDER="0"
1377BGCOLOR="#D6E8FF"
1378WIDTH="100%"
1379CELLPADDING="6"
1380><TR
1381><TD
1382><PRE
1383CLASS="PROGRAMLISTING"
1384><A
1385HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1386>htmlDocPtr</A
1387> htmlSAXParseDoc (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001388HREF="gnome-xml-tree.html#XMLCHAR"
1389>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001390> *cur,
1391 const char *encoding,
1392 <A
1393HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1394>htmlSAXHandlerPtr</A
1395> sax,
1396 void *userData);</PRE
1397></TD
1398></TR
1399></TABLE
1400><P
1401>parse an HTML in-memory document and build a tree.
1402It use the given SAX function block to handle the parsing callback.
1403If sax is NULL, fallback to the default DOM tree building routines.</P
1404><P
1405></P
1406><DIV
1407CLASS="INFORMALTABLE"
1408><P
1409></P
1410><TABLE
1411BORDER="0"
1412WIDTH="100%"
1413BGCOLOR="#FFD0D0"
1414CELLSPACING="0"
1415CELLPADDING="4"
1416CLASS="CALSTABLE"
1417><TR
1418><TD
1419WIDTH="20%"
1420ALIGN="RIGHT"
1421VALIGN="TOP"
1422><TT
1423CLASS="PARAMETER"
1424><I
1425>cur</I
1426></TT
1427>&nbsp;:</TD
1428><TD
1429WIDTH="80%"
1430ALIGN="LEFT"
1431VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001432> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001433></TR
1434><TR
1435><TD
1436WIDTH="20%"
1437ALIGN="RIGHT"
1438VALIGN="TOP"
1439><TT
1440CLASS="PARAMETER"
1441><I
1442>encoding</I
1443></TT
1444>&nbsp;:</TD
1445><TD
1446WIDTH="80%"
1447ALIGN="LEFT"
1448VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001449> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001450></TR
1451><TR
1452><TD
1453WIDTH="20%"
1454ALIGN="RIGHT"
1455VALIGN="TOP"
1456><TT
1457CLASS="PARAMETER"
1458><I
1459>sax</I
1460></TT
1461>&nbsp;:</TD
1462><TD
1463WIDTH="80%"
1464ALIGN="LEFT"
1465VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001466> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001467></TR
1468><TR
1469><TD
1470WIDTH="20%"
1471ALIGN="RIGHT"
1472VALIGN="TOP"
1473><TT
1474CLASS="PARAMETER"
1475><I
1476>userData</I
1477></TT
1478>&nbsp;:</TD
1479><TD
1480WIDTH="80%"
1481ALIGN="LEFT"
1482VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001483> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001484></TR
1485><TR
1486><TD
1487WIDTH="20%"
1488ALIGN="RIGHT"
1489VALIGN="TOP"
1490><I
1491CLASS="EMPHASIS"
1492>Returns</I
1493> :</TD
1494><TD
1495WIDTH="80%"
1496ALIGN="LEFT"
1497VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001498>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001499></TR
1500></TABLE
1501><P
1502></P
1503></DIV
1504></DIV
1505><HR><DIV
1506CLASS="REFSECT2"
1507><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001508NAME="AEN8876"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001509></A
1510><H3
1511><A
1512NAME="HTMLPARSEDOC"
1513></A
1514>htmlParseDoc ()</H3
1515><TABLE
1516BORDER="0"
1517BGCOLOR="#D6E8FF"
1518WIDTH="100%"
1519CELLPADDING="6"
1520><TR
1521><TD
1522><PRE
1523CLASS="PROGRAMLISTING"
1524><A
1525HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1526>htmlDocPtr</A
1527> htmlParseDoc (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001528HREF="gnome-xml-tree.html#XMLCHAR"
1529>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001530> *cur,
1531 const char *encoding);</PRE
1532></TD
1533></TR
1534></TABLE
1535><P
1536>parse an HTML in-memory document and build a tree.</P
1537><P
1538></P
1539><DIV
1540CLASS="INFORMALTABLE"
1541><P
1542></P
1543><TABLE
1544BORDER="0"
1545WIDTH="100%"
1546BGCOLOR="#FFD0D0"
1547CELLSPACING="0"
1548CELLPADDING="4"
1549CLASS="CALSTABLE"
1550><TR
1551><TD
1552WIDTH="20%"
1553ALIGN="RIGHT"
1554VALIGN="TOP"
1555><TT
1556CLASS="PARAMETER"
1557><I
1558>cur</I
1559></TT
1560>&nbsp;:</TD
1561><TD
1562WIDTH="80%"
1563ALIGN="LEFT"
1564VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001565> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001566></TR
1567><TR
1568><TD
1569WIDTH="20%"
1570ALIGN="RIGHT"
1571VALIGN="TOP"
1572><TT
1573CLASS="PARAMETER"
1574><I
1575>encoding</I
1576></TT
1577>&nbsp;:</TD
1578><TD
1579WIDTH="80%"
1580ALIGN="LEFT"
1581VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001582> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001583></TR
1584><TR
1585><TD
1586WIDTH="20%"
1587ALIGN="RIGHT"
1588VALIGN="TOP"
1589><I
1590CLASS="EMPHASIS"
1591>Returns</I
1592> :</TD
1593><TD
1594WIDTH="80%"
1595ALIGN="LEFT"
1596VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001597>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001598></TR
1599></TABLE
1600><P
1601></P
1602></DIV
1603></DIV
1604><HR><DIV
1605CLASS="REFSECT2"
1606><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001607NAME="AEN8901"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001608></A
1609><H3
1610><A
1611NAME="HTMLSAXPARSEFILE"
1612></A
1613>htmlSAXParseFile ()</H3
1614><TABLE
1615BORDER="0"
1616BGCOLOR="#D6E8FF"
1617WIDTH="100%"
1618CELLPADDING="6"
1619><TR
1620><TD
1621><PRE
1622CLASS="PROGRAMLISTING"
1623><A
1624HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1625>htmlDocPtr</A
1626> htmlSAXParseFile (const char *filename,
1627 const char *encoding,
1628 <A
1629HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1630>htmlSAXHandlerPtr</A
1631> sax,
1632 void *userData);</PRE
1633></TD
1634></TR
1635></TABLE
1636><P
1637>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1638compressed document is provided by default if found at compile-time.
1639It use the given SAX function block to handle the parsing callback.
1640If sax is NULL, fallback to the default DOM tree building routines.</P
1641><P
1642></P
1643><DIV
1644CLASS="INFORMALTABLE"
1645><P
1646></P
1647><TABLE
1648BORDER="0"
1649WIDTH="100%"
1650BGCOLOR="#FFD0D0"
1651CELLSPACING="0"
1652CELLPADDING="4"
1653CLASS="CALSTABLE"
1654><TR
1655><TD
1656WIDTH="20%"
1657ALIGN="RIGHT"
1658VALIGN="TOP"
1659><TT
1660CLASS="PARAMETER"
1661><I
1662>filename</I
1663></TT
1664>&nbsp;:</TD
1665><TD
1666WIDTH="80%"
1667ALIGN="LEFT"
1668VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001669> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001670></TR
1671><TR
1672><TD
1673WIDTH="20%"
1674ALIGN="RIGHT"
1675VALIGN="TOP"
1676><TT
1677CLASS="PARAMETER"
1678><I
1679>encoding</I
1680></TT
1681>&nbsp;:</TD
1682><TD
1683WIDTH="80%"
1684ALIGN="LEFT"
1685VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001686> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001687></TR
1688><TR
1689><TD
1690WIDTH="20%"
1691ALIGN="RIGHT"
1692VALIGN="TOP"
1693><TT
1694CLASS="PARAMETER"
1695><I
1696>sax</I
1697></TT
1698>&nbsp;:</TD
1699><TD
1700WIDTH="80%"
1701ALIGN="LEFT"
1702VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001703> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001704></TR
1705><TR
1706><TD
1707WIDTH="20%"
1708ALIGN="RIGHT"
1709VALIGN="TOP"
1710><TT
1711CLASS="PARAMETER"
1712><I
1713>userData</I
1714></TT
1715>&nbsp;:</TD
1716><TD
1717WIDTH="80%"
1718ALIGN="LEFT"
1719VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001720> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001721></TR
1722><TR
1723><TD
1724WIDTH="20%"
1725ALIGN="RIGHT"
1726VALIGN="TOP"
1727><I
1728CLASS="EMPHASIS"
1729>Returns</I
1730> :</TD
1731><TD
1732WIDTH="80%"
1733ALIGN="LEFT"
1734VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001735>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001736></TR
1737></TABLE
1738><P
1739></P
1740></DIV
1741></DIV
1742><HR><DIV
1743CLASS="REFSECT2"
1744><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001745NAME="AEN8934"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001746></A
1747><H3
1748><A
1749NAME="HTMLPARSEFILE"
1750></A
1751>htmlParseFile ()</H3
1752><TABLE
1753BORDER="0"
1754BGCOLOR="#D6E8FF"
1755WIDTH="100%"
1756CELLPADDING="6"
1757><TR
1758><TD
1759><PRE
1760CLASS="PROGRAMLISTING"
1761><A
1762HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1763>htmlDocPtr</A
1764> htmlParseFile (const char *filename,
1765 const char *encoding);</PRE
1766></TD
1767></TR
1768></TABLE
1769><P
1770>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1771compressed document is provided by default if found at compile-time.</P
1772><P
1773></P
1774><DIV
1775CLASS="INFORMALTABLE"
1776><P
1777></P
1778><TABLE
1779BORDER="0"
1780WIDTH="100%"
1781BGCOLOR="#FFD0D0"
1782CELLSPACING="0"
1783CELLPADDING="4"
1784CLASS="CALSTABLE"
1785><TR
1786><TD
1787WIDTH="20%"
1788ALIGN="RIGHT"
1789VALIGN="TOP"
1790><TT
1791CLASS="PARAMETER"
1792><I
1793>filename</I
1794></TT
1795>&nbsp;:</TD
1796><TD
1797WIDTH="80%"
1798ALIGN="LEFT"
1799VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001800> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001801></TR
1802><TR
1803><TD
1804WIDTH="20%"
1805ALIGN="RIGHT"
1806VALIGN="TOP"
1807><TT
1808CLASS="PARAMETER"
1809><I
1810>encoding</I
1811></TT
1812>&nbsp;:</TD
1813><TD
1814WIDTH="80%"
1815ALIGN="LEFT"
1816VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001817> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001818></TR
1819><TR
1820><TD
1821WIDTH="20%"
1822ALIGN="RIGHT"
1823VALIGN="TOP"
1824><I
1825CLASS="EMPHASIS"
1826>Returns</I
1827> :</TD
1828><TD
1829WIDTH="80%"
1830ALIGN="LEFT"
1831VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001832>the resulting document tree</TD
1833></TR
1834></TABLE
1835><P
1836></P
1837></DIV
1838></DIV
1839><HR><DIV
1840CLASS="REFSECT2"
1841><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001842NAME="AEN8958"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001843></A
1844><H3
1845><A
1846NAME="HTMLFREEPARSERCTXT"
1847></A
1848>htmlFreeParserCtxt ()</H3
1849><TABLE
1850BORDER="0"
1851BGCOLOR="#D6E8FF"
1852WIDTH="100%"
1853CELLPADDING="6"
1854><TR
1855><TD
1856><PRE
1857CLASS="PROGRAMLISTING"
1858>void htmlFreeParserCtxt (<A
1859HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1860>htmlParserCtxtPtr</A
1861> ctxt);</PRE
1862></TD
1863></TR
1864></TABLE
1865><P
1866>Free all the memory used by a parser context. However the parsed
1867document in ctxt-&gt;myDoc is not freed.</P
1868><P
1869></P
1870><DIV
1871CLASS="INFORMALTABLE"
1872><P
1873></P
1874><TABLE
1875BORDER="0"
1876WIDTH="100%"
1877BGCOLOR="#FFD0D0"
1878CELLSPACING="0"
1879CELLPADDING="4"
1880CLASS="CALSTABLE"
1881><TR
1882><TD
1883WIDTH="20%"
1884ALIGN="RIGHT"
1885VALIGN="TOP"
1886><TT
1887CLASS="PARAMETER"
1888><I
1889>ctxt</I
1890></TT
1891>&nbsp;:</TD
1892><TD
1893WIDTH="80%"
1894ALIGN="LEFT"
1895VALIGN="TOP"
1896> an HTML parser context</TD
1897></TR
1898></TABLE
1899><P
1900></P
1901></DIV
1902></DIV
1903><HR><DIV
1904CLASS="REFSECT2"
1905><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001906NAME="AEN8974"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001907></A
1908><H3
1909><A
1910NAME="HTMLCREATEPUSHPARSERCTXT"
1911></A
1912>htmlCreatePushParserCtxt ()</H3
1913><TABLE
1914BORDER="0"
1915BGCOLOR="#D6E8FF"
1916WIDTH="100%"
1917CELLPADDING="6"
1918><TR
1919><TD
1920><PRE
1921CLASS="PROGRAMLISTING"
1922><A
1923HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1924>htmlParserCtxtPtr</A
1925> htmlCreatePushParserCtxt (<A
1926HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1927>htmlSAXHandlerPtr</A
1928> sax,
1929 void *user_data,
1930 const char *chunk,
1931 int size,
1932 const char *filename,
1933 <A
1934HREF="gnome-xml-encoding.html#XMLCHARENCODING"
1935>xmlCharEncoding</A
1936> enc);</PRE
1937></TD
1938></TR
1939></TABLE
1940><P
1941>Create a parser context for using the HTML parser in push mode
1942To allow content encoding detection, <TT
1943CLASS="PARAMETER"
1944><I
1945>size</I
1946></TT
1947> should be &gt;= 4
1948The value of <TT
1949CLASS="PARAMETER"
1950><I
1951>filename</I
1952></TT
1953> is used for fetching external entities
1954and error/warning reports.</P
1955><P
1956></P
1957><DIV
1958CLASS="INFORMALTABLE"
1959><P
1960></P
1961><TABLE
1962BORDER="0"
1963WIDTH="100%"
1964BGCOLOR="#FFD0D0"
1965CELLSPACING="0"
1966CELLPADDING="4"
1967CLASS="CALSTABLE"
1968><TR
1969><TD
1970WIDTH="20%"
1971ALIGN="RIGHT"
1972VALIGN="TOP"
1973><TT
1974CLASS="PARAMETER"
1975><I
1976>sax</I
1977></TT
1978>&nbsp;:</TD
1979><TD
1980WIDTH="80%"
1981ALIGN="LEFT"
1982VALIGN="TOP"
1983> a SAX handler</TD
1984></TR
1985><TR
1986><TD
1987WIDTH="20%"
1988ALIGN="RIGHT"
1989VALIGN="TOP"
1990><TT
1991CLASS="PARAMETER"
1992><I
1993>user_data</I
1994></TT
1995>&nbsp;:</TD
1996><TD
1997WIDTH="80%"
1998ALIGN="LEFT"
1999VALIGN="TOP"
2000> The user data returned on SAX callbacks</TD
2001></TR
2002><TR
2003><TD
2004WIDTH="20%"
2005ALIGN="RIGHT"
2006VALIGN="TOP"
2007><TT
2008CLASS="PARAMETER"
2009><I
2010>chunk</I
2011></TT
2012>&nbsp;:</TD
2013><TD
2014WIDTH="80%"
2015ALIGN="LEFT"
2016VALIGN="TOP"
2017> a pointer to an array of chars</TD
2018></TR
2019><TR
2020><TD
2021WIDTH="20%"
2022ALIGN="RIGHT"
2023VALIGN="TOP"
2024><TT
2025CLASS="PARAMETER"
2026><I
2027>size</I
2028></TT
2029>&nbsp;:</TD
2030><TD
2031WIDTH="80%"
2032ALIGN="LEFT"
2033VALIGN="TOP"
2034> number of chars in the array</TD
2035></TR
2036><TR
2037><TD
2038WIDTH="20%"
2039ALIGN="RIGHT"
2040VALIGN="TOP"
2041><TT
2042CLASS="PARAMETER"
2043><I
2044>filename</I
2045></TT
2046>&nbsp;:</TD
2047><TD
2048WIDTH="80%"
2049ALIGN="LEFT"
2050VALIGN="TOP"
2051> an optional file name or URI</TD
2052></TR
2053><TR
2054><TD
2055WIDTH="20%"
2056ALIGN="RIGHT"
2057VALIGN="TOP"
2058><TT
2059CLASS="PARAMETER"
2060><I
2061>enc</I
2062></TT
2063>&nbsp;:</TD
2064><TD
2065WIDTH="80%"
2066ALIGN="LEFT"
2067VALIGN="TOP"
2068> an optional encoding</TD
2069></TR
2070><TR
2071><TD
2072WIDTH="20%"
2073ALIGN="RIGHT"
2074VALIGN="TOP"
2075><I
2076CLASS="EMPHASIS"
2077>Returns</I
2078> :</TD
2079><TD
2080WIDTH="80%"
2081ALIGN="LEFT"
2082VALIGN="TOP"
2083>the new parser context or NULL</TD
2084></TR
2085></TABLE
2086><P
2087></P
2088></DIV
2089></DIV
2090><HR><DIV
2091CLASS="REFSECT2"
2092><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +00002093NAME="AEN9018"
Daniel Veillardf3a73582000-01-05 14:58:39 +00002094></A
2095><H3
2096><A
2097NAME="HTMLPARSECHUNK"
2098></A
2099>htmlParseChunk ()</H3
2100><TABLE
2101BORDER="0"
2102BGCOLOR="#D6E8FF"
2103WIDTH="100%"
2104CELLPADDING="6"
2105><TR
2106><TD
2107><PRE
2108CLASS="PROGRAMLISTING"
2109>int htmlParseChunk (<A
2110HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
2111>htmlParserCtxtPtr</A
2112> ctxt,
2113 const char *chunk,
2114 int size,
2115 int terminate);</PRE
2116></TD
2117></TR
2118></TABLE
2119><P
2120>Parse a Chunk of memory</P
2121><P
2122></P
2123><DIV
2124CLASS="INFORMALTABLE"
2125><P
2126></P
2127><TABLE
2128BORDER="0"
2129WIDTH="100%"
2130BGCOLOR="#FFD0D0"
2131CELLSPACING="0"
2132CELLPADDING="4"
2133CLASS="CALSTABLE"
2134><TR
2135><TD
2136WIDTH="20%"
2137ALIGN="RIGHT"
2138VALIGN="TOP"
2139><TT
2140CLASS="PARAMETER"
2141><I
2142>ctxt</I
2143></TT
2144>&nbsp;:</TD
2145><TD
2146WIDTH="80%"
2147ALIGN="LEFT"
2148VALIGN="TOP"
2149> an XML parser context</TD
2150></TR
2151><TR
2152><TD
2153WIDTH="20%"
2154ALIGN="RIGHT"
2155VALIGN="TOP"
2156><TT
2157CLASS="PARAMETER"
2158><I
2159>chunk</I
2160></TT
2161>&nbsp;:</TD
2162><TD
2163WIDTH="80%"
2164ALIGN="LEFT"
2165VALIGN="TOP"
2166> an char array</TD
2167></TR
2168><TR
2169><TD
2170WIDTH="20%"
2171ALIGN="RIGHT"
2172VALIGN="TOP"
2173><TT
2174CLASS="PARAMETER"
2175><I
2176>size</I
2177></TT
2178>&nbsp;:</TD
2179><TD
2180WIDTH="80%"
2181ALIGN="LEFT"
2182VALIGN="TOP"
2183> the size in byte of the chunk</TD
2184></TR
2185><TR
2186><TD
2187WIDTH="20%"
2188ALIGN="RIGHT"
2189VALIGN="TOP"
2190><TT
2191CLASS="PARAMETER"
2192><I
2193>terminate</I
2194></TT
2195>&nbsp;:</TD
2196><TD
2197WIDTH="80%"
2198ALIGN="LEFT"
2199VALIGN="TOP"
2200> last chunk indicator</TD
2201></TR
2202><TR
2203><TD
2204WIDTH="20%"
2205ALIGN="RIGHT"
2206VALIGN="TOP"
2207><I
2208CLASS="EMPHASIS"
2209>Returns</I
2210> :</TD
2211><TD
2212WIDTH="80%"
2213ALIGN="LEFT"
2214VALIGN="TOP"
2215>zero if no error, the xmlParserErrors otherwise.</TD
Daniel Veillard437b87b2000-01-03 17:30:46 +00002216></TR
2217></TABLE
2218><P
2219></P
2220></DIV
2221></DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002222></DIV
2223><DIV
2224CLASS="NAVFOOTER"
Daniel Veillard00fdf371999-10-08 09:40:39 +00002225><BR
2226CLEAR="all"><BR><TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002227WIDTH="100%"
2228BORDER="0"
2229BGCOLOR="#000000"
2230CELLPADDING="1"
2231CELLSPACING="0"
2232><TR
2233><TD
2234WIDTH="25%"
2235BGCOLOR="#C00000"
2236ALIGN="left"
2237><A
Daniel Veillard6bd26dc1999-09-03 14:28:40 +00002238HREF="gnome-xml-xml-error.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002239><FONT
2240COLOR="#FFFFFF"
2241SIZE="3"
2242><B
2243>&#60;&#60;&#60; Previous Page</B
2244></FONT
2245></A
2246></TD
2247><TD
2248WIDTH="25%"
2249BGCOLOR="#0000C0"
2250ALIGN="center"
2251><FONT
2252COLOR="#FFFFFF"
2253SIZE="3"
2254><B
2255><A
2256HREF="book1.html"
2257><FONT
2258COLOR="#FFFFFF"
2259SIZE="3"
2260><B
2261>Home</B
2262></FONT
2263></A
2264></B
2265></FONT
2266></TD
2267><TD
2268WIDTH="25%"
2269BGCOLOR="#00C000"
2270ALIGN="center"
2271><FONT
2272COLOR="#FFFFFF"
2273SIZE="3"
2274><B
2275><A
Daniel Veillard35008381999-10-25 13:15:52 +00002276HREF="libxml-lib.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002277><FONT
2278COLOR="#FFFFFF"
2279SIZE="3"
2280><B
2281>Up</B
2282></FONT
2283></A
2284></B
2285></FONT
2286></TD
2287><TD
2288WIDTH="25%"
2289BGCOLOR="#C00000"
2290ALIGN="right"
2291><A
2292HREF="gnome-xml-htmltree.html"
2293><FONT
2294COLOR="#FFFFFF"
2295SIZE="3"
2296><B
2297>Next Page &#62;&#62;&#62;</B
2298></FONT
2299></A
2300></TD
2301></TR
2302><TR
2303><TD
2304COLSPAN="2"
2305ALIGN="left"
2306><FONT
2307COLOR="#FFFFFF"
2308SIZE="3"
2309><B
Daniel Veillard6bd26dc1999-09-03 14:28:40 +00002310>xml-error</B
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002311></FONT
2312></TD
2313><TD
2314COLSPAN="2"
2315ALIGN="right"
2316><FONT
2317COLOR="#FFFFFF"
2318SIZE="3"
2319><B
2320>HTMLtree</B
2321></FONT
2322></TD
2323></TR
2324></TABLE
2325></DIV
2326></BODY
2327></HTML
2328>