blob: 054e39a9970c867ce551a2635a62ab947d80bc5c [file] [log] [blame]
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001<HTML
2><HEAD
3><TITLE
4>HTMLparser</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillard539638b2002-07-06 19:55:14 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
Daniel Veillard60087f32001-10-10 09:45:09 +00008"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +00009REL="HOME"
10TITLE="Gnome XML Library Reference Manual"
11HREF="book1.html"><LINK
12REL="UP"
Daniel Veillard35008381999-10-25 13:15:52 +000013TITLE="Libxml Library Reference"
14HREF="libxml-lib.html"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +000015REL="PREVIOUS"
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +000016TITLE="xmlerror"
17HREF="libxml-xmlerror.html"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +000018REL="NEXT"
19TITLE="HTMLtree"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000020HREF="libxml-htmltree.html"></HEAD
Daniel Veillard1566d3a1999-07-15 14:24:29 +000021><BODY
Daniel Veillardbed7b052001-05-19 14:59:49 +000022CLASS="REFENTRY"
Daniel Veillard1566d3a1999-07-15 14:24:29 +000023BGCOLOR="#FFFFFF"
24TEXT="#000000"
Daniel Veillard503b8932001-01-05 06:36:31 +000025LINK="#0000FF"
26VLINK="#840084"
27ALINK="#0000FF"
Daniel Veillard1566d3a1999-07-15 14:24:29 +000028><DIV
29CLASS="NAVHEADER"
30><TABLE
31WIDTH="100%"
32BORDER="0"
33BGCOLOR="#000000"
34CELLPADDING="1"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="4"
39ALIGN="center"
40><FONT
41COLOR="#FFFFFF"
42SIZE="5"
43>Gnome XML Library Reference Manual</FONT
44></TH
45></TR
46><TR
47><TD
48WIDTH="25%"
49BGCOLOR="#C00000"
50ALIGN="left"
51><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +000052HREF="libxml-xmlerror.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +000053><FONT
54COLOR="#FFFFFF"
55SIZE="3"
56><B
57>&#60;&#60;&#60; Previous Page</B
58></FONT
59></A
60></TD
61><TD
62WIDTH="25%"
63BGCOLOR="#0000C0"
64ALIGN="center"
65><FONT
66COLOR="#FFFFFF"
67SIZE="3"
68><B
69><A
70HREF="book1.html"
71><FONT
72COLOR="#FFFFFF"
73SIZE="3"
74><B
75>Home</B
76></FONT
77></A
78></B
79></FONT
80></TD
81><TD
82WIDTH="25%"
83BGCOLOR="#00C000"
84ALIGN="center"
85><FONT
86COLOR="#FFFFFF"
87SIZE="3"
88><B
89><A
Daniel Veillard35008381999-10-25 13:15:52 +000090HREF="libxml-lib.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +000091><FONT
92COLOR="#FFFFFF"
93SIZE="3"
94><B
95>Up</B
96></FONT
97></A
98></B
99></FONT
100></TD
101><TD
102WIDTH="25%"
103BGCOLOR="#C00000"
104ALIGN="right"
105><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000106HREF="libxml-htmltree.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000107><FONT
108COLOR="#FFFFFF"
109SIZE="3"
110><B
111>Next Page &#62;&#62;&#62;</B
112></FONT
113></A
114></TD
115></TR
116></TABLE
117></DIV
118><H1
Daniel Veillard503b8932001-01-05 06:36:31 +0000119><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000120NAME="LIBXML-HTMLPARSER"
121></A
122>HTMLparser</H1
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000123><DIV
124CLASS="REFNAMEDIV"
125><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000126NAME="AEN13156"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000127></A
128><H2
129>Name</H2
Daniel Veillard503b8932001-01-05 06:36:31 +0000130>HTMLparser&nbsp;--&nbsp;</DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000131><DIV
132CLASS="REFSYNOPSISDIV"
133><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000134NAME="AEN13159"
135></A
136><H2
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000137>Synopsis</H2
138><TABLE
139BORDER="0"
140BGCOLOR="#D6E8FF"
141WIDTH="100%"
142CELLPADDING="6"
143><TR
144><TD
145><PRE
146CLASS="SYNOPSIS"
147>&#13;
148
149typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000150HREF="libxml-htmlparser.html#HTMLPARSERCTXT"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000151>htmlParserCtxt</A
152>;
153typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000154HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000155>htmlParserCtxtPtr</A
156>;
157typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000158HREF="libxml-htmlparser.html#HTMLPARSERNODEINFO"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000159>htmlParserNodeInfo</A
160>;
161typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000162HREF="libxml-htmlparser.html#HTMLSAXHANDLER"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000163>htmlSAXHandler</A
164>;
165typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000166HREF="libxml-htmlparser.html#HTMLSAXHANDLERPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000167>htmlSAXHandlerPtr</A
168>;
169typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000170HREF="libxml-htmlparser.html#HTMLPARSERINPUT"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000171>htmlParserInput</A
172>;
173typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000174HREF="libxml-htmlparser.html#HTMLPARSERINPUTPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000175>htmlParserInputPtr</A
176>;
177typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000178HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000179>htmlDocPtr</A
180>;
181typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000182HREF="libxml-htmlparser.html#HTMLNODEPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000183>htmlNodePtr</A
184>;
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000185struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000186HREF="libxml-htmlparser.html#HTMLELEMDESC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000187>htmlElemDesc</A
188>;
189typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000190HREF="libxml-htmlparser.html#HTMLELEMDESCPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000191>htmlElemDescPtr</A
192>;
193struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000194HREF="libxml-htmlparser.html#HTMLENTITYDESC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000195>htmlEntityDesc</A
196>;
197typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000198HREF="libxml-htmlparser.html#HTMLENTITYDESCPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000199>htmlEntityDescPtr</A
200>;
Daniel Veillardf012a642001-07-23 19:10:52 +0000201const <A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000202HREF="libxml-htmlparser.html#HTMLELEMDESC"
203>htmlElemDesc</A
204>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000205HREF="libxml-htmlparser.html#HTMLTAGLOOKUP"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000206>htmlTagLookup</A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000207> (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000208HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000209>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000210> *tag);
Daniel Veillardf012a642001-07-23 19:10:52 +0000211const <A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000212HREF="libxml-htmlparser.html#HTMLENTITYDESC"
213>htmlEntityDesc</A
214>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000215HREF="libxml-htmlparser.html#HTMLENTITYLOOKUP"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000216>htmlEntityLookup</A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000217> (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000218HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000219>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000220> *name);
Daniel Veillardf012a642001-07-23 19:10:52 +0000221const <A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000222HREF="libxml-htmlparser.html#HTMLENTITYDESC"
223>htmlEntityDesc</A
224>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000225HREF="libxml-htmlparser.html#HTMLENTITYVALUELOOKUP"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000226>htmlEntityValueLookup</A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000227> (unsigned int value);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000228int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000229HREF="libxml-htmlparser.html#HTMLISAUTOCLOSED"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000230>htmlIsAutoClosed</A
231> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000232HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000233>htmlDocPtr</A
234> doc,
235 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000236HREF="libxml-htmlparser.html#HTMLNODEPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000237>htmlNodePtr</A
238> elem);
239int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000240HREF="libxml-htmlparser.html#HTMLAUTOCLOSETAG"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000241>htmlAutoCloseTag</A
242> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000243HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000244>htmlDocPtr</A
245> doc,
246 const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000247HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000248>xmlChar</A
249> *name,
250 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000251HREF="libxml-htmlparser.html#HTMLNODEPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000252>htmlNodePtr</A
253> elem);
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000254const <A
255HREF="libxml-htmlparser.html#HTMLENTITYDESC"
256>htmlEntityDesc</A
257>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000258HREF="libxml-htmlparser.html#HTMLPARSEENTITYREF"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000259>htmlParseEntityRef</A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000260> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000261HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000262>htmlParserCtxtPtr</A
263> ctxt,
264 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000265HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000266>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000267> **str);
268int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000269HREF="libxml-htmlparser.html#HTMLPARSECHARREF"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000270>htmlParseCharRef</A
271> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000272HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000273>htmlParserCtxtPtr</A
274> ctxt);
275void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000276HREF="libxml-htmlparser.html#HTMLPARSEELEMENT"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000277>htmlParseElement</A
278> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000279HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000280>htmlParserCtxtPtr</A
281> ctxt);
Daniel Veillard539638b2002-07-06 19:55:14 +0000282int <A
283HREF="libxml-htmlparser.html#HTMLPARSEDOCUMENT"
284>htmlParseDocument</A
285> (<A
286HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
287>htmlParserCtxtPtr</A
288> ctxt);
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000289<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000290HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000291>htmlDocPtr</A
292> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000293HREF="libxml-htmlparser.html#HTMLSAXPARSEDOC"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000294>htmlSAXParseDoc</A
295> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000296HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000297>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000298> *cur,
299 const char *encoding,
300 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000301HREF="libxml-htmlparser.html#HTMLSAXHANDLERPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000302>htmlSAXHandlerPtr</A
303> sax,
304 void *userData);
305<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000306HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000307>htmlDocPtr</A
308> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000309HREF="libxml-htmlparser.html#HTMLPARSEDOC"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000310>htmlParseDoc</A
311> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000312HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000313>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000314> *cur,
315 const char *encoding);
316<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000317HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000318>htmlDocPtr</A
319> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000320HREF="libxml-htmlparser.html#HTMLSAXPARSEFILE"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000321>htmlSAXParseFile</A
322> (const char *filename,
323 const char *encoding,
324 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000325HREF="libxml-htmlparser.html#HTMLSAXHANDLERPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000326>htmlSAXHandlerPtr</A
327> sax,
328 void *userData);
329<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000330HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000331>htmlDocPtr</A
332> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000333HREF="libxml-htmlparser.html#HTMLPARSEFILE"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000334>htmlParseFile</A
335> (const char *filename,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000336 const char *encoding);
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000337int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000338HREF="libxml-htmlparser.html#UTF8TOHTML"
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000339>UTF8ToHtml</A
340> (unsigned char *out,
341 int *outlen,
342 unsigned char *in,
343 int *inlen);
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000344int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000345HREF="libxml-htmlparser.html#HTMLENCODEENTITIES"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000346>htmlEncodeEntities</A
347> (unsigned char *out,
348 int *outlen,
349 unsigned char *in,
350 int *inlen,
351 int quoteChar);
Daniel Veillard29a11cc2000-10-25 13:32:39 +0000352int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000353HREF="libxml-htmlparser.html#HTMLISSCRIPTATTRIBUTE"
Daniel Veillard29a11cc2000-10-25 13:32:39 +0000354>htmlIsScriptAttribute</A
355> (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000356HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard29a11cc2000-10-25 13:32:39 +0000357>xmlChar</A
358> *name);
Daniel Veillard503b8932001-01-05 06:36:31 +0000359int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000360HREF="libxml-htmlparser.html#HTMLHANDLEOMITTEDELEM"
Daniel Veillard503b8932001-01-05 06:36:31 +0000361>htmlHandleOmittedElem</A
362> (int val);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000363void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000364HREF="libxml-htmlparser.html#HTMLFREEPARSERCTXT"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000365>htmlFreeParserCtxt</A
366> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000367HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000368>htmlParserCtxtPtr</A
369> ctxt);
370<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000371HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000372>htmlParserCtxtPtr</A
373> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000374HREF="libxml-htmlparser.html#HTMLCREATEPUSHPARSERCTXT"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000375>htmlCreatePushParserCtxt</A
376> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000377HREF="libxml-htmlparser.html#HTMLSAXHANDLERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000378>htmlSAXHandlerPtr</A
379> sax,
380 void *user_data,
381 const char *chunk,
382 int size,
383 const char *filename,
384 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000385HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000386>xmlCharEncoding</A
387> enc);
388int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000389HREF="libxml-htmlparser.html#HTMLPARSECHUNK"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000390>htmlParseChunk</A
391> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000392HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000393>htmlParserCtxtPtr</A
394> ctxt,
395 const char *chunk,
396 int size,
397 int terminate);</PRE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000398></TD
399></TR
400></TABLE
401></DIV
402><DIV
403CLASS="REFSECT1"
404><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000405NAME="AEN13225"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000406></A
407><H2
408>Description</H2
409><P
410></P
411></DIV
412><DIV
413CLASS="REFSECT1"
414><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000415NAME="AEN13228"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000416></A
417><H2
418>Details</H2
419><DIV
420CLASS="REFSECT2"
421><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000422NAME="AEN13230"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000423></A
424><H3
425><A
426NAME="HTMLPARSERCTXT"
427></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000428>htmlParserCtxt</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000429><TABLE
430BORDER="0"
431BGCOLOR="#D6E8FF"
432WIDTH="100%"
433CELLPADDING="6"
434><TR
435><TD
436><PRE
437CLASS="PROGRAMLISTING"
438>typedef xmlParserCtxt htmlParserCtxt;</PRE
439></TD
440></TR
441></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000442><P
443></P
444></DIV
445><HR><DIV
446CLASS="REFSECT2"
447><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000448NAME="AEN13235"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000449></A
450><H3
451><A
452NAME="HTMLPARSERCTXTPTR"
453></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000454>htmlParserCtxtPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000455><TABLE
456BORDER="0"
457BGCOLOR="#D6E8FF"
458WIDTH="100%"
459CELLPADDING="6"
460><TR
461><TD
462><PRE
463CLASS="PROGRAMLISTING"
464>typedef xmlParserCtxtPtr htmlParserCtxtPtr;</PRE
465></TD
466></TR
467></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000468><P
469></P
470></DIV
471><HR><DIV
472CLASS="REFSECT2"
473><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000474NAME="AEN13240"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000475></A
476><H3
477><A
478NAME="HTMLPARSERNODEINFO"
479></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000480>htmlParserNodeInfo</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000481><TABLE
482BORDER="0"
483BGCOLOR="#D6E8FF"
484WIDTH="100%"
485CELLPADDING="6"
486><TR
487><TD
488><PRE
489CLASS="PROGRAMLISTING"
490>typedef xmlParserNodeInfo htmlParserNodeInfo;</PRE
491></TD
492></TR
493></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000494><P
495></P
496></DIV
497><HR><DIV
498CLASS="REFSECT2"
499><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000500NAME="AEN13245"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000501></A
502><H3
503><A
504NAME="HTMLSAXHANDLER"
505></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000506>htmlSAXHandler</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000507><TABLE
508BORDER="0"
509BGCOLOR="#D6E8FF"
510WIDTH="100%"
511CELLPADDING="6"
512><TR
513><TD
514><PRE
515CLASS="PROGRAMLISTING"
516>typedef xmlSAXHandler htmlSAXHandler;</PRE
517></TD
518></TR
519></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000520><P
521></P
522></DIV
523><HR><DIV
524CLASS="REFSECT2"
525><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000526NAME="AEN13250"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000527></A
528><H3
529><A
530NAME="HTMLSAXHANDLERPTR"
531></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000532>htmlSAXHandlerPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000533><TABLE
534BORDER="0"
535BGCOLOR="#D6E8FF"
536WIDTH="100%"
537CELLPADDING="6"
538><TR
539><TD
540><PRE
541CLASS="PROGRAMLISTING"
542>typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;</PRE
543></TD
544></TR
545></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000546><P
547></P
548></DIV
549><HR><DIV
550CLASS="REFSECT2"
551><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000552NAME="AEN13255"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000553></A
554><H3
555><A
556NAME="HTMLPARSERINPUT"
557></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000558>htmlParserInput</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000559><TABLE
560BORDER="0"
561BGCOLOR="#D6E8FF"
562WIDTH="100%"
563CELLPADDING="6"
564><TR
565><TD
566><PRE
567CLASS="PROGRAMLISTING"
568>typedef xmlParserInput htmlParserInput;</PRE
569></TD
570></TR
571></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000572><P
573></P
574></DIV
575><HR><DIV
576CLASS="REFSECT2"
577><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000578NAME="AEN13260"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000579></A
580><H3
581><A
582NAME="HTMLPARSERINPUTPTR"
583></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000584>htmlParserInputPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000585><TABLE
586BORDER="0"
587BGCOLOR="#D6E8FF"
588WIDTH="100%"
589CELLPADDING="6"
590><TR
591><TD
592><PRE
593CLASS="PROGRAMLISTING"
594>typedef xmlParserInputPtr htmlParserInputPtr;</PRE
595></TD
596></TR
597></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000598><P
599></P
600></DIV
601><HR><DIV
602CLASS="REFSECT2"
603><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000604NAME="AEN13265"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000605></A
606><H3
607><A
608NAME="HTMLDOCPTR"
609></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000610>htmlDocPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000611><TABLE
612BORDER="0"
613BGCOLOR="#D6E8FF"
614WIDTH="100%"
615CELLPADDING="6"
616><TR
617><TD
618><PRE
619CLASS="PROGRAMLISTING"
620>typedef xmlDocPtr htmlDocPtr;</PRE
621></TD
622></TR
623></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000624><P
625></P
626></DIV
627><HR><DIV
628CLASS="REFSECT2"
629><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000630NAME="AEN13270"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000631></A
632><H3
633><A
634NAME="HTMLNODEPTR"
635></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000636>htmlNodePtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000637><TABLE
638BORDER="0"
639BGCOLOR="#D6E8FF"
640WIDTH="100%"
641CELLPADDING="6"
642><TR
643><TD
644><PRE
645CLASS="PROGRAMLISTING"
646>typedef xmlNodePtr htmlNodePtr;</PRE
647></TD
648></TR
649></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000650><P
651></P
652></DIV
653><HR><DIV
654CLASS="REFSECT2"
655><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000656NAME="AEN13275"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000657></A
658><H3
659><A
660NAME="HTMLELEMDESC"
661></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000662>struct htmlElemDesc</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000663><TABLE
664BORDER="0"
665BGCOLOR="#D6E8FF"
666WIDTH="100%"
667CELLPADDING="6"
668><TR
669><TD
670><PRE
671CLASS="PROGRAMLISTING"
672>struct htmlElemDesc {
673 const char *name; /* The tag name */
Daniel Veillard4ec885a2001-06-17 10:31:07 +0000674 char startTag; /* Whether the start tag can be implied */
675 char endTag; /* Whether the end tag can be implied */
676 char saveEndTag; /* Whether the end tag should be saved */
677 char empty; /* Is this an empty element ? */
678 char depr; /* Is this a deprecated element ? */
679 char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
680 char isinline; /* is this a block 0 or inline 1 element */
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000681 const char *desc; /* the description */
Daniel Veillardaec63562003-03-23 20:42:17 +0000682
683/* NRK Jan.2003
684 * New fields encapsulating HTML structure
685 *
686 * Bugs:
687 * This is a very limited representation. It fails to tell us when
688 * an element *requires* subelements (we only have whether they're
689 * allowed or not), and it doesn't tell us where CDATA and PCDATA
690 * are allowed. Some element relationships are not fully represented:
691 * these are flagged with the word MODIFIER
692 */
693 const char** subelts; /* allowed sub-elements of this element */
694 const char* defaultsubelt; /* subelement for suggested auto-repair
695 if necessary or NULL */
696 const char** attrs_opt; /* Optional Attributes */
697 const char** attrs_depr; /* Additional deprecated attributes */
698 const char** attrs_req; /* Required attributes */
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000699};</PRE
700></TD
701></TR
702></TABLE
703><P
704></P
705></DIV
706><HR><DIV
707CLASS="REFSECT2"
708><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000709NAME="AEN13280"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000710></A
711><H3
712><A
713NAME="HTMLELEMDESCPTR"
714></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000715>htmlElemDescPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000716><TABLE
717BORDER="0"
718BGCOLOR="#D6E8FF"
719WIDTH="100%"
720CELLPADDING="6"
721><TR
722><TD
723><PRE
724CLASS="PROGRAMLISTING"
725>typedef htmlElemDesc *htmlElemDescPtr;</PRE
726></TD
727></TR
728></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000729><P
730></P
731></DIV
732><HR><DIV
733CLASS="REFSECT2"
734><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000735NAME="AEN13285"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000736></A
737><H3
738><A
739NAME="HTMLENTITYDESC"
740></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000741>struct htmlEntityDesc</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000742><TABLE
743BORDER="0"
744BGCOLOR="#D6E8FF"
745WIDTH="100%"
746CELLPADDING="6"
747><TR
748><TD
749><PRE
750CLASS="PROGRAMLISTING"
751>struct htmlEntityDesc {
Daniel Veillarda41123c2001-04-22 19:31:20 +0000752 unsigned int value; /* the UNICODE value for the character */
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000753 const char *name; /* The entity name */
754 const char *desc; /* the description */
755};</PRE
756></TD
757></TR
758></TABLE
759><P
760></P
761></DIV
762><HR><DIV
763CLASS="REFSECT2"
764><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000765NAME="AEN13290"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000766></A
767><H3
768><A
769NAME="HTMLENTITYDESCPTR"
770></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000771>htmlEntityDescPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000772><TABLE
773BORDER="0"
774BGCOLOR="#D6E8FF"
775WIDTH="100%"
776CELLPADDING="6"
777><TR
778><TD
779><PRE
780CLASS="PROGRAMLISTING"
781>typedef htmlEntityDesc *htmlEntityDescPtr;</PRE
782></TD
783></TR
784></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000785><P
786></P
787></DIV
788><HR><DIV
789CLASS="REFSECT2"
790><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000791NAME="AEN13295"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000792></A
793><H3
794><A
795NAME="HTMLTAGLOOKUP"
796></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000797>htmlTagLookup ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000798><TABLE
799BORDER="0"
800BGCOLOR="#D6E8FF"
801WIDTH="100%"
802CELLPADDING="6"
803><TR
804><TD
805><PRE
806CLASS="PROGRAMLISTING"
Daniel Veillardf012a642001-07-23 19:10:52 +0000807>const <A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000808HREF="libxml-htmlparser.html#HTMLELEMDESC"
809>htmlElemDesc</A
810>* htmlTagLookup (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000811HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000812>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000813> *tag);</PRE
814></TD
815></TR
816></TABLE
817><P
818>Lookup the HTML tag in the ElementTable</P
819><P
820></P
821><DIV
822CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000823><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000824NAME="AEN13303"
825></A
826><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000827></P
828><TABLE
829BORDER="0"
830WIDTH="100%"
831BGCOLOR="#FFD0D0"
832CELLSPACING="0"
833CELLPADDING="4"
834CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000835><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000836><TR
837><TD
838WIDTH="20%"
839ALIGN="RIGHT"
840VALIGN="TOP"
841><TT
842CLASS="PARAMETER"
843><I
844>tag</I
845></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000846>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000847><TD
848WIDTH="80%"
849ALIGN="LEFT"
850VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000851> The tag name in lowercase</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000852></TR
853><TR
854><TD
855WIDTH="20%"
856ALIGN="RIGHT"
857VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +0000858><SPAN
859CLASS="emphasis"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000860><I
861CLASS="EMPHASIS"
862>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +0000863></SPAN
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000864> :</TD
865><TD
866WIDTH="80%"
867ALIGN="LEFT"
868VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000869>the related htmlElemDescPtr or NULL if not found.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000870></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000871></TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000872></TABLE
873><P
874></P
875></DIV
876></DIV
877><HR><DIV
878CLASS="REFSECT2"
879><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000880NAME="AEN13316"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000881></A
882><H3
883><A
884NAME="HTMLENTITYLOOKUP"
885></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000886>htmlEntityLookup ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000887><TABLE
888BORDER="0"
889BGCOLOR="#D6E8FF"
890WIDTH="100%"
891CELLPADDING="6"
892><TR
893><TD
894><PRE
895CLASS="PROGRAMLISTING"
Daniel Veillardf012a642001-07-23 19:10:52 +0000896>const <A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000897HREF="libxml-htmlparser.html#HTMLENTITYDESC"
898>htmlEntityDesc</A
899>* htmlEntityLookup (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000900HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000901>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000902> *name);</PRE
903></TD
904></TR
905></TABLE
906><P
907>Lookup the given entity in EntitiesTable</P
908><P
909>TODO: the linear scan is really ugly, an hash table is really needed.</P
910><P
911></P
912><DIV
913CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000914><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000915NAME="AEN13325"
916></A
917><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000918></P
919><TABLE
920BORDER="0"
921WIDTH="100%"
922BGCOLOR="#FFD0D0"
923CELLSPACING="0"
924CELLPADDING="4"
925CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000926><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000927><TR
928><TD
929WIDTH="20%"
930ALIGN="RIGHT"
931VALIGN="TOP"
932><TT
933CLASS="PARAMETER"
934><I
935>name</I
936></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000937>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000938><TD
939WIDTH="80%"
940ALIGN="LEFT"
941VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000942> the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000943></TR
944><TR
945><TD
946WIDTH="20%"
947ALIGN="RIGHT"
948VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +0000949><SPAN
950CLASS="emphasis"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000951><I
952CLASS="EMPHASIS"
953>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +0000954></SPAN
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000955> :</TD
956><TD
957WIDTH="80%"
958ALIGN="LEFT"
959VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000960>the associated htmlEntityDescPtr if found, NULL otherwise.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000961></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000962></TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000963></TABLE
964><P
965></P
966></DIV
967></DIV
968><HR><DIV
969CLASS="REFSECT2"
970><A
Daniel Veillardaec63562003-03-23 20:42:17 +0000971NAME="AEN13338"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000972></A
973><H3
974><A
975NAME="HTMLENTITYVALUELOOKUP"
976></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000977>htmlEntityValueLookup ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000978><TABLE
979BORDER="0"
980BGCOLOR="#D6E8FF"
981WIDTH="100%"
982CELLPADDING="6"
983><TR
984><TD
985><PRE
986CLASS="PROGRAMLISTING"
Daniel Veillardf012a642001-07-23 19:10:52 +0000987>const <A
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000988HREF="libxml-htmlparser.html#HTMLENTITYDESC"
989>htmlEntityDesc</A
990>* htmlEntityValueLookup (unsigned int value);</PRE
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000991></TD
992></TR
993></TABLE
994><P
995>Lookup the given entity in EntitiesTable</P
996><P
997>TODO: the linear scan is really ugly, an hash table is really needed.</P
998><P
999></P
1000><DIV
1001CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001002><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001003NAME="AEN13346"
1004></A
1005><P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001006></P
1007><TABLE
1008BORDER="0"
1009WIDTH="100%"
1010BGCOLOR="#FFD0D0"
1011CELLSPACING="0"
1012CELLPADDING="4"
1013CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001014><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001015><TR
1016><TD
1017WIDTH="20%"
1018ALIGN="RIGHT"
1019VALIGN="TOP"
1020><TT
1021CLASS="PARAMETER"
1022><I
1023>value</I
1024></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001025>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001026><TD
1027WIDTH="80%"
1028ALIGN="LEFT"
1029VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001030> the entity's unicode value</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001031></TR
1032><TR
1033><TD
1034WIDTH="20%"
1035ALIGN="RIGHT"
1036VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001037><SPAN
1038CLASS="emphasis"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001039><I
1040CLASS="EMPHASIS"
1041>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001042></SPAN
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001043> :</TD
1044><TD
1045WIDTH="80%"
1046ALIGN="LEFT"
1047VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001048>the associated htmlEntityDescPtr if found, NULL otherwise.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001049></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001050></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001051></TABLE
1052><P
1053></P
1054></DIV
1055></DIV
1056><HR><DIV
1057CLASS="REFSECT2"
1058><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001059NAME="AEN13359"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001060></A
1061><H3
1062><A
1063NAME="HTMLISAUTOCLOSED"
1064></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001065>htmlIsAutoClosed ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001066><TABLE
1067BORDER="0"
1068BGCOLOR="#D6E8FF"
1069WIDTH="100%"
1070CELLPADDING="6"
1071><TR
1072><TD
1073><PRE
1074CLASS="PROGRAMLISTING"
1075>int htmlIsAutoClosed (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001076HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001077>htmlDocPtr</A
1078> doc,
1079 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001080HREF="libxml-htmlparser.html#HTMLNODEPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001081>htmlNodePtr</A
1082> elem);</PRE
1083></TD
1084></TR
1085></TABLE
1086><P
Daniel Veillardcbaf3992001-12-31 16:16:02 +00001087>The HTML DTD allows a tag to implicitly close other tags.
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001088The list is kept in htmlStartClose array. This function checks
1089if a tag is autoclosed by one of it's child</P
1090><P
1091></P
1092><DIV
1093CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001094><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001095NAME="AEN13367"
1096></A
1097><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001098></P
1099><TABLE
1100BORDER="0"
1101WIDTH="100%"
1102BGCOLOR="#FFD0D0"
1103CELLSPACING="0"
1104CELLPADDING="4"
1105CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001106><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001107><TR
1108><TD
1109WIDTH="20%"
1110ALIGN="RIGHT"
1111VALIGN="TOP"
1112><TT
1113CLASS="PARAMETER"
1114><I
1115>doc</I
1116></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001117>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001118><TD
1119WIDTH="80%"
1120ALIGN="LEFT"
1121VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001122> the HTML document</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001123></TR
1124><TR
1125><TD
1126WIDTH="20%"
1127ALIGN="RIGHT"
1128VALIGN="TOP"
1129><TT
1130CLASS="PARAMETER"
1131><I
1132>elem</I
1133></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001134>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001135><TD
1136WIDTH="80%"
1137ALIGN="LEFT"
1138VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001139> the HTML element</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001140></TR
1141><TR
1142><TD
1143WIDTH="20%"
1144ALIGN="RIGHT"
1145VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001146><SPAN
1147CLASS="emphasis"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001148><I
1149CLASS="EMPHASIS"
1150>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001151></SPAN
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001152> :</TD
1153><TD
1154WIDTH="80%"
1155ALIGN="LEFT"
1156VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001157>1 if autoclosed, 0 otherwise</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001158></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001159></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001160></TABLE
1161><P
1162></P
1163></DIV
1164></DIV
1165><HR><DIV
1166CLASS="REFSECT2"
1167><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001168NAME="AEN13384"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001169></A
1170><H3
1171><A
1172NAME="HTMLAUTOCLOSETAG"
1173></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001174>htmlAutoCloseTag ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001175><TABLE
1176BORDER="0"
1177BGCOLOR="#D6E8FF"
1178WIDTH="100%"
1179CELLPADDING="6"
1180><TR
1181><TD
1182><PRE
1183CLASS="PROGRAMLISTING"
1184>int htmlAutoCloseTag (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001185HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001186>htmlDocPtr</A
1187> doc,
1188 const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001189HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001190>xmlChar</A
1191> *name,
1192 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001193HREF="libxml-htmlparser.html#HTMLNODEPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001194>htmlNodePtr</A
1195> elem);</PRE
1196></TD
1197></TR
1198></TABLE
1199><P
Daniel Veillardcbaf3992001-12-31 16:16:02 +00001200>The HTML DTD allows a tag to implicitly close other tags.
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001201The list is kept in htmlStartClose array. This function checks
1202if the element or one of it's children would autoclose the
1203given tag.</P
1204><P
1205></P
1206><DIV
1207CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001208><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001209NAME="AEN13393"
1210></A
1211><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001212></P
1213><TABLE
1214BORDER="0"
1215WIDTH="100%"
1216BGCOLOR="#FFD0D0"
1217CELLSPACING="0"
1218CELLPADDING="4"
1219CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001220><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001221><TR
1222><TD
1223WIDTH="20%"
1224ALIGN="RIGHT"
1225VALIGN="TOP"
1226><TT
1227CLASS="PARAMETER"
1228><I
1229>doc</I
1230></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001231>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001232><TD
1233WIDTH="80%"
1234ALIGN="LEFT"
1235VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001236> the HTML document</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001237></TR
1238><TR
1239><TD
1240WIDTH="20%"
1241ALIGN="RIGHT"
1242VALIGN="TOP"
1243><TT
1244CLASS="PARAMETER"
1245><I
1246>name</I
1247></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001248>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001249><TD
1250WIDTH="80%"
1251ALIGN="LEFT"
1252VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001253> The tag name</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001254></TR
1255><TR
1256><TD
1257WIDTH="20%"
1258ALIGN="RIGHT"
1259VALIGN="TOP"
1260><TT
1261CLASS="PARAMETER"
1262><I
1263>elem</I
1264></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001265>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001266><TD
1267WIDTH="80%"
1268ALIGN="LEFT"
1269VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001270> the HTML element</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001271></TR
1272><TR
1273><TD
1274WIDTH="20%"
1275ALIGN="RIGHT"
1276VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001277><SPAN
1278CLASS="emphasis"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001279><I
1280CLASS="EMPHASIS"
1281>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001282></SPAN
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001283> :</TD
1284><TD
1285WIDTH="80%"
1286ALIGN="LEFT"
1287VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001288>1 if autoclose, 0 otherwise</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001289></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001290></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001291></TABLE
1292><P
1293></P
1294></DIV
1295></DIV
1296><HR><DIV
1297CLASS="REFSECT2"
1298><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001299NAME="AEN13414"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001300></A
1301><H3
1302><A
1303NAME="HTMLPARSEENTITYREF"
1304></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001305>htmlParseEntityRef ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001306><TABLE
1307BORDER="0"
1308BGCOLOR="#D6E8FF"
1309WIDTH="100%"
1310CELLPADDING="6"
1311><TR
1312><TD
1313><PRE
1314CLASS="PROGRAMLISTING"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +00001315>const <A
1316HREF="libxml-htmlparser.html#HTMLENTITYDESC"
1317>htmlEntityDesc</A
1318>* htmlParseEntityRef (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001319HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001320>htmlParserCtxtPtr</A
1321> ctxt,
1322 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001323HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001324>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001325> **str);</PRE
1326></TD
1327></TR
1328></TABLE
1329><P
1330>parse an HTML ENTITY references</P
1331><P
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001332>[68] EntityRef ::= '&amp;' Name ';'</P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001333><P
1334></P
1335><DIV
1336CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001337><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001338NAME="AEN13424"
1339></A
1340><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001341></P
1342><TABLE
1343BORDER="0"
1344WIDTH="100%"
1345BGCOLOR="#FFD0D0"
1346CELLSPACING="0"
1347CELLPADDING="4"
1348CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001349><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001350><TR
1351><TD
1352WIDTH="20%"
1353ALIGN="RIGHT"
1354VALIGN="TOP"
1355><TT
1356CLASS="PARAMETER"
1357><I
1358>ctxt</I
1359></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001360>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001361><TD
1362WIDTH="80%"
1363ALIGN="LEFT"
1364VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001365> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001366></TR
1367><TR
1368><TD
1369WIDTH="20%"
1370ALIGN="RIGHT"
1371VALIGN="TOP"
1372><TT
1373CLASS="PARAMETER"
1374><I
1375>str</I
1376></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001377>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001378><TD
1379WIDTH="80%"
1380ALIGN="LEFT"
1381VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001382> location to store the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001383></TR
1384><TR
1385><TD
1386WIDTH="20%"
1387ALIGN="RIGHT"
1388VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001389><SPAN
1390CLASS="emphasis"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001391><I
1392CLASS="EMPHASIS"
1393>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001394></SPAN
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001395> :</TD
1396><TD
1397WIDTH="80%"
1398ALIGN="LEFT"
1399VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001400>the associated htmlEntityDescPtr if found, or NULL otherwise,
Daniel Veillardaec63562003-03-23 20:42:17 +00001401 if non-NULL *str will have to be freed by the caller.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001402></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001403></TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001404></TABLE
1405><P
1406></P
1407></DIV
1408></DIV
1409><HR><DIV
1410CLASS="REFSECT2"
1411><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001412NAME="AEN13441"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001413></A
1414><H3
1415><A
1416NAME="HTMLPARSECHARREF"
1417></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001418>htmlParseCharRef ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001419><TABLE
1420BORDER="0"
1421BGCOLOR="#D6E8FF"
1422WIDTH="100%"
1423CELLPADDING="6"
1424><TR
1425><TD
1426><PRE
1427CLASS="PROGRAMLISTING"
1428>int htmlParseCharRef (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001429HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001430>htmlParserCtxtPtr</A
1431> ctxt);</PRE
1432></TD
1433></TR
1434></TABLE
1435><P
1436>parse Reference declarations</P
1437><P
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001438>[66] CharRef ::= '&amp;#' [0-9]+ ';' |
Daniel Veillardaec63562003-03-23 20:42:17 +00001439 '&amp;<GTKDOCLINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001440HREF="X"
1441>x</GTKDOCLINK
1442>' [0-9a-fA-F]+ ';'</P
1443><P
1444></P
1445><DIV
1446CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001447><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001448NAME="AEN13450"
1449></A
1450><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001451></P
1452><TABLE
1453BORDER="0"
1454WIDTH="100%"
1455BGCOLOR="#FFD0D0"
1456CELLSPACING="0"
1457CELLPADDING="4"
1458CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001459><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001460><TR
1461><TD
1462WIDTH="20%"
1463ALIGN="RIGHT"
1464VALIGN="TOP"
1465><TT
1466CLASS="PARAMETER"
1467><I
1468>ctxt</I
1469></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001470>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001471><TD
1472WIDTH="80%"
1473ALIGN="LEFT"
1474VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001475> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001476></TR
1477><TR
1478><TD
1479WIDTH="20%"
1480ALIGN="RIGHT"
1481VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001482><SPAN
1483CLASS="emphasis"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001484><I
1485CLASS="EMPHASIS"
1486>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001487></SPAN
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001488> :</TD
1489><TD
1490WIDTH="80%"
1491ALIGN="LEFT"
1492VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001493>the value parsed (as an int)</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001494></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001495></TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001496></TABLE
1497><P
1498></P
1499></DIV
1500></DIV
1501><HR><DIV
1502CLASS="REFSECT2"
1503><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001504NAME="AEN13463"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001505></A
1506><H3
1507><A
1508NAME="HTMLPARSEELEMENT"
1509></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001510>htmlParseElement ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001511><TABLE
1512BORDER="0"
1513BGCOLOR="#D6E8FF"
1514WIDTH="100%"
1515CELLPADDING="6"
1516><TR
1517><TD
1518><PRE
1519CLASS="PROGRAMLISTING"
1520>void htmlParseElement (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001521HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001522>htmlParserCtxtPtr</A
1523> ctxt);</PRE
1524></TD
1525></TR
1526></TABLE
1527><P
1528>parse an HTML element, this is highly recursive</P
1529><P
1530>[39] element ::= EmptyElemTag | STag content ETag</P
1531><P
1532>[41] Attribute ::= Name Eq AttValue</P
1533><P
1534></P
1535><DIV
1536CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001537><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001538NAME="AEN13472"
1539></A
1540><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001541></P
1542><TABLE
1543BORDER="0"
1544WIDTH="100%"
1545BGCOLOR="#FFD0D0"
1546CELLSPACING="0"
1547CELLPADDING="4"
1548CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001549><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001550><TR
1551><TD
1552WIDTH="20%"
1553ALIGN="RIGHT"
1554VALIGN="TOP"
1555><TT
1556CLASS="PARAMETER"
1557><I
1558>ctxt</I
1559></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001560>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001561><TD
1562WIDTH="80%"
1563ALIGN="LEFT"
1564VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001565> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001566></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001567></TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001568></TABLE
1569><P
1570></P
1571></DIV
1572></DIV
1573><HR><DIV
1574CLASS="REFSECT2"
1575><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001576NAME="AEN13481"
Daniel Veillard539638b2002-07-06 19:55:14 +00001577></A
1578><H3
1579><A
1580NAME="HTMLPARSEDOCUMENT"
1581></A
1582>htmlParseDocument ()</H3
1583><TABLE
1584BORDER="0"
1585BGCOLOR="#D6E8FF"
1586WIDTH="100%"
1587CELLPADDING="6"
1588><TR
1589><TD
1590><PRE
1591CLASS="PROGRAMLISTING"
1592>int htmlParseDocument (<A
1593HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
1594>htmlParserCtxtPtr</A
1595> ctxt);</PRE
1596></TD
1597></TR
1598></TABLE
1599><P
1600>parse an HTML document (and build a tree if using the standard SAX
1601interface).</P
1602><P
1603></P
1604><DIV
1605CLASS="INFORMALTABLE"
1606><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001607NAME="AEN13488"
1608></A
1609><P
Daniel Veillard539638b2002-07-06 19:55:14 +00001610></P
1611><TABLE
1612BORDER="0"
1613WIDTH="100%"
1614BGCOLOR="#FFD0D0"
1615CELLSPACING="0"
1616CELLPADDING="4"
1617CLASS="CALSTABLE"
1618><TBODY
1619><TR
1620><TD
1621WIDTH="20%"
1622ALIGN="RIGHT"
1623VALIGN="TOP"
1624><TT
1625CLASS="PARAMETER"
1626><I
1627>ctxt</I
1628></TT
1629>&nbsp;:</TD
1630><TD
1631WIDTH="80%"
1632ALIGN="LEFT"
1633VALIGN="TOP"
1634> an HTML parser context</TD
1635></TR
1636><TR
1637><TD
1638WIDTH="20%"
1639ALIGN="RIGHT"
1640VALIGN="TOP"
1641><SPAN
1642CLASS="emphasis"
1643><I
1644CLASS="EMPHASIS"
1645>Returns</I
1646></SPAN
1647> :</TD
1648><TD
1649WIDTH="80%"
1650ALIGN="LEFT"
1651VALIGN="TOP"
1652>0, -1 in case of error. the parser context is augmented
Daniel Veillardaec63562003-03-23 20:42:17 +00001653 as a result of the parsing.</TD
Daniel Veillard539638b2002-07-06 19:55:14 +00001654></TR
1655></TBODY
1656></TABLE
1657><P
1658></P
1659></DIV
1660></DIV
1661><HR><DIV
1662CLASS="REFSECT2"
1663><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001664NAME="AEN13501"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001665></A
1666><H3
1667><A
1668NAME="HTMLSAXPARSEDOC"
1669></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001670>htmlSAXParseDoc ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001671><TABLE
1672BORDER="0"
1673BGCOLOR="#D6E8FF"
1674WIDTH="100%"
1675CELLPADDING="6"
1676><TR
1677><TD
1678><PRE
1679CLASS="PROGRAMLISTING"
1680><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001681HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001682>htmlDocPtr</A
1683> htmlSAXParseDoc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001684HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001685>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001686> *cur,
1687 const char *encoding,
1688 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001689HREF="libxml-htmlparser.html#HTMLSAXHANDLERPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001690>htmlSAXHandlerPtr</A
1691> sax,
1692 void *userData);</PRE
1693></TD
1694></TR
1695></TABLE
1696><P
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001697>Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks
1698to handle parse events. If sax is NULL, fallback to the default DOM
1699behavior and return a tree.</P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001700><P
1701></P
1702><DIV
1703CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001704><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001705NAME="AEN13510"
1706></A
1707><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001708></P
1709><TABLE
1710BORDER="0"
1711WIDTH="100%"
1712BGCOLOR="#FFD0D0"
1713CELLSPACING="0"
1714CELLPADDING="4"
1715CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001716><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001717><TR
1718><TD
1719WIDTH="20%"
1720ALIGN="RIGHT"
1721VALIGN="TOP"
1722><TT
1723CLASS="PARAMETER"
1724><I
1725>cur</I
1726></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001727>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001728><TD
1729WIDTH="80%"
1730ALIGN="LEFT"
1731VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001732> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001733></TR
1734><TR
1735><TD
1736WIDTH="20%"
1737ALIGN="RIGHT"
1738VALIGN="TOP"
1739><TT
1740CLASS="PARAMETER"
1741><I
1742>encoding</I
1743></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001744>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001745><TD
1746WIDTH="80%"
1747ALIGN="LEFT"
1748VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001749> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001750></TR
1751><TR
1752><TD
1753WIDTH="20%"
1754ALIGN="RIGHT"
1755VALIGN="TOP"
1756><TT
1757CLASS="PARAMETER"
1758><I
1759>sax</I
1760></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001761>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001762><TD
1763WIDTH="80%"
1764ALIGN="LEFT"
1765VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001766> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001767></TR
1768><TR
1769><TD
1770WIDTH="20%"
1771ALIGN="RIGHT"
1772VALIGN="TOP"
1773><TT
1774CLASS="PARAMETER"
1775><I
1776>userData</I
1777></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001778>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001779><TD
1780WIDTH="80%"
1781ALIGN="LEFT"
1782VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001783> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001784></TR
1785><TR
1786><TD
1787WIDTH="20%"
1788ALIGN="RIGHT"
1789VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001790><SPAN
1791CLASS="emphasis"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001792><I
1793CLASS="EMPHASIS"
1794>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001795></SPAN
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001796> :</TD
1797><TD
1798WIDTH="80%"
1799ALIGN="LEFT"
1800VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001801>the resulting document tree unless SAX is NULL or the document is
Daniel Veillardaec63562003-03-23 20:42:17 +00001802 not well formed.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001803></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001804></TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001805></TABLE
1806><P
1807></P
1808></DIV
1809></DIV
1810><HR><DIV
1811CLASS="REFSECT2"
1812><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001813NAME="AEN13535"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001814></A
1815><H3
1816><A
1817NAME="HTMLPARSEDOC"
1818></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001819>htmlParseDoc ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001820><TABLE
1821BORDER="0"
1822BGCOLOR="#D6E8FF"
1823WIDTH="100%"
1824CELLPADDING="6"
1825><TR
1826><TD
1827><PRE
1828CLASS="PROGRAMLISTING"
1829><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001830HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001831>htmlDocPtr</A
1832> htmlParseDoc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001833HREF="libxml-tree.html#XMLCHAR"
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001834>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001835> *cur,
1836 const char *encoding);</PRE
1837></TD
1838></TR
1839></TABLE
1840><P
1841>parse an HTML in-memory document and build a tree.</P
1842><P
1843></P
1844><DIV
1845CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001846><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001847NAME="AEN13543"
1848></A
1849><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001850></P
1851><TABLE
1852BORDER="0"
1853WIDTH="100%"
1854BGCOLOR="#FFD0D0"
1855CELLSPACING="0"
1856CELLPADDING="4"
1857CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001858><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001859><TR
1860><TD
1861WIDTH="20%"
1862ALIGN="RIGHT"
1863VALIGN="TOP"
1864><TT
1865CLASS="PARAMETER"
1866><I
1867>cur</I
1868></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001869>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001870><TD
1871WIDTH="80%"
1872ALIGN="LEFT"
1873VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001874> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001875></TR
1876><TR
1877><TD
1878WIDTH="20%"
1879ALIGN="RIGHT"
1880VALIGN="TOP"
1881><TT
1882CLASS="PARAMETER"
1883><I
1884>encoding</I
1885></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001886>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001887><TD
1888WIDTH="80%"
1889ALIGN="LEFT"
1890VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001891> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001892></TR
1893><TR
1894><TD
1895WIDTH="20%"
1896ALIGN="RIGHT"
1897VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001898><SPAN
1899CLASS="emphasis"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001900><I
1901CLASS="EMPHASIS"
1902>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001903></SPAN
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001904> :</TD
1905><TD
1906WIDTH="80%"
1907ALIGN="LEFT"
1908VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001909>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001910></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001911></TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001912></TABLE
1913><P
1914></P
1915></DIV
1916></DIV
1917><HR><DIV
1918CLASS="REFSECT2"
1919><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001920NAME="AEN13560"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001921></A
1922><H3
1923><A
1924NAME="HTMLSAXPARSEFILE"
1925></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001926>htmlSAXParseFile ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001927><TABLE
1928BORDER="0"
1929BGCOLOR="#D6E8FF"
1930WIDTH="100%"
1931CELLPADDING="6"
1932><TR
1933><TD
1934><PRE
1935CLASS="PROGRAMLISTING"
1936><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001937HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001938>htmlDocPtr</A
1939> htmlSAXParseFile (const char *filename,
1940 const char *encoding,
1941 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001942HREF="libxml-htmlparser.html#HTMLSAXHANDLERPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001943>htmlSAXHandlerPtr</A
1944> sax,
1945 void *userData);</PRE
1946></TD
1947></TR
1948></TABLE
1949><P
1950>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1951compressed document is provided by default if found at compile-time.
1952It use the given SAX function block to handle the parsing callback.
1953If sax is NULL, fallback to the default DOM tree building routines.</P
1954><P
1955></P
1956><DIV
1957CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001958><A
Daniel Veillardaec63562003-03-23 20:42:17 +00001959NAME="AEN13568"
1960></A
1961><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001962></P
1963><TABLE
1964BORDER="0"
1965WIDTH="100%"
1966BGCOLOR="#FFD0D0"
1967CELLSPACING="0"
1968CELLPADDING="4"
1969CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001970><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001971><TR
1972><TD
1973WIDTH="20%"
1974ALIGN="RIGHT"
1975VALIGN="TOP"
1976><TT
1977CLASS="PARAMETER"
1978><I
1979>filename</I
1980></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001981>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001982><TD
1983WIDTH="80%"
1984ALIGN="LEFT"
1985VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001986> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001987></TR
1988><TR
1989><TD
1990WIDTH="20%"
1991ALIGN="RIGHT"
1992VALIGN="TOP"
1993><TT
1994CLASS="PARAMETER"
1995><I
1996>encoding</I
1997></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001998>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001999><TD
2000WIDTH="80%"
2001ALIGN="LEFT"
2002VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002003> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002004></TR
2005><TR
2006><TD
2007WIDTH="20%"
2008ALIGN="RIGHT"
2009VALIGN="TOP"
2010><TT
2011CLASS="PARAMETER"
2012><I
2013>sax</I
2014></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002015>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002016><TD
2017WIDTH="80%"
2018ALIGN="LEFT"
2019VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002020> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002021></TR
2022><TR
2023><TD
2024WIDTH="20%"
2025ALIGN="RIGHT"
2026VALIGN="TOP"
2027><TT
2028CLASS="PARAMETER"
2029><I
2030>userData</I
2031></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002032>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002033><TD
2034WIDTH="80%"
2035ALIGN="LEFT"
2036VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002037> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002038></TR
2039><TR
2040><TD
2041WIDTH="20%"
2042ALIGN="RIGHT"
2043VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002044><SPAN
2045CLASS="emphasis"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002046><I
2047CLASS="EMPHASIS"
2048>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002049></SPAN
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002050> :</TD
2051><TD
2052WIDTH="80%"
2053ALIGN="LEFT"
2054VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002055>the resulting document tree unless SAX is NULL or the document is
Daniel Veillardaec63562003-03-23 20:42:17 +00002056 not well formed.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002057></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002058></TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002059></TABLE
2060><P
2061></P
2062></DIV
2063></DIV
2064><HR><DIV
2065CLASS="REFSECT2"
2066><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002067NAME="AEN13593"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002068></A
2069><H3
2070><A
2071NAME="HTMLPARSEFILE"
2072></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002073>htmlParseFile ()</H3
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002074><TABLE
2075BORDER="0"
2076BGCOLOR="#D6E8FF"
2077WIDTH="100%"
2078CELLPADDING="6"
2079><TR
2080><TD
2081><PRE
2082CLASS="PROGRAMLISTING"
2083><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002084HREF="libxml-htmlparser.html#HTMLDOCPTR"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002085>htmlDocPtr</A
2086> htmlParseFile (const char *filename,
2087 const char *encoding);</PRE
2088></TD
2089></TR
2090></TABLE
2091><P
2092>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
2093compressed document is provided by default if found at compile-time.</P
2094><P
2095></P
2096><DIV
2097CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002098><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002099NAME="AEN13600"
2100></A
2101><P
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002102></P
2103><TABLE
2104BORDER="0"
2105WIDTH="100%"
2106BGCOLOR="#FFD0D0"
2107CELLSPACING="0"
2108CELLPADDING="4"
2109CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002110><TBODY
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002111><TR
2112><TD
2113WIDTH="20%"
2114ALIGN="RIGHT"
2115VALIGN="TOP"
2116><TT
2117CLASS="PARAMETER"
2118><I
2119>filename</I
2120></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002121>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002122><TD
2123WIDTH="80%"
2124ALIGN="LEFT"
2125VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002126> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002127></TR
2128><TR
2129><TD
2130WIDTH="20%"
2131ALIGN="RIGHT"
2132VALIGN="TOP"
2133><TT
2134CLASS="PARAMETER"
2135><I
2136>encoding</I
2137></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002138>&nbsp;:</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002139><TD
2140WIDTH="80%"
2141ALIGN="LEFT"
2142VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002143> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002144></TR
2145><TR
2146><TD
2147WIDTH="20%"
2148ALIGN="RIGHT"
2149VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002150><SPAN
2151CLASS="emphasis"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002152><I
2153CLASS="EMPHASIS"
2154>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002155></SPAN
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002156> :</TD
2157><TD
2158WIDTH="80%"
2159ALIGN="LEFT"
2160VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002161>the resulting document tree</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002162></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002163></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002164></TABLE
2165><P
2166></P
2167></DIV
2168></DIV
2169><HR><DIV
2170CLASS="REFSECT2"
2171><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002172NAME="AEN13617"
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002173></A
2174><H3
2175><A
2176NAME="UTF8TOHTML"
2177></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002178>UTF8ToHtml ()</H3
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002179><TABLE
2180BORDER="0"
2181BGCOLOR="#D6E8FF"
2182WIDTH="100%"
2183CELLPADDING="6"
2184><TR
2185><TD
2186><PRE
2187CLASS="PROGRAMLISTING"
2188>int UTF8ToHtml (unsigned char *out,
2189 int *outlen,
2190 unsigned char *in,
2191 int *inlen);</PRE
2192></TD
2193></TR
2194></TABLE
2195><P
2196>Take a block of UTF-8 chars in and try to convert it to an ASCII
2197plus HTML entities block of chars out.</P
2198><P
2199></P
2200><DIV
2201CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002202><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002203NAME="AEN13623"
2204></A
2205><P
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002206></P
2207><TABLE
2208BORDER="0"
2209WIDTH="100%"
2210BGCOLOR="#FFD0D0"
2211CELLSPACING="0"
2212CELLPADDING="4"
2213CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002214><TBODY
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002215><TR
2216><TD
2217WIDTH="20%"
2218ALIGN="RIGHT"
2219VALIGN="TOP"
2220><TT
2221CLASS="PARAMETER"
2222><I
2223>out</I
2224></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002225>&nbsp;:</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002226><TD
2227WIDTH="80%"
2228ALIGN="LEFT"
2229VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002230> a pointer to an array of bytes to store the result</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002231></TR
2232><TR
2233><TD
2234WIDTH="20%"
2235ALIGN="RIGHT"
2236VALIGN="TOP"
2237><TT
2238CLASS="PARAMETER"
2239><I
2240>outlen</I
2241></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002242>&nbsp;:</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002243><TD
2244WIDTH="80%"
2245ALIGN="LEFT"
2246VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002247> the length of <TT
2248CLASS="PARAMETER"
2249><I
2250>out</I
2251></TT
2252></TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002253></TR
2254><TR
2255><TD
2256WIDTH="20%"
2257ALIGN="RIGHT"
2258VALIGN="TOP"
2259><TT
2260CLASS="PARAMETER"
2261><I
2262>in</I
2263></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002264>&nbsp;:</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002265><TD
2266WIDTH="80%"
2267ALIGN="LEFT"
2268VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002269> a pointer to an array of UTF-8 chars</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002270></TR
2271><TR
2272><TD
2273WIDTH="20%"
2274ALIGN="RIGHT"
2275VALIGN="TOP"
2276><TT
2277CLASS="PARAMETER"
2278><I
2279>inlen</I
2280></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002281>&nbsp;:</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002282><TD
2283WIDTH="80%"
2284ALIGN="LEFT"
2285VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002286> the length of <TT
2287CLASS="PARAMETER"
2288><I
2289>in</I
2290></TT
2291></TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002292></TR
2293><TR
2294><TD
2295WIDTH="20%"
2296ALIGN="RIGHT"
2297VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002298><SPAN
2299CLASS="emphasis"
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002300><I
2301CLASS="EMPHASIS"
2302>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002303></SPAN
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002304> :</TD
2305><TD
2306WIDTH="80%"
2307ALIGN="LEFT"
2308VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002309>0 if success, -2 if the transcoding fails, or -1 otherwise
2310The value of <TT
2311CLASS="PARAMETER"
2312><I
2313>inlen</I
2314></TT
2315> after return is the number of octets consumed
Daniel Veillardaec63562003-03-23 20:42:17 +00002316 as the return value is positive, else unpredictable.
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002317The value of <TT
2318CLASS="PARAMETER"
2319><I
2320>outlen</I
2321></TT
2322> after return is the number of octets consumed.</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002323></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002324></TBODY
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002325></TABLE
2326><P
2327></P
2328></DIV
2329></DIV
2330><HR><DIV
2331CLASS="REFSECT2"
2332><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002333NAME="AEN13652"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002334></A
2335><H3
2336><A
2337NAME="HTMLENCODEENTITIES"
2338></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002339>htmlEncodeEntities ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002340><TABLE
2341BORDER="0"
2342BGCOLOR="#D6E8FF"
2343WIDTH="100%"
2344CELLPADDING="6"
2345><TR
2346><TD
2347><PRE
2348CLASS="PROGRAMLISTING"
2349>int htmlEncodeEntities (unsigned char *out,
2350 int *outlen,
2351 unsigned char *in,
2352 int *inlen,
2353 int quoteChar);</PRE
2354></TD
2355></TR
2356></TABLE
2357><P
2358>Take a block of UTF-8 chars in and try to convert it to an ASCII
2359plus HTML entities block of chars out.</P
2360><P
2361></P
2362><DIV
2363CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002364><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002365NAME="AEN13658"
2366></A
2367><P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002368></P
2369><TABLE
2370BORDER="0"
2371WIDTH="100%"
2372BGCOLOR="#FFD0D0"
2373CELLSPACING="0"
2374CELLPADDING="4"
2375CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002376><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002377><TR
2378><TD
2379WIDTH="20%"
2380ALIGN="RIGHT"
2381VALIGN="TOP"
2382><TT
2383CLASS="PARAMETER"
2384><I
2385>out</I
2386></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002387>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002388><TD
2389WIDTH="80%"
2390ALIGN="LEFT"
2391VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002392> a pointer to an array of bytes to store the result</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002393></TR
2394><TR
2395><TD
2396WIDTH="20%"
2397ALIGN="RIGHT"
2398VALIGN="TOP"
2399><TT
2400CLASS="PARAMETER"
2401><I
2402>outlen</I
2403></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002404>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002405><TD
2406WIDTH="80%"
2407ALIGN="LEFT"
2408VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002409> the length of <TT
2410CLASS="PARAMETER"
2411><I
2412>out</I
2413></TT
2414></TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002415></TR
2416><TR
2417><TD
2418WIDTH="20%"
2419ALIGN="RIGHT"
2420VALIGN="TOP"
2421><TT
2422CLASS="PARAMETER"
2423><I
2424>in</I
2425></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002426>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002427><TD
2428WIDTH="80%"
2429ALIGN="LEFT"
2430VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002431> a pointer to an array of UTF-8 chars</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002432></TR
2433><TR
2434><TD
2435WIDTH="20%"
2436ALIGN="RIGHT"
2437VALIGN="TOP"
2438><TT
2439CLASS="PARAMETER"
2440><I
2441>inlen</I
2442></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002443>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002444><TD
2445WIDTH="80%"
2446ALIGN="LEFT"
2447VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002448> the length of <TT
2449CLASS="PARAMETER"
2450><I
2451>in</I
2452></TT
2453></TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002454></TR
2455><TR
2456><TD
2457WIDTH="20%"
2458ALIGN="RIGHT"
2459VALIGN="TOP"
2460><TT
2461CLASS="PARAMETER"
2462><I
2463>quoteChar</I
2464></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002465>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002466><TD
2467WIDTH="80%"
2468ALIGN="LEFT"
2469VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002470> the quote character to escape (' or ") or zero.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002471></TR
2472><TR
2473><TD
2474WIDTH="20%"
2475ALIGN="RIGHT"
2476VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002477><SPAN
2478CLASS="emphasis"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002479><I
2480CLASS="EMPHASIS"
2481>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002482></SPAN
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002483> :</TD
2484><TD
2485WIDTH="80%"
2486ALIGN="LEFT"
2487VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002488>0 if success, -2 if the transcoding fails, or -1 otherwise
2489The value of <TT
2490CLASS="PARAMETER"
2491><I
2492>inlen</I
2493></TT
2494> after return is the number of octets consumed
Daniel Veillardaec63562003-03-23 20:42:17 +00002495 as the return value is positive, else unpredictable.
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002496The value of <TT
2497CLASS="PARAMETER"
2498><I
2499>outlen</I
2500></TT
2501> after return is the number of octets consumed.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002502></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002503></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002504></TABLE
2505><P
2506></P
2507></DIV
2508></DIV
2509><HR><DIV
2510CLASS="REFSECT2"
2511><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002512NAME="AEN13691"
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002513></A
2514><H3
2515><A
2516NAME="HTMLISSCRIPTATTRIBUTE"
2517></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002518>htmlIsScriptAttribute ()</H3
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002519><TABLE
2520BORDER="0"
2521BGCOLOR="#D6E8FF"
2522WIDTH="100%"
2523CELLPADDING="6"
2524><TR
2525><TD
2526><PRE
2527CLASS="PROGRAMLISTING"
2528>int htmlIsScriptAttribute (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002529HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002530>xmlChar</A
2531> *name);</PRE
2532></TD
2533></TR
2534></TABLE
2535><P
2536>Check if an attribute is of content type Script</P
2537><P
2538></P
2539><DIV
2540CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002541><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002542NAME="AEN13698"
2543></A
2544><P
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002545></P
2546><TABLE
2547BORDER="0"
2548WIDTH="100%"
2549BGCOLOR="#FFD0D0"
2550CELLSPACING="0"
2551CELLPADDING="4"
2552CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002553><TBODY
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002554><TR
2555><TD
2556WIDTH="20%"
2557ALIGN="RIGHT"
2558VALIGN="TOP"
2559><TT
2560CLASS="PARAMETER"
2561><I
2562>name</I
2563></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002564>&nbsp;:</TD
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002565><TD
2566WIDTH="80%"
2567ALIGN="LEFT"
2568VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002569> an attribute name</TD
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002570></TR
2571><TR
2572><TD
2573WIDTH="20%"
2574ALIGN="RIGHT"
2575VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002576><SPAN
2577CLASS="emphasis"
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002578><I
2579CLASS="EMPHASIS"
2580>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002581></SPAN
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002582> :</TD
2583><TD
2584WIDTH="80%"
2585ALIGN="LEFT"
2586VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002587>1 is the attribute is a script 0 otherwise</TD
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002588></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002589></TBODY
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002590></TABLE
2591><P
2592></P
2593></DIV
2594></DIV
2595><HR><DIV
2596CLASS="REFSECT2"
2597><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002598NAME="AEN13711"
Daniel Veillard503b8932001-01-05 06:36:31 +00002599></A
2600><H3
2601><A
2602NAME="HTMLHANDLEOMITTEDELEM"
2603></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002604>htmlHandleOmittedElem ()</H3
Daniel Veillard503b8932001-01-05 06:36:31 +00002605><TABLE
2606BORDER="0"
2607BGCOLOR="#D6E8FF"
2608WIDTH="100%"
2609CELLPADDING="6"
2610><TR
2611><TD
2612><PRE
2613CLASS="PROGRAMLISTING"
2614>int htmlHandleOmittedElem (int val);</PRE
2615></TD
2616></TR
2617></TABLE
2618><P
2619>Set and return the previous value for handling HTML omitted tags.</P
2620><P
2621></P
2622><DIV
2623CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002624><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002625NAME="AEN13717"
2626></A
2627><P
Daniel Veillard503b8932001-01-05 06:36:31 +00002628></P
2629><TABLE
2630BORDER="0"
2631WIDTH="100%"
2632BGCOLOR="#FFD0D0"
2633CELLSPACING="0"
2634CELLPADDING="4"
2635CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002636><TBODY
Daniel Veillard503b8932001-01-05 06:36:31 +00002637><TR
2638><TD
2639WIDTH="20%"
2640ALIGN="RIGHT"
2641VALIGN="TOP"
2642><TT
2643CLASS="PARAMETER"
2644><I
2645>val</I
2646></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002647>&nbsp;:</TD
Daniel Veillard503b8932001-01-05 06:36:31 +00002648><TD
2649WIDTH="80%"
2650ALIGN="LEFT"
2651VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002652> int 0 or 1 </TD
Daniel Veillard503b8932001-01-05 06:36:31 +00002653></TR
2654><TR
2655><TD
2656WIDTH="20%"
2657ALIGN="RIGHT"
2658VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002659><SPAN
2660CLASS="emphasis"
Daniel Veillard503b8932001-01-05 06:36:31 +00002661><I
2662CLASS="EMPHASIS"
2663>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002664></SPAN
Daniel Veillard503b8932001-01-05 06:36:31 +00002665> :</TD
2666><TD
2667WIDTH="80%"
2668ALIGN="LEFT"
2669VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002670>the last value for 0 for no handling, 1 for auto insertion.</TD
Daniel Veillard503b8932001-01-05 06:36:31 +00002671></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002672></TBODY
Daniel Veillard503b8932001-01-05 06:36:31 +00002673></TABLE
2674><P
2675></P
2676></DIV
2677></DIV
2678><HR><DIV
2679CLASS="REFSECT2"
2680><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002681NAME="AEN13730"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002682></A
2683><H3
2684><A
2685NAME="HTMLFREEPARSERCTXT"
2686></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002687>htmlFreeParserCtxt ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002688><TABLE
2689BORDER="0"
2690BGCOLOR="#D6E8FF"
2691WIDTH="100%"
2692CELLPADDING="6"
2693><TR
2694><TD
2695><PRE
2696CLASS="PROGRAMLISTING"
2697>void htmlFreeParserCtxt (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002698HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002699>htmlParserCtxtPtr</A
2700> ctxt);</PRE
2701></TD
2702></TR
2703></TABLE
2704><P
2705>Free all the memory used by a parser context. However the parsed
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002706document in ctxt-&gt;myDoc is not freed.</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002707><P
2708></P
2709><DIV
2710CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002711><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002712NAME="AEN13737"
2713></A
2714><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002715></P
2716><TABLE
2717BORDER="0"
2718WIDTH="100%"
2719BGCOLOR="#FFD0D0"
2720CELLSPACING="0"
2721CELLPADDING="4"
2722CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002723><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002724><TR
2725><TD
2726WIDTH="20%"
2727ALIGN="RIGHT"
2728VALIGN="TOP"
2729><TT
2730CLASS="PARAMETER"
2731><I
2732>ctxt</I
2733></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002734>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002735><TD
2736WIDTH="80%"
2737ALIGN="LEFT"
2738VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002739> an HTML parser context</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002740></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002741></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002742></TABLE
2743><P
2744></P
2745></DIV
2746></DIV
2747><HR><DIV
2748CLASS="REFSECT2"
2749><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002750NAME="AEN13746"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002751></A
2752><H3
2753><A
2754NAME="HTMLCREATEPUSHPARSERCTXT"
2755></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002756>htmlCreatePushParserCtxt ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002757><TABLE
2758BORDER="0"
2759BGCOLOR="#D6E8FF"
2760WIDTH="100%"
2761CELLPADDING="6"
2762><TR
2763><TD
2764><PRE
2765CLASS="PROGRAMLISTING"
2766><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002767HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002768>htmlParserCtxtPtr</A
2769> htmlCreatePushParserCtxt (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002770HREF="libxml-htmlparser.html#HTMLSAXHANDLERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002771>htmlSAXHandlerPtr</A
2772> sax,
2773 void *user_data,
2774 const char *chunk,
2775 int size,
2776 const char *filename,
2777 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002778HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002779>xmlCharEncoding</A
2780> enc);</PRE
2781></TD
2782></TR
2783></TABLE
2784><P
2785>Create a parser context for using the HTML parser in push mode
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002786The value of <TT
2787CLASS="PARAMETER"
2788><I
2789>filename</I
2790></TT
2791> is used for fetching external entities
2792and error/warning reports.</P
2793><P
2794></P
2795><DIV
2796CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002797><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002798NAME="AEN13756"
2799></A
2800><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002801></P
2802><TABLE
2803BORDER="0"
2804WIDTH="100%"
2805BGCOLOR="#FFD0D0"
2806CELLSPACING="0"
2807CELLPADDING="4"
2808CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002809><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002810><TR
2811><TD
2812WIDTH="20%"
2813ALIGN="RIGHT"
2814VALIGN="TOP"
2815><TT
2816CLASS="PARAMETER"
2817><I
2818>sax</I
2819></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002820>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002821><TD
2822WIDTH="80%"
2823ALIGN="LEFT"
2824VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002825> a SAX handler</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002826></TR
2827><TR
2828><TD
2829WIDTH="20%"
2830ALIGN="RIGHT"
2831VALIGN="TOP"
2832><TT
2833CLASS="PARAMETER"
2834><I
2835>user_data</I
2836></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002837>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002838><TD
2839WIDTH="80%"
2840ALIGN="LEFT"
2841VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002842> The user data returned on SAX callbacks</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002843></TR
2844><TR
2845><TD
2846WIDTH="20%"
2847ALIGN="RIGHT"
2848VALIGN="TOP"
2849><TT
2850CLASS="PARAMETER"
2851><I
2852>chunk</I
2853></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002854>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002855><TD
2856WIDTH="80%"
2857ALIGN="LEFT"
2858VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002859> a pointer to an array of chars</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002860></TR
2861><TR
2862><TD
2863WIDTH="20%"
2864ALIGN="RIGHT"
2865VALIGN="TOP"
2866><TT
2867CLASS="PARAMETER"
2868><I
2869>size</I
2870></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002871>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002872><TD
2873WIDTH="80%"
2874ALIGN="LEFT"
2875VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002876> number of chars in the array</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002877></TR
2878><TR
2879><TD
2880WIDTH="20%"
2881ALIGN="RIGHT"
2882VALIGN="TOP"
2883><TT
2884CLASS="PARAMETER"
2885><I
2886>filename</I
2887></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002888>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002889><TD
2890WIDTH="80%"
2891ALIGN="LEFT"
2892VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002893> an optional file name or URI</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002894></TR
2895><TR
2896><TD
2897WIDTH="20%"
2898ALIGN="RIGHT"
2899VALIGN="TOP"
2900><TT
2901CLASS="PARAMETER"
2902><I
2903>enc</I
2904></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002905>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002906><TD
2907WIDTH="80%"
2908ALIGN="LEFT"
2909VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002910> an optional encoding</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002911></TR
2912><TR
2913><TD
2914WIDTH="20%"
2915ALIGN="RIGHT"
2916VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002917><SPAN
2918CLASS="emphasis"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002919><I
2920CLASS="EMPHASIS"
2921>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002922></SPAN
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002923> :</TD
2924><TD
2925WIDTH="80%"
2926ALIGN="LEFT"
2927VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002928>the new parser context or NULL</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002929></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002930></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002931></TABLE
2932><P
2933></P
2934></DIV
2935></DIV
2936><HR><DIV
2937CLASS="REFSECT2"
2938><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002939NAME="AEN13789"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002940></A
2941><H3
2942><A
2943NAME="HTMLPARSECHUNK"
2944></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002945>htmlParseChunk ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002946><TABLE
2947BORDER="0"
2948BGCOLOR="#D6E8FF"
2949WIDTH="100%"
2950CELLPADDING="6"
2951><TR
2952><TD
2953><PRE
2954CLASS="PROGRAMLISTING"
2955>int htmlParseChunk (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002956HREF="libxml-htmlparser.html#HTMLPARSERCTXTPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002957>htmlParserCtxtPtr</A
2958> ctxt,
2959 const char *chunk,
2960 int size,
2961 int terminate);</PRE
2962></TD
2963></TR
2964></TABLE
2965><P
2966>Parse a Chunk of memory</P
2967><P
2968></P
2969><DIV
2970CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002971><A
Daniel Veillardaec63562003-03-23 20:42:17 +00002972NAME="AEN13796"
2973></A
2974><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002975></P
2976><TABLE
2977BORDER="0"
2978WIDTH="100%"
2979BGCOLOR="#FFD0D0"
2980CELLSPACING="0"
2981CELLPADDING="4"
2982CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002983><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002984><TR
2985><TD
2986WIDTH="20%"
2987ALIGN="RIGHT"
2988VALIGN="TOP"
2989><TT
2990CLASS="PARAMETER"
2991><I
2992>ctxt</I
2993></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002994>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002995><TD
2996WIDTH="80%"
2997ALIGN="LEFT"
2998VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002999> an XML parser context</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003000></TR
3001><TR
3002><TD
3003WIDTH="20%"
3004ALIGN="RIGHT"
3005VALIGN="TOP"
3006><TT
3007CLASS="PARAMETER"
3008><I
3009>chunk</I
3010></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003011>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003012><TD
3013WIDTH="80%"
3014ALIGN="LEFT"
3015VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003016> an char array</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003017></TR
3018><TR
3019><TD
3020WIDTH="20%"
3021ALIGN="RIGHT"
3022VALIGN="TOP"
3023><TT
3024CLASS="PARAMETER"
3025><I
3026>size</I
3027></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003028>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003029><TD
3030WIDTH="80%"
3031ALIGN="LEFT"
3032VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003033> the size in byte of the chunk</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003034></TR
3035><TR
3036><TD
3037WIDTH="20%"
3038ALIGN="RIGHT"
3039VALIGN="TOP"
3040><TT
3041CLASS="PARAMETER"
3042><I
3043>terminate</I
3044></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003045>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003046><TD
3047WIDTH="80%"
3048ALIGN="LEFT"
3049VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003050> last chunk indicator</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003051></TR
3052><TR
3053><TD
3054WIDTH="20%"
3055ALIGN="RIGHT"
3056VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00003057><SPAN
3058CLASS="emphasis"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003059><I
3060CLASS="EMPHASIS"
3061>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00003062></SPAN
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00003063> :</TD
3064><TD
3065WIDTH="80%"
3066ALIGN="LEFT"
3067VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003068>zero if no error, the xmlParserErrors otherwise.</TD
Daniel Veillard437b87b2000-01-03 17:30:46 +00003069></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00003070></TBODY
Daniel Veillard437b87b2000-01-03 17:30:46 +00003071></TABLE
3072><P
3073></P
3074></DIV
3075></DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +00003076></DIV
3077><DIV
3078CLASS="NAVFOOTER"
Daniel Veillard00fdf371999-10-08 09:40:39 +00003079><BR
3080CLEAR="all"><BR><TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +00003081WIDTH="100%"
3082BORDER="0"
3083BGCOLOR="#000000"
3084CELLPADDING="1"
3085CELLSPACING="0"
3086><TR
3087><TD
3088WIDTH="25%"
3089BGCOLOR="#C00000"
3090ALIGN="left"
3091><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003092HREF="libxml-xmlerror.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00003093><FONT
3094COLOR="#FFFFFF"
3095SIZE="3"
3096><B
3097>&#60;&#60;&#60; Previous Page</B
3098></FONT
3099></A
3100></TD
3101><TD
3102WIDTH="25%"
3103BGCOLOR="#0000C0"
3104ALIGN="center"
3105><FONT
3106COLOR="#FFFFFF"
3107SIZE="3"
3108><B
3109><A
3110HREF="book1.html"
3111><FONT
3112COLOR="#FFFFFF"
3113SIZE="3"
3114><B
3115>Home</B
3116></FONT
3117></A
3118></B
3119></FONT
3120></TD
3121><TD
3122WIDTH="25%"
3123BGCOLOR="#00C000"
3124ALIGN="center"
3125><FONT
3126COLOR="#FFFFFF"
3127SIZE="3"
3128><B
3129><A
Daniel Veillard35008381999-10-25 13:15:52 +00003130HREF="libxml-lib.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00003131><FONT
3132COLOR="#FFFFFF"
3133SIZE="3"
3134><B
3135>Up</B
3136></FONT
3137></A
3138></B
3139></FONT
3140></TD
3141><TD
3142WIDTH="25%"
3143BGCOLOR="#C00000"
3144ALIGN="right"
3145><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00003146HREF="libxml-htmltree.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00003147><FONT
3148COLOR="#FFFFFF"
3149SIZE="3"
3150><B
3151>Next Page &#62;&#62;&#62;</B
3152></FONT
3153></A
3154></TD
3155></TR
3156><TR
3157><TD
3158COLSPAN="2"
3159ALIGN="left"
3160><FONT
3161COLOR="#FFFFFF"
3162SIZE="3"
3163><B
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003164>xmlerror</B
Daniel Veillard1566d3a1999-07-15 14:24:29 +00003165></FONT
3166></TD
3167><TD
3168COLSPAN="2"
3169ALIGN="right"
3170><FONT
3171COLOR="#FFFFFF"
3172SIZE="3"
3173><B
3174>HTMLtree</B
3175></FONT
3176></TD
3177></TR
3178></TABLE
3179></DIV
3180></BODY
3181></HTML
3182>