blob: 839c1152f4e1ef57bba733f08ae1c6a2a2e701bb [file] [log] [blame]
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001<HTML
2><HEAD
3><TITLE
4>HTMLparser</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
8REL="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
114>HTMLparser</H1
115><DIV
116CLASS="REFNAMEDIV"
117><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000118NAME="AEN7845"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000119></A
120><H2
121>Name</H2
122>HTMLparser &#8212; </DIV
123><DIV
124CLASS="REFSYNOPSISDIV"
125><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000126NAME="AEN7848"
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>;
177<GTKDOCLINK
178HREF="HTMLELEMDESCPTR"
179>htmlElemDescPtr</GTKDOCLINK
180> <A
181HREF="gnome-xml-htmlparser.html#HTMLTAGLOOKUP"
182>htmlTagLookup</A
183> (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000184HREF="gnome-xml-tree.html#XMLCHAR"
185>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000186> *tag);
187<GTKDOCLINK
188HREF="HTMLENTITYDESCPTR"
189>htmlEntityDescPtr</GTKDOCLINK
190> <A
191HREF="gnome-xml-htmlparser.html#HTMLENTITYLOOKUP"
192>htmlEntityLookup</A
193> (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000194HREF="gnome-xml-tree.html#XMLCHAR"
195>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000196> *name);
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000197int <A
198HREF="gnome-xml-htmlparser.html#HTMLISAUTOCLOSED"
199>htmlIsAutoClosed</A
200> (<A
201HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
202>htmlDocPtr</A
203> doc,
204 <A
205HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
206>htmlNodePtr</A
207> elem);
208int <A
209HREF="gnome-xml-htmlparser.html#HTMLAUTOCLOSETAG"
210>htmlAutoCloseTag</A
211> (<A
212HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
213>htmlDocPtr</A
214> doc,
215 const <A
216HREF="gnome-xml-tree.html#XMLCHAR"
217>xmlChar</A
218> *name,
219 <A
220HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
221>htmlNodePtr</A
222> elem);
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000223<GTKDOCLINK
224HREF="HTMLENTITYDESCPTR"
225>htmlEntityDescPtr</GTKDOCLINK
226> <A
227HREF="gnome-xml-htmlparser.html#HTMLPARSEENTITYREF"
228>htmlParseEntityRef</A
229> (<A
230HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
231>htmlParserCtxtPtr</A
232> ctxt,
233 <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000234HREF="gnome-xml-tree.html#XMLCHAR"
235>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000236> **str);
237int <A
238HREF="gnome-xml-htmlparser.html#HTMLPARSECHARREF"
239>htmlParseCharRef</A
240> (<A
241HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
242>htmlParserCtxtPtr</A
243> ctxt);
244void <A
245HREF="gnome-xml-htmlparser.html#HTMLPARSEELEMENT"
246>htmlParseElement</A
247> (<A
248HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
249>htmlParserCtxtPtr</A
250> ctxt);
251<A
252HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
253>htmlDocPtr</A
254> <A
255HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEDOC"
256>htmlSAXParseDoc</A
257> (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000258HREF="gnome-xml-tree.html#XMLCHAR"
259>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000260> *cur,
261 const char *encoding,
262 <A
263HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
264>htmlSAXHandlerPtr</A
265> sax,
266 void *userData);
267<A
268HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
269>htmlDocPtr</A
270> <A
271HREF="gnome-xml-htmlparser.html#HTMLPARSEDOC"
272>htmlParseDoc</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#HTMLDOCPTR"
280>htmlDocPtr</A
281> <A
282HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEFILE"
283>htmlSAXParseFile</A
284> (const char *filename,
285 const char *encoding,
286 <A
287HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
288>htmlSAXHandlerPtr</A
289> sax,
290 void *userData);
291<A
292HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
293>htmlDocPtr</A
294> <A
295HREF="gnome-xml-htmlparser.html#HTMLPARSEFILE"
296>htmlParseFile</A
297> (const char *filename,
Daniel Veillard437b87b2000-01-03 17:30:46 +0000298 const char *encoding);
299void <A
300HREF="gnome-xml-htmlparser.html#HTMLFREEPARSERCTXT"
301>htmlFreeParserCtxt</A
302> (<A
303HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
304>htmlParserCtxtPtr</A
305> ctxt);
306<A
307HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
308>htmlParserCtxtPtr</A
309> <A
310HREF="gnome-xml-htmlparser.html#HTMLCREATEPUSHPARSERCTXT"
311>htmlCreatePushParserCtxt</A
312> (<A
313HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
314>htmlSAXHandlerPtr</A
315> sax,
316 void *user_data,
317 const char *chunk,
318 int size,
319 const char *filename,
320 <A
321HREF="gnome-xml-encoding.html#XMLCHARENCODING"
322>xmlCharEncoding</A
323> enc);
324int <A
325HREF="gnome-xml-htmlparser.html#HTMLPARSECHUNK"
326>htmlParseChunk</A
327> (<A
328HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
329>htmlParserCtxtPtr</A
330> ctxt,
331 const char *chunk,
332 int size,
333 int terminate);</PRE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000334></TD
335></TR
336></TABLE
337></DIV
338><DIV
339CLASS="REFSECT1"
340><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000341NAME="AEN7901"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000342></A
343><H2
344>Description</H2
345><P
346></P
347></DIV
348><DIV
349CLASS="REFSECT1"
350><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000351NAME="AEN7904"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000352></A
353><H2
354>Details</H2
355><DIV
356CLASS="REFSECT2"
357><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000358NAME="AEN7906"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000359></A
360><H3
361><A
362NAME="HTMLPARSERCTXT"
363></A
364>htmlParserCtxt</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000365><TABLE
366BORDER="0"
367BGCOLOR="#D6E8FF"
368WIDTH="100%"
369CELLPADDING="6"
370><TR
371><TD
372><PRE
373CLASS="PROGRAMLISTING"
374>typedef xmlParserCtxt htmlParserCtxt;</PRE
375></TD
376></TR
377></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000378><P
379></P
380></DIV
381><HR><DIV
382CLASS="REFSECT2"
383><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000384NAME="AEN7911"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000385></A
386><H3
387><A
388NAME="HTMLPARSERCTXTPTR"
389></A
390>htmlParserCtxtPtr</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000391><TABLE
392BORDER="0"
393BGCOLOR="#D6E8FF"
394WIDTH="100%"
395CELLPADDING="6"
396><TR
397><TD
398><PRE
399CLASS="PROGRAMLISTING"
400>typedef xmlParserCtxtPtr htmlParserCtxtPtr;</PRE
401></TD
402></TR
403></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000404><P
405></P
406></DIV
407><HR><DIV
408CLASS="REFSECT2"
409><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000410NAME="AEN7916"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000411></A
412><H3
413><A
414NAME="HTMLPARSERNODEINFO"
415></A
416>htmlParserNodeInfo</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000417><TABLE
418BORDER="0"
419BGCOLOR="#D6E8FF"
420WIDTH="100%"
421CELLPADDING="6"
422><TR
423><TD
424><PRE
425CLASS="PROGRAMLISTING"
426>typedef xmlParserNodeInfo htmlParserNodeInfo;</PRE
427></TD
428></TR
429></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000430><P
431></P
432></DIV
433><HR><DIV
434CLASS="REFSECT2"
435><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000436NAME="AEN7921"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000437></A
438><H3
439><A
440NAME="HTMLSAXHANDLER"
441></A
442>htmlSAXHandler</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000443><TABLE
444BORDER="0"
445BGCOLOR="#D6E8FF"
446WIDTH="100%"
447CELLPADDING="6"
448><TR
449><TD
450><PRE
451CLASS="PROGRAMLISTING"
452>typedef xmlSAXHandler htmlSAXHandler;</PRE
453></TD
454></TR
455></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000456><P
457></P
458></DIV
459><HR><DIV
460CLASS="REFSECT2"
461><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000462NAME="AEN7926"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000463></A
464><H3
465><A
466NAME="HTMLSAXHANDLERPTR"
467></A
468>htmlSAXHandlerPtr</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000469><TABLE
470BORDER="0"
471BGCOLOR="#D6E8FF"
472WIDTH="100%"
473CELLPADDING="6"
474><TR
475><TD
476><PRE
477CLASS="PROGRAMLISTING"
478>typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;</PRE
479></TD
480></TR
481></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000482><P
483></P
484></DIV
485><HR><DIV
486CLASS="REFSECT2"
487><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000488NAME="AEN7931"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000489></A
490><H3
491><A
492NAME="HTMLPARSERINPUT"
493></A
494>htmlParserInput</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000495><TABLE
496BORDER="0"
497BGCOLOR="#D6E8FF"
498WIDTH="100%"
499CELLPADDING="6"
500><TR
501><TD
502><PRE
503CLASS="PROGRAMLISTING"
504>typedef xmlParserInput htmlParserInput;</PRE
505></TD
506></TR
507></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000508><P
509></P
510></DIV
511><HR><DIV
512CLASS="REFSECT2"
513><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000514NAME="AEN7936"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000515></A
516><H3
517><A
518NAME="HTMLPARSERINPUTPTR"
519></A
520>htmlParserInputPtr</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000521><TABLE
522BORDER="0"
523BGCOLOR="#D6E8FF"
524WIDTH="100%"
525CELLPADDING="6"
526><TR
527><TD
528><PRE
529CLASS="PROGRAMLISTING"
530>typedef xmlParserInputPtr htmlParserInputPtr;</PRE
531></TD
532></TR
533></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000534><P
535></P
536></DIV
537><HR><DIV
538CLASS="REFSECT2"
539><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000540NAME="AEN7941"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000541></A
542><H3
543><A
544NAME="HTMLDOCPTR"
545></A
546>htmlDocPtr</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000547><TABLE
548BORDER="0"
549BGCOLOR="#D6E8FF"
550WIDTH="100%"
551CELLPADDING="6"
552><TR
553><TD
554><PRE
555CLASS="PROGRAMLISTING"
556>typedef xmlDocPtr htmlDocPtr;</PRE
557></TD
558></TR
559></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000560><P
561></P
562></DIV
563><HR><DIV
564CLASS="REFSECT2"
565><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000566NAME="AEN7946"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000567></A
568><H3
569><A
570NAME="HTMLNODEPTR"
571></A
572>htmlNodePtr</H3
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000573><TABLE
574BORDER="0"
575BGCOLOR="#D6E8FF"
576WIDTH="100%"
577CELLPADDING="6"
578><TR
579><TD
580><PRE
581CLASS="PROGRAMLISTING"
582>typedef xmlNodePtr htmlNodePtr;</PRE
583></TD
584></TR
585></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000586><P
587></P
588></DIV
589><HR><DIV
590CLASS="REFSECT2"
591><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000592NAME="AEN7951"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000593></A
594><H3
595><A
596NAME="HTMLTAGLOOKUP"
597></A
598>htmlTagLookup ()</H3
599><TABLE
600BORDER="0"
601BGCOLOR="#D6E8FF"
602WIDTH="100%"
603CELLPADDING="6"
604><TR
605><TD
606><PRE
607CLASS="PROGRAMLISTING"
608><GTKDOCLINK
609HREF="HTMLELEMDESCPTR"
610>htmlElemDescPtr</GTKDOCLINK
611> htmlTagLookup (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000612HREF="gnome-xml-tree.html#XMLCHAR"
613>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000614> *tag);</PRE
615></TD
616></TR
617></TABLE
618><P
619>Lookup the HTML tag in the ElementTable</P
620><P
621></P
622><DIV
623CLASS="INFORMALTABLE"
624><P
625></P
626><TABLE
627BORDER="0"
628WIDTH="100%"
629BGCOLOR="#FFD0D0"
630CELLSPACING="0"
631CELLPADDING="4"
632CLASS="CALSTABLE"
633><TR
634><TD
635WIDTH="20%"
636ALIGN="RIGHT"
637VALIGN="TOP"
638><TT
639CLASS="PARAMETER"
640><I
641>tag</I
642></TT
643>&nbsp;:</TD
644><TD
645WIDTH="80%"
646ALIGN="LEFT"
647VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000648> The tag name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000649></TR
650><TR
651><TD
652WIDTH="20%"
653ALIGN="RIGHT"
654VALIGN="TOP"
655><I
656CLASS="EMPHASIS"
657>Returns</I
658> :</TD
659><TD
660WIDTH="80%"
661ALIGN="LEFT"
662VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000663>the related htmlElemDescPtr or NULL if not found.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000664></TR
665></TABLE
666><P
667></P
668></DIV
669></DIV
670><HR><DIV
671CLASS="REFSECT2"
672><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000673NAME="AEN7972"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000674></A
675><H3
676><A
677NAME="HTMLENTITYLOOKUP"
678></A
679>htmlEntityLookup ()</H3
680><TABLE
681BORDER="0"
682BGCOLOR="#D6E8FF"
683WIDTH="100%"
684CELLPADDING="6"
685><TR
686><TD
687><PRE
688CLASS="PROGRAMLISTING"
689><GTKDOCLINK
690HREF="HTMLENTITYDESCPTR"
691>htmlEntityDescPtr</GTKDOCLINK
692> htmlEntityLookup (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000693HREF="gnome-xml-tree.html#XMLCHAR"
694>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000695> *name);</PRE
696></TD
697></TR
698></TABLE
699><P
700>Lookup the given entity in EntitiesTable</P
701><P
702>TODO: the linear scan is really ugly, an hash table is really needed.</P
703><P
704></P
705><DIV
706CLASS="INFORMALTABLE"
707><P
708></P
709><TABLE
710BORDER="0"
711WIDTH="100%"
712BGCOLOR="#FFD0D0"
713CELLSPACING="0"
714CELLPADDING="4"
715CLASS="CALSTABLE"
716><TR
717><TD
718WIDTH="20%"
719ALIGN="RIGHT"
720VALIGN="TOP"
721><TT
722CLASS="PARAMETER"
723><I
724>name</I
725></TT
726>&nbsp;:</TD
727><TD
728WIDTH="80%"
729ALIGN="LEFT"
730VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000731> the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000732></TR
733><TR
734><TD
735WIDTH="20%"
736ALIGN="RIGHT"
737VALIGN="TOP"
738><I
739CLASS="EMPHASIS"
740>Returns</I
741> :</TD
742><TD
743WIDTH="80%"
744ALIGN="LEFT"
745VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000746>the associated htmlEntityDescPtr if found, NULL otherwise.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000747></TR
748></TABLE
749><P
750></P
751></DIV
752></DIV
753><HR><DIV
754CLASS="REFSECT2"
755><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000756NAME="AEN7994"
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000757></A
758><H3
759><A
760NAME="HTMLISAUTOCLOSED"
761></A
762>htmlIsAutoClosed ()</H3
763><TABLE
764BORDER="0"
765BGCOLOR="#D6E8FF"
766WIDTH="100%"
767CELLPADDING="6"
768><TR
769><TD
770><PRE
771CLASS="PROGRAMLISTING"
772>int htmlIsAutoClosed (<A
773HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
774>htmlDocPtr</A
775> doc,
776 <A
777HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
778>htmlNodePtr</A
779> elem);</PRE
780></TD
781></TR
782></TABLE
783><P
784>The HTmL DtD allows a tag to implicitely close other tags.
785The list is kept in htmlStartClose array. This function checks
786if a tag is autoclosed by one of it's child</P
787><P
788></P
789><DIV
790CLASS="INFORMALTABLE"
791><P
792></P
793><TABLE
794BORDER="0"
795WIDTH="100%"
796BGCOLOR="#FFD0D0"
797CELLSPACING="0"
798CELLPADDING="4"
799CLASS="CALSTABLE"
800><TR
801><TD
802WIDTH="20%"
803ALIGN="RIGHT"
804VALIGN="TOP"
805><TT
806CLASS="PARAMETER"
807><I
808>doc</I
809></TT
810>&nbsp;:</TD
811><TD
812WIDTH="80%"
813ALIGN="LEFT"
814VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000815> the HTML document</TD
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000816></TR
817><TR
818><TD
819WIDTH="20%"
820ALIGN="RIGHT"
821VALIGN="TOP"
822><TT
823CLASS="PARAMETER"
824><I
825>elem</I
826></TT
827>&nbsp;:</TD
828><TD
829WIDTH="80%"
830ALIGN="LEFT"
831VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000832> the HTML element</TD
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000833></TR
834><TR
835><TD
836WIDTH="20%"
837ALIGN="RIGHT"
838VALIGN="TOP"
839><I
840CLASS="EMPHASIS"
841>Returns</I
842> :</TD
843><TD
844WIDTH="80%"
845ALIGN="LEFT"
846VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000847>1 if autoclosed, 0 otherwise</TD
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000848></TR
849></TABLE
850><P
851></P
852></DIV
853></DIV
854><HR><DIV
855CLASS="REFSECT2"
856><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000857NAME="AEN8019"
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000858></A
859><H3
860><A
861NAME="HTMLAUTOCLOSETAG"
862></A
863>htmlAutoCloseTag ()</H3
864><TABLE
865BORDER="0"
866BGCOLOR="#D6E8FF"
867WIDTH="100%"
868CELLPADDING="6"
869><TR
870><TD
871><PRE
872CLASS="PROGRAMLISTING"
873>int htmlAutoCloseTag (<A
874HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
875>htmlDocPtr</A
876> doc,
877 const <A
878HREF="gnome-xml-tree.html#XMLCHAR"
879>xmlChar</A
880> *name,
881 <A
882HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
883>htmlNodePtr</A
884> elem);</PRE
885></TD
886></TR
887></TABLE
888><P
889>The HTmL DtD allows a tag to implicitely close other tags.
890The list is kept in htmlStartClose array. This function checks
891if the element or one of it's children would autoclose the
892given tag.</P
893><P
894></P
895><DIV
896CLASS="INFORMALTABLE"
897><P
898></P
899><TABLE
900BORDER="0"
901WIDTH="100%"
902BGCOLOR="#FFD0D0"
903CELLSPACING="0"
904CELLPADDING="4"
905CLASS="CALSTABLE"
906><TR
907><TD
908WIDTH="20%"
909ALIGN="RIGHT"
910VALIGN="TOP"
911><TT
912CLASS="PARAMETER"
913><I
914>doc</I
915></TT
916>&nbsp;:</TD
917><TD
918WIDTH="80%"
919ALIGN="LEFT"
920VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000921> the HTML document</TD
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000922></TR
923><TR
924><TD
925WIDTH="20%"
926ALIGN="RIGHT"
927VALIGN="TOP"
928><TT
929CLASS="PARAMETER"
930><I
931>name</I
932></TT
933>&nbsp;:</TD
934><TD
935WIDTH="80%"
936ALIGN="LEFT"
937VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000938> The tag name</TD
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000939></TR
940><TR
941><TD
942WIDTH="20%"
943ALIGN="RIGHT"
944VALIGN="TOP"
945><TT
946CLASS="PARAMETER"
947><I
948>elem</I
949></TT
950>&nbsp;:</TD
951><TD
952WIDTH="80%"
953ALIGN="LEFT"
954VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000955> the HTML element</TD
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000956></TR
957><TR
958><TD
959WIDTH="20%"
960ALIGN="RIGHT"
961VALIGN="TOP"
962><I
963CLASS="EMPHASIS"
964>Returns</I
965> :</TD
966><TD
967WIDTH="80%"
968ALIGN="LEFT"
969VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +0000970>1 if autoclose, 0 otherwise</TD
Daniel Veillard5cb5ab81999-12-21 15:35:29 +0000971></TR
972></TABLE
973><P
974></P
975></DIV
976></DIV
977><HR><DIV
978CLASS="REFSECT2"
979><A
Daniel Veillard437b87b2000-01-03 17:30:46 +0000980NAME="AEN8049"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000981></A
982><H3
983><A
984NAME="HTMLPARSEENTITYREF"
985></A
986>htmlParseEntityRef ()</H3
987><TABLE
988BORDER="0"
989BGCOLOR="#D6E8FF"
990WIDTH="100%"
991CELLPADDING="6"
992><TR
993><TD
994><PRE
995CLASS="PROGRAMLISTING"
996><GTKDOCLINK
997HREF="HTMLENTITYDESCPTR"
998>htmlEntityDescPtr</GTKDOCLINK
999> htmlParseEntityRef (<A
1000HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1001>htmlParserCtxtPtr</A
1002> ctxt,
1003 <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001004HREF="gnome-xml-tree.html#XMLCHAR"
1005>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001006> **str);</PRE
1007></TD
1008></TR
1009></TABLE
1010><P
1011>parse an HTML ENTITY references</P
1012><P
1013>[68] EntityRef ::= '&amp;' Name ';'</P
1014><P
1015></P
1016><DIV
1017CLASS="INFORMALTABLE"
1018><P
1019></P
1020><TABLE
1021BORDER="0"
1022WIDTH="100%"
1023BGCOLOR="#FFD0D0"
1024CELLSPACING="0"
1025CELLPADDING="4"
1026CLASS="CALSTABLE"
1027><TR
1028><TD
1029WIDTH="20%"
1030ALIGN="RIGHT"
1031VALIGN="TOP"
1032><TT
1033CLASS="PARAMETER"
1034><I
1035>ctxt</I
1036></TT
1037>&nbsp;:</TD
1038><TD
1039WIDTH="80%"
1040ALIGN="LEFT"
1041VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001042> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001043></TR
1044><TR
1045><TD
1046WIDTH="20%"
1047ALIGN="RIGHT"
1048VALIGN="TOP"
1049><TT
1050CLASS="PARAMETER"
1051><I
1052>str</I
1053></TT
1054>&nbsp;:</TD
1055><TD
1056WIDTH="80%"
1057ALIGN="LEFT"
1058VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001059> location to store the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001060></TR
1061><TR
1062><TD
1063WIDTH="20%"
1064ALIGN="RIGHT"
1065VALIGN="TOP"
1066><I
1067CLASS="EMPHASIS"
1068>Returns</I
1069> :</TD
1070><TD
1071WIDTH="80%"
1072ALIGN="LEFT"
1073VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001074>the associated htmlEntityDescPtr if found, or NULL otherwise,
1075if non-NULL *str will have to be freed by the caller.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001076></TR
1077></TABLE
1078><P
1079></P
1080></DIV
1081></DIV
1082><HR><DIV
1083CLASS="REFSECT2"
1084><A
Daniel Veillard437b87b2000-01-03 17:30:46 +00001085NAME="AEN8076"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001086></A
1087><H3
1088><A
1089NAME="HTMLPARSECHARREF"
1090></A
1091>htmlParseCharRef ()</H3
1092><TABLE
1093BORDER="0"
1094BGCOLOR="#D6E8FF"
1095WIDTH="100%"
1096CELLPADDING="6"
1097><TR
1098><TD
1099><PRE
1100CLASS="PROGRAMLISTING"
1101>int htmlParseCharRef (<A
1102HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1103>htmlParserCtxtPtr</A
1104> ctxt);</PRE
1105></TD
1106></TR
1107></TABLE
1108><P
1109>parse Reference declarations</P
1110><P
1111>[66] CharRef ::= '&amp;#' [0-9]+ ';' |
1112'&amp;<GTKDOCLINK
1113HREF="X"
1114>x</GTKDOCLINK
1115>' [0-9a-fA-F]+ ';'</P
1116><P
1117></P
1118><DIV
1119CLASS="INFORMALTABLE"
1120><P
1121></P
1122><TABLE
1123BORDER="0"
1124WIDTH="100%"
1125BGCOLOR="#FFD0D0"
1126CELLSPACING="0"
1127CELLPADDING="4"
1128CLASS="CALSTABLE"
1129><TR
1130><TD
1131WIDTH="20%"
1132ALIGN="RIGHT"
1133VALIGN="TOP"
1134><TT
1135CLASS="PARAMETER"
1136><I
1137>ctxt</I
1138></TT
1139>&nbsp;:</TD
1140><TD
1141WIDTH="80%"
1142ALIGN="LEFT"
1143VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001144> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001145></TR
1146><TR
1147><TD
1148WIDTH="20%"
1149ALIGN="RIGHT"
1150VALIGN="TOP"
1151><I
1152CLASS="EMPHASIS"
1153>Returns</I
1154> :</TD
1155><TD
1156WIDTH="80%"
1157ALIGN="LEFT"
1158VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001159>the value parsed (as an int)</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001160></TR
1161></TABLE
1162><P
1163></P
1164></DIV
1165></DIV
1166><HR><DIV
1167CLASS="REFSECT2"
1168><A
Daniel Veillard437b87b2000-01-03 17:30:46 +00001169NAME="AEN8098"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001170></A
1171><H3
1172><A
1173NAME="HTMLPARSEELEMENT"
1174></A
1175>htmlParseElement ()</H3
1176><TABLE
1177BORDER="0"
1178BGCOLOR="#D6E8FF"
1179WIDTH="100%"
1180CELLPADDING="6"
1181><TR
1182><TD
1183><PRE
1184CLASS="PROGRAMLISTING"
1185>void htmlParseElement (<A
1186HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1187>htmlParserCtxtPtr</A
1188> ctxt);</PRE
1189></TD
1190></TR
1191></TABLE
1192><P
1193>parse an HTML element, this is highly recursive</P
1194><P
1195>[39] element ::= EmptyElemTag | STag content ETag</P
1196><P
1197>[41] Attribute ::= Name Eq AttValue</P
1198><P
1199></P
1200><DIV
1201CLASS="INFORMALTABLE"
1202><P
1203></P
1204><TABLE
1205BORDER="0"
1206WIDTH="100%"
1207BGCOLOR="#FFD0D0"
1208CELLSPACING="0"
1209CELLPADDING="4"
1210CLASS="CALSTABLE"
1211><TR
1212><TD
1213WIDTH="20%"
1214ALIGN="RIGHT"
1215VALIGN="TOP"
1216><TT
1217CLASS="PARAMETER"
1218><I
1219>ctxt</I
1220></TT
1221>&nbsp;:</TD
1222><TD
1223WIDTH="80%"
1224ALIGN="LEFT"
1225VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001226> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001227></TR
1228></TABLE
1229><P
1230></P
1231></DIV
1232></DIV
1233><HR><DIV
1234CLASS="REFSECT2"
1235><A
Daniel Veillard437b87b2000-01-03 17:30:46 +00001236NAME="AEN8116"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001237></A
1238><H3
1239><A
1240NAME="HTMLSAXPARSEDOC"
1241></A
1242>htmlSAXParseDoc ()</H3
1243><TABLE
1244BORDER="0"
1245BGCOLOR="#D6E8FF"
1246WIDTH="100%"
1247CELLPADDING="6"
1248><TR
1249><TD
1250><PRE
1251CLASS="PROGRAMLISTING"
1252><A
1253HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1254>htmlDocPtr</A
1255> htmlSAXParseDoc (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001256HREF="gnome-xml-tree.html#XMLCHAR"
1257>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001258> *cur,
1259 const char *encoding,
1260 <A
1261HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1262>htmlSAXHandlerPtr</A
1263> sax,
1264 void *userData);</PRE
1265></TD
1266></TR
1267></TABLE
1268><P
1269>parse an HTML in-memory document and build a tree.
1270It use the given SAX function block to handle the parsing callback.
1271If sax is NULL, fallback to the default DOM tree building routines.</P
1272><P
1273></P
1274><DIV
1275CLASS="INFORMALTABLE"
1276><P
1277></P
1278><TABLE
1279BORDER="0"
1280WIDTH="100%"
1281BGCOLOR="#FFD0D0"
1282CELLSPACING="0"
1283CELLPADDING="4"
1284CLASS="CALSTABLE"
1285><TR
1286><TD
1287WIDTH="20%"
1288ALIGN="RIGHT"
1289VALIGN="TOP"
1290><TT
1291CLASS="PARAMETER"
1292><I
1293>cur</I
1294></TT
1295>&nbsp;:</TD
1296><TD
1297WIDTH="80%"
1298ALIGN="LEFT"
1299VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001300> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001301></TR
1302><TR
1303><TD
1304WIDTH="20%"
1305ALIGN="RIGHT"
1306VALIGN="TOP"
1307><TT
1308CLASS="PARAMETER"
1309><I
1310>encoding</I
1311></TT
1312>&nbsp;:</TD
1313><TD
1314WIDTH="80%"
1315ALIGN="LEFT"
1316VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001317> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001318></TR
1319><TR
1320><TD
1321WIDTH="20%"
1322ALIGN="RIGHT"
1323VALIGN="TOP"
1324><TT
1325CLASS="PARAMETER"
1326><I
1327>sax</I
1328></TT
1329>&nbsp;:</TD
1330><TD
1331WIDTH="80%"
1332ALIGN="LEFT"
1333VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001334> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001335></TR
1336><TR
1337><TD
1338WIDTH="20%"
1339ALIGN="RIGHT"
1340VALIGN="TOP"
1341><TT
1342CLASS="PARAMETER"
1343><I
1344>userData</I
1345></TT
1346>&nbsp;:</TD
1347><TD
1348WIDTH="80%"
1349ALIGN="LEFT"
1350VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001351> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001352></TR
1353><TR
1354><TD
1355WIDTH="20%"
1356ALIGN="RIGHT"
1357VALIGN="TOP"
1358><I
1359CLASS="EMPHASIS"
1360>Returns</I
1361> :</TD
1362><TD
1363WIDTH="80%"
1364ALIGN="LEFT"
1365VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001366>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001367></TR
1368></TABLE
1369><P
1370></P
1371></DIV
1372></DIV
1373><HR><DIV
1374CLASS="REFSECT2"
1375><A
Daniel Veillard437b87b2000-01-03 17:30:46 +00001376NAME="AEN8150"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001377></A
1378><H3
1379><A
1380NAME="HTMLPARSEDOC"
1381></A
1382>htmlParseDoc ()</H3
1383><TABLE
1384BORDER="0"
1385BGCOLOR="#D6E8FF"
1386WIDTH="100%"
1387CELLPADDING="6"
1388><TR
1389><TD
1390><PRE
1391CLASS="PROGRAMLISTING"
1392><A
1393HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1394>htmlDocPtr</A
1395> htmlParseDoc (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001396HREF="gnome-xml-tree.html#XMLCHAR"
1397>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001398> *cur,
1399 const char *encoding);</PRE
1400></TD
1401></TR
1402></TABLE
1403><P
1404>parse an HTML in-memory document and build a tree.</P
1405><P
1406></P
1407><DIV
1408CLASS="INFORMALTABLE"
1409><P
1410></P
1411><TABLE
1412BORDER="0"
1413WIDTH="100%"
1414BGCOLOR="#FFD0D0"
1415CELLSPACING="0"
1416CELLPADDING="4"
1417CLASS="CALSTABLE"
1418><TR
1419><TD
1420WIDTH="20%"
1421ALIGN="RIGHT"
1422VALIGN="TOP"
1423><TT
1424CLASS="PARAMETER"
1425><I
1426>cur</I
1427></TT
1428>&nbsp;:</TD
1429><TD
1430WIDTH="80%"
1431ALIGN="LEFT"
1432VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001433> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001434></TR
1435><TR
1436><TD
1437WIDTH="20%"
1438ALIGN="RIGHT"
1439VALIGN="TOP"
1440><TT
1441CLASS="PARAMETER"
1442><I
1443>encoding</I
1444></TT
1445>&nbsp;:</TD
1446><TD
1447WIDTH="80%"
1448ALIGN="LEFT"
1449VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001450> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001451></TR
1452><TR
1453><TD
1454WIDTH="20%"
1455ALIGN="RIGHT"
1456VALIGN="TOP"
1457><I
1458CLASS="EMPHASIS"
1459>Returns</I
1460> :</TD
1461><TD
1462WIDTH="80%"
1463ALIGN="LEFT"
1464VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001465>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001466></TR
1467></TABLE
1468><P
1469></P
1470></DIV
1471></DIV
1472><HR><DIV
1473CLASS="REFSECT2"
1474><A
Daniel Veillard437b87b2000-01-03 17:30:46 +00001475NAME="AEN8175"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001476></A
1477><H3
1478><A
1479NAME="HTMLSAXPARSEFILE"
1480></A
1481>htmlSAXParseFile ()</H3
1482><TABLE
1483BORDER="0"
1484BGCOLOR="#D6E8FF"
1485WIDTH="100%"
1486CELLPADDING="6"
1487><TR
1488><TD
1489><PRE
1490CLASS="PROGRAMLISTING"
1491><A
1492HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1493>htmlDocPtr</A
1494> htmlSAXParseFile (const char *filename,
1495 const char *encoding,
1496 <A
1497HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1498>htmlSAXHandlerPtr</A
1499> sax,
1500 void *userData);</PRE
1501></TD
1502></TR
1503></TABLE
1504><P
1505>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1506compressed document is provided by default if found at compile-time.
1507It use the given SAX function block to handle the parsing callback.
1508If sax is NULL, fallback to the default DOM tree building routines.</P
1509><P
1510></P
1511><DIV
1512CLASS="INFORMALTABLE"
1513><P
1514></P
1515><TABLE
1516BORDER="0"
1517WIDTH="100%"
1518BGCOLOR="#FFD0D0"
1519CELLSPACING="0"
1520CELLPADDING="4"
1521CLASS="CALSTABLE"
1522><TR
1523><TD
1524WIDTH="20%"
1525ALIGN="RIGHT"
1526VALIGN="TOP"
1527><TT
1528CLASS="PARAMETER"
1529><I
1530>filename</I
1531></TT
1532>&nbsp;:</TD
1533><TD
1534WIDTH="80%"
1535ALIGN="LEFT"
1536VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001537> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001538></TR
1539><TR
1540><TD
1541WIDTH="20%"
1542ALIGN="RIGHT"
1543VALIGN="TOP"
1544><TT
1545CLASS="PARAMETER"
1546><I
1547>encoding</I
1548></TT
1549>&nbsp;:</TD
1550><TD
1551WIDTH="80%"
1552ALIGN="LEFT"
1553VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001554> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001555></TR
1556><TR
1557><TD
1558WIDTH="20%"
1559ALIGN="RIGHT"
1560VALIGN="TOP"
1561><TT
1562CLASS="PARAMETER"
1563><I
1564>sax</I
1565></TT
1566>&nbsp;:</TD
1567><TD
1568WIDTH="80%"
1569ALIGN="LEFT"
1570VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001571> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001572></TR
1573><TR
1574><TD
1575WIDTH="20%"
1576ALIGN="RIGHT"
1577VALIGN="TOP"
1578><TT
1579CLASS="PARAMETER"
1580><I
1581>userData</I
1582></TT
1583>&nbsp;:</TD
1584><TD
1585WIDTH="80%"
1586ALIGN="LEFT"
1587VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001588> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001589></TR
1590><TR
1591><TD
1592WIDTH="20%"
1593ALIGN="RIGHT"
1594VALIGN="TOP"
1595><I
1596CLASS="EMPHASIS"
1597>Returns</I
1598> :</TD
1599><TD
1600WIDTH="80%"
1601ALIGN="LEFT"
1602VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001603>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001604></TR
1605></TABLE
1606><P
1607></P
1608></DIV
1609></DIV
1610><HR><DIV
1611CLASS="REFSECT2"
1612><A
Daniel Veillard437b87b2000-01-03 17:30:46 +00001613NAME="AEN8208"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001614></A
1615><H3
1616><A
1617NAME="HTMLPARSEFILE"
1618></A
1619>htmlParseFile ()</H3
1620><TABLE
1621BORDER="0"
1622BGCOLOR="#D6E8FF"
1623WIDTH="100%"
1624CELLPADDING="6"
1625><TR
1626><TD
1627><PRE
1628CLASS="PROGRAMLISTING"
1629><A
1630HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1631>htmlDocPtr</A
1632> htmlParseFile (const char *filename,
1633 const char *encoding);</PRE
1634></TD
1635></TR
1636></TABLE
1637><P
1638>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1639compressed document is provided by default if found at compile-time.</P
1640><P
1641></P
1642><DIV
1643CLASS="INFORMALTABLE"
1644><P
1645></P
1646><TABLE
1647BORDER="0"
1648WIDTH="100%"
1649BGCOLOR="#FFD0D0"
1650CELLSPACING="0"
1651CELLPADDING="4"
1652CLASS="CALSTABLE"
1653><TR
1654><TD
1655WIDTH="20%"
1656ALIGN="RIGHT"
1657VALIGN="TOP"
1658><TT
1659CLASS="PARAMETER"
1660><I
1661>filename</I
1662></TT
1663>&nbsp;:</TD
1664><TD
1665WIDTH="80%"
1666ALIGN="LEFT"
1667VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001668> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001669></TR
1670><TR
1671><TD
1672WIDTH="20%"
1673ALIGN="RIGHT"
1674VALIGN="TOP"
1675><TT
1676CLASS="PARAMETER"
1677><I
1678>encoding</I
1679></TT
1680>&nbsp;:</TD
1681><TD
1682WIDTH="80%"
1683ALIGN="LEFT"
1684VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001685> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001686></TR
1687><TR
1688><TD
1689WIDTH="20%"
1690ALIGN="RIGHT"
1691VALIGN="TOP"
1692><I
1693CLASS="EMPHASIS"
1694>Returns</I
1695> :</TD
1696><TD
1697WIDTH="80%"
1698ALIGN="LEFT"
1699VALIGN="TOP"
Daniel Veillardbe849cf1999-12-28 16:43:59 +00001700>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001701></TR
1702></TABLE
1703><P
1704></P
1705></DIV
1706></DIV
Daniel Veillard437b87b2000-01-03 17:30:46 +00001707><HR><DIV
1708CLASS="REFSECT2"
1709><A
1710NAME="AEN8232"
1711></A
1712><H3
1713><A
1714NAME="HTMLFREEPARSERCTXT"
1715></A
1716>htmlFreeParserCtxt ()</H3
1717><TABLE
1718BORDER="0"
1719BGCOLOR="#D6E8FF"
1720WIDTH="100%"
1721CELLPADDING="6"
1722><TR
1723><TD
1724><PRE
1725CLASS="PROGRAMLISTING"
1726>void htmlFreeParserCtxt (<A
1727HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1728>htmlParserCtxtPtr</A
1729> ctxt);</PRE
1730></TD
1731></TR
1732></TABLE
1733><P
1734>Free all the memory used by a parser context. However the parsed
1735document in ctxt-&gt;myDoc is not freed.</P
1736><P
1737></P
1738><DIV
1739CLASS="INFORMALTABLE"
1740><P
1741></P
1742><TABLE
1743BORDER="0"
1744WIDTH="100%"
1745BGCOLOR="#FFD0D0"
1746CELLSPACING="0"
1747CELLPADDING="4"
1748CLASS="CALSTABLE"
1749><TR
1750><TD
1751WIDTH="20%"
1752ALIGN="RIGHT"
1753VALIGN="TOP"
1754><TT
1755CLASS="PARAMETER"
1756><I
1757>ctxt</I
1758></TT
1759>&nbsp;:</TD
1760><TD
1761WIDTH="80%"
1762ALIGN="LEFT"
1763VALIGN="TOP"
1764> an HTML parser context</TD
1765></TR
1766></TABLE
1767><P
1768></P
1769></DIV
1770></DIV
1771><HR><DIV
1772CLASS="REFSECT2"
1773><A
1774NAME="AEN8248"
1775></A
1776><H3
1777><A
1778NAME="HTMLCREATEPUSHPARSERCTXT"
1779></A
1780>htmlCreatePushParserCtxt ()</H3
1781><TABLE
1782BORDER="0"
1783BGCOLOR="#D6E8FF"
1784WIDTH="100%"
1785CELLPADDING="6"
1786><TR
1787><TD
1788><PRE
1789CLASS="PROGRAMLISTING"
1790><A
1791HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1792>htmlParserCtxtPtr</A
1793> htmlCreatePushParserCtxt (<A
1794HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1795>htmlSAXHandlerPtr</A
1796> sax,
1797 void *user_data,
1798 const char *chunk,
1799 int size,
1800 const char *filename,
1801 <A
1802HREF="gnome-xml-encoding.html#XMLCHARENCODING"
1803>xmlCharEncoding</A
1804> enc);</PRE
1805></TD
1806></TR
1807></TABLE
1808><P
1809>Create a parser context for using the HTML parser in push mode
1810To allow content encoding detection, <TT
1811CLASS="PARAMETER"
1812><I
1813>size</I
1814></TT
1815> should be &gt;= 4
1816The value of <TT
1817CLASS="PARAMETER"
1818><I
1819>filename</I
1820></TT
1821> is used for fetching external entities
1822and error/warning reports.</P
1823><P
1824></P
1825><DIV
1826CLASS="INFORMALTABLE"
1827><P
1828></P
1829><TABLE
1830BORDER="0"
1831WIDTH="100%"
1832BGCOLOR="#FFD0D0"
1833CELLSPACING="0"
1834CELLPADDING="4"
1835CLASS="CALSTABLE"
1836><TR
1837><TD
1838WIDTH="20%"
1839ALIGN="RIGHT"
1840VALIGN="TOP"
1841><TT
1842CLASS="PARAMETER"
1843><I
1844>sax</I
1845></TT
1846>&nbsp;:</TD
1847><TD
1848WIDTH="80%"
1849ALIGN="LEFT"
1850VALIGN="TOP"
1851> a SAX handler</TD
1852></TR
1853><TR
1854><TD
1855WIDTH="20%"
1856ALIGN="RIGHT"
1857VALIGN="TOP"
1858><TT
1859CLASS="PARAMETER"
1860><I
1861>user_data</I
1862></TT
1863>&nbsp;:</TD
1864><TD
1865WIDTH="80%"
1866ALIGN="LEFT"
1867VALIGN="TOP"
1868> The user data returned on SAX callbacks</TD
1869></TR
1870><TR
1871><TD
1872WIDTH="20%"
1873ALIGN="RIGHT"
1874VALIGN="TOP"
1875><TT
1876CLASS="PARAMETER"
1877><I
1878>chunk</I
1879></TT
1880>&nbsp;:</TD
1881><TD
1882WIDTH="80%"
1883ALIGN="LEFT"
1884VALIGN="TOP"
1885> a pointer to an array of chars</TD
1886></TR
1887><TR
1888><TD
1889WIDTH="20%"
1890ALIGN="RIGHT"
1891VALIGN="TOP"
1892><TT
1893CLASS="PARAMETER"
1894><I
1895>size</I
1896></TT
1897>&nbsp;:</TD
1898><TD
1899WIDTH="80%"
1900ALIGN="LEFT"
1901VALIGN="TOP"
1902> number of chars in the array</TD
1903></TR
1904><TR
1905><TD
1906WIDTH="20%"
1907ALIGN="RIGHT"
1908VALIGN="TOP"
1909><TT
1910CLASS="PARAMETER"
1911><I
1912>filename</I
1913></TT
1914>&nbsp;:</TD
1915><TD
1916WIDTH="80%"
1917ALIGN="LEFT"
1918VALIGN="TOP"
1919> an optional file name or URI</TD
1920></TR
1921><TR
1922><TD
1923WIDTH="20%"
1924ALIGN="RIGHT"
1925VALIGN="TOP"
1926><TT
1927CLASS="PARAMETER"
1928><I
1929>enc</I
1930></TT
1931>&nbsp;:</TD
1932><TD
1933WIDTH="80%"
1934ALIGN="LEFT"
1935VALIGN="TOP"
1936> an optional encoding</TD
1937></TR
1938><TR
1939><TD
1940WIDTH="20%"
1941ALIGN="RIGHT"
1942VALIGN="TOP"
1943><I
1944CLASS="EMPHASIS"
1945>Returns</I
1946> :</TD
1947><TD
1948WIDTH="80%"
1949ALIGN="LEFT"
1950VALIGN="TOP"
1951>the new parser context or NULL</TD
1952></TR
1953></TABLE
1954><P
1955></P
1956></DIV
1957></DIV
1958><HR><DIV
1959CLASS="REFSECT2"
1960><A
1961NAME="AEN8292"
1962></A
1963><H3
1964><A
1965NAME="HTMLPARSECHUNK"
1966></A
1967>htmlParseChunk ()</H3
1968><TABLE
1969BORDER="0"
1970BGCOLOR="#D6E8FF"
1971WIDTH="100%"
1972CELLPADDING="6"
1973><TR
1974><TD
1975><PRE
1976CLASS="PROGRAMLISTING"
1977>int htmlParseChunk (<A
1978HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1979>htmlParserCtxtPtr</A
1980> ctxt,
1981 const char *chunk,
1982 int size,
1983 int terminate);</PRE
1984></TD
1985></TR
1986></TABLE
1987><P
1988>Parse a Chunk of memory</P
1989><P
1990></P
1991><DIV
1992CLASS="INFORMALTABLE"
1993><P
1994></P
1995><TABLE
1996BORDER="0"
1997WIDTH="100%"
1998BGCOLOR="#FFD0D0"
1999CELLSPACING="0"
2000CELLPADDING="4"
2001CLASS="CALSTABLE"
2002><TR
2003><TD
2004WIDTH="20%"
2005ALIGN="RIGHT"
2006VALIGN="TOP"
2007><TT
2008CLASS="PARAMETER"
2009><I
2010>ctxt</I
2011></TT
2012>&nbsp;:</TD
2013><TD
2014WIDTH="80%"
2015ALIGN="LEFT"
2016VALIGN="TOP"
2017> an XML parser context</TD
2018></TR
2019><TR
2020><TD
2021WIDTH="20%"
2022ALIGN="RIGHT"
2023VALIGN="TOP"
2024><TT
2025CLASS="PARAMETER"
2026><I
2027>chunk</I
2028></TT
2029>&nbsp;:</TD
2030><TD
2031WIDTH="80%"
2032ALIGN="LEFT"
2033VALIGN="TOP"
2034> an char array</TD
2035></TR
2036><TR
2037><TD
2038WIDTH="20%"
2039ALIGN="RIGHT"
2040VALIGN="TOP"
2041><TT
2042CLASS="PARAMETER"
2043><I
2044>size</I
2045></TT
2046>&nbsp;:</TD
2047><TD
2048WIDTH="80%"
2049ALIGN="LEFT"
2050VALIGN="TOP"
2051> the size in byte of the chunk</TD
2052></TR
2053><TR
2054><TD
2055WIDTH="20%"
2056ALIGN="RIGHT"
2057VALIGN="TOP"
2058><TT
2059CLASS="PARAMETER"
2060><I
2061>terminate</I
2062></TT
2063>&nbsp;:</TD
2064><TD
2065WIDTH="80%"
2066ALIGN="LEFT"
2067VALIGN="TOP"
2068> last chunk indicator</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>zero if no error, the xmlParserErrors otherwise.</TD
2084></TR
2085></TABLE
2086><P
2087></P
2088></DIV
2089></DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002090></DIV
2091><DIV
2092CLASS="NAVFOOTER"
Daniel Veillard00fdf371999-10-08 09:40:39 +00002093><BR
2094CLEAR="all"><BR><TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002095WIDTH="100%"
2096BORDER="0"
2097BGCOLOR="#000000"
2098CELLPADDING="1"
2099CELLSPACING="0"
2100><TR
2101><TD
2102WIDTH="25%"
2103BGCOLOR="#C00000"
2104ALIGN="left"
2105><A
Daniel Veillard6bd26dc1999-09-03 14:28:40 +00002106HREF="gnome-xml-xml-error.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002107><FONT
2108COLOR="#FFFFFF"
2109SIZE="3"
2110><B
2111>&#60;&#60;&#60; Previous Page</B
2112></FONT
2113></A
2114></TD
2115><TD
2116WIDTH="25%"
2117BGCOLOR="#0000C0"
2118ALIGN="center"
2119><FONT
2120COLOR="#FFFFFF"
2121SIZE="3"
2122><B
2123><A
2124HREF="book1.html"
2125><FONT
2126COLOR="#FFFFFF"
2127SIZE="3"
2128><B
2129>Home</B
2130></FONT
2131></A
2132></B
2133></FONT
2134></TD
2135><TD
2136WIDTH="25%"
2137BGCOLOR="#00C000"
2138ALIGN="center"
2139><FONT
2140COLOR="#FFFFFF"
2141SIZE="3"
2142><B
2143><A
Daniel Veillard35008381999-10-25 13:15:52 +00002144HREF="libxml-lib.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002145><FONT
2146COLOR="#FFFFFF"
2147SIZE="3"
2148><B
2149>Up</B
2150></FONT
2151></A
2152></B
2153></FONT
2154></TD
2155><TD
2156WIDTH="25%"
2157BGCOLOR="#C00000"
2158ALIGN="right"
2159><A
2160HREF="gnome-xml-htmltree.html"
2161><FONT
2162COLOR="#FFFFFF"
2163SIZE="3"
2164><B
2165>Next Page &#62;&#62;&#62;</B
2166></FONT
2167></A
2168></TD
2169></TR
2170><TR
2171><TD
2172COLSPAN="2"
2173ALIGN="left"
2174><FONT
2175COLOR="#FFFFFF"
2176SIZE="3"
2177><B
Daniel Veillard6bd26dc1999-09-03 14:28:40 +00002178>xml-error</B
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002179></FONT
2180></TD
2181><TD
2182COLSPAN="2"
2183ALIGN="right"
2184><FONT
2185COLOR="#FFFFFF"
2186SIZE="3"
2187><B
2188>HTMLtree</B
2189></FONT
2190></TD
2191></TR
2192></TABLE
2193></DIV
2194></BODY
2195></HTML
2196>