blob: 68693d9fcb3b79d9f0955c817a263d06890314ec [file] [log] [blame]
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001<HTML
2><HEAD
3><TITLE
4>HTMLparser</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +00008REL="HOME"
9TITLE="Gnome XML Library Reference Manual"
10HREF="book1.html"><LINK
11REL="UP"
Daniel Veillard35008381999-10-25 13:15:52 +000012TITLE="Libxml Library Reference"
13HREF="libxml-lib.html"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +000014REL="PREVIOUS"
Daniel Veillard6bd26dc1999-09-03 14:28:40 +000015TITLE="xml-error"
16HREF="gnome-xml-xml-error.html"><LINK
Daniel Veillard1566d3a1999-07-15 14:24:29 +000017REL="NEXT"
18TITLE="HTMLtree"
19HREF="gnome-xml-htmltree.html"></HEAD
20><BODY
21BGCOLOR="#FFFFFF"
22TEXT="#000000"
23><DIV
24CLASS="NAVHEADER"
25><TABLE
26WIDTH="100%"
27BORDER="0"
28BGCOLOR="#000000"
29CELLPADDING="1"
30CELLSPACING="0"
31><TR
32><TH
33COLSPAN="4"
34ALIGN="center"
35><FONT
36COLOR="#FFFFFF"
37SIZE="5"
38>Gnome XML Library Reference Manual</FONT
39></TH
40></TR
41><TR
42><TD
43WIDTH="25%"
44BGCOLOR="#C00000"
45ALIGN="left"
46><A
Daniel Veillard6bd26dc1999-09-03 14:28:40 +000047HREF="gnome-xml-xml-error.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +000048><FONT
49COLOR="#FFFFFF"
50SIZE="3"
51><B
52>&#60;&#60;&#60; Previous Page</B
53></FONT
54></A
55></TD
56><TD
57WIDTH="25%"
58BGCOLOR="#0000C0"
59ALIGN="center"
60><FONT
61COLOR="#FFFFFF"
62SIZE="3"
63><B
64><A
65HREF="book1.html"
66><FONT
67COLOR="#FFFFFF"
68SIZE="3"
69><B
70>Home</B
71></FONT
72></A
73></B
74></FONT
75></TD
76><TD
77WIDTH="25%"
78BGCOLOR="#00C000"
79ALIGN="center"
80><FONT
81COLOR="#FFFFFF"
82SIZE="3"
83><B
84><A
Daniel Veillard35008381999-10-25 13:15:52 +000085HREF="libxml-lib.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +000086><FONT
87COLOR="#FFFFFF"
88SIZE="3"
89><B
90>Up</B
91></FONT
92></A
93></B
94></FONT
95></TD
96><TD
97WIDTH="25%"
98BGCOLOR="#C00000"
99ALIGN="right"
100><A
101HREF="gnome-xml-htmltree.html"
102><FONT
103COLOR="#FFFFFF"
104SIZE="3"
105><B
106>Next Page &#62;&#62;&#62;</B
107></FONT
108></A
109></TD
110></TR
111></TABLE
112></DIV
113><H1
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000114>HTMLparser</H1
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000115><DIV
116CLASS="REFNAMEDIV"
117><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000118NAME="AEN9635"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000119></A
120><H2
121>Name</H2
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000122>HTMLparser &#8212; </DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000123><DIV
124CLASS="REFSYNOPSISDIV"
125><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000126NAME="AEN9638"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000127></A
128><H2
129>Synopsis</H2
130><TABLE
131BORDER="0"
132BGCOLOR="#D6E8FF"
133WIDTH="100%"
134CELLPADDING="6"
135><TR
136><TD
137><PRE
138CLASS="SYNOPSIS"
139>&#13;
140
141typedef <A
142HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXT"
143>htmlParserCtxt</A
144>;
145typedef <A
146HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
147>htmlParserCtxtPtr</A
148>;
149typedef <A
150HREF="gnome-xml-htmlparser.html#HTMLPARSERNODEINFO"
151>htmlParserNodeInfo</A
152>;
153typedef <A
154HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLER"
155>htmlSAXHandler</A
156>;
157typedef <A
158HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
159>htmlSAXHandlerPtr</A
160>;
161typedef <A
162HREF="gnome-xml-htmlparser.html#HTMLPARSERINPUT"
163>htmlParserInput</A
164>;
165typedef <A
166HREF="gnome-xml-htmlparser.html#HTMLPARSERINPUTPTR"
167>htmlParserInputPtr</A
168>;
169typedef <A
170HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
171>htmlDocPtr</A
172>;
173typedef <A
174HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
175>htmlNodePtr</A
176>;
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000177struct <A
178HREF="gnome-xml-htmlparser.html#HTMLELEMDESC"
179>htmlElemDesc</A
180>;
181typedef <A
182HREF="gnome-xml-htmlparser.html#HTMLELEMDESCPTR"
183>htmlElemDescPtr</A
184>;
185struct <A
186HREF="gnome-xml-htmlparser.html#HTMLENTITYDESC"
187>htmlEntityDesc</A
188>;
189typedef <A
190HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
191>htmlEntityDescPtr</A
192>;
193<A
194HREF="gnome-xml-htmlparser.html#HTMLELEMDESCPTR"
195>htmlElemDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000196> <A
197HREF="gnome-xml-htmlparser.html#HTMLTAGLOOKUP"
198>htmlTagLookup</A
199> (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000200HREF="gnome-xml-tree.html#XMLCHAR"
201>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000202> *tag);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000203<A
204HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
205>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000206> <A
207HREF="gnome-xml-htmlparser.html#HTMLENTITYLOOKUP"
208>htmlEntityLookup</A
209> (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000210HREF="gnome-xml-tree.html#XMLCHAR"
211>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000212> *name);
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000213<A
214HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
215>htmlEntityDescPtr</A
216> <A
217HREF="gnome-xml-htmlparser.html#HTMLENTITYVALUELOOKUP"
218>htmlEntityValueLookup</A
219> (int value);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000220int <A
221HREF="gnome-xml-htmlparser.html#HTMLISAUTOCLOSED"
222>htmlIsAutoClosed</A
223> (<A
224HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
225>htmlDocPtr</A
226> doc,
227 <A
228HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
229>htmlNodePtr</A
230> elem);
231int <A
232HREF="gnome-xml-htmlparser.html#HTMLAUTOCLOSETAG"
233>htmlAutoCloseTag</A
234> (<A
235HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
236>htmlDocPtr</A
237> doc,
238 const <A
239HREF="gnome-xml-tree.html#XMLCHAR"
240>xmlChar</A
241> *name,
242 <A
243HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
244>htmlNodePtr</A
245> elem);
246<A
247HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
248>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000249> <A
250HREF="gnome-xml-htmlparser.html#HTMLPARSEENTITYREF"
251>htmlParseEntityRef</A
252> (<A
253HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
254>htmlParserCtxtPtr</A
255> ctxt,
256 <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000257HREF="gnome-xml-tree.html#XMLCHAR"
258>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000259> **str);
260int <A
261HREF="gnome-xml-htmlparser.html#HTMLPARSECHARREF"
262>htmlParseCharRef</A
263> (<A
264HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
265>htmlParserCtxtPtr</A
266> ctxt);
267void <A
268HREF="gnome-xml-htmlparser.html#HTMLPARSEELEMENT"
269>htmlParseElement</A
270> (<A
271HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
272>htmlParserCtxtPtr</A
273> ctxt);
274<A
275HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
276>htmlDocPtr</A
277> <A
278HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEDOC"
279>htmlSAXParseDoc</A
280> (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000281HREF="gnome-xml-tree.html#XMLCHAR"
282>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000283> *cur,
284 const char *encoding,
285 <A
286HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
287>htmlSAXHandlerPtr</A
288> sax,
289 void *userData);
290<A
291HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
292>htmlDocPtr</A
293> <A
294HREF="gnome-xml-htmlparser.html#HTMLPARSEDOC"
295>htmlParseDoc</A
296> (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000297HREF="gnome-xml-tree.html#XMLCHAR"
298>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000299> *cur,
300 const char *encoding);
301<A
302HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
303>htmlDocPtr</A
304> <A
305HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEFILE"
306>htmlSAXParseFile</A
307> (const char *filename,
308 const char *encoding,
309 <A
310HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
311>htmlSAXHandlerPtr</A
312> sax,
313 void *userData);
314<A
315HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
316>htmlDocPtr</A
317> <A
318HREF="gnome-xml-htmlparser.html#HTMLPARSEFILE"
319>htmlParseFile</A
320> (const char *filename,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000321 const char *encoding);
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000322int <A
323HREF="gnome-xml-htmlparser.html#UTF8TOHTML"
324>UTF8ToHtml</A
325> (unsigned char *out,
326 int *outlen,
327 unsigned char *in,
328 int *inlen);
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000329int <A
330HREF="gnome-xml-htmlparser.html#HTMLENCODEENTITIES"
331>htmlEncodeEntities</A
332> (unsigned char *out,
333 int *outlen,
334 unsigned char *in,
335 int *inlen,
336 int quoteChar);
Daniel Veillard29a11cc2000-10-25 13:32:39 +0000337int <A
338HREF="gnome-xml-htmlparser.html#HTMLISSCRIPTATTRIBUTE"
339>htmlIsScriptAttribute</A
340> (const <A
341HREF="gnome-xml-tree.html#XMLCHAR"
342>xmlChar</A
343> *name);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000344void <A
345HREF="gnome-xml-htmlparser.html#HTMLFREEPARSERCTXT"
346>htmlFreeParserCtxt</A
347> (<A
348HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
349>htmlParserCtxtPtr</A
350> ctxt);
351<A
352HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
353>htmlParserCtxtPtr</A
354> <A
355HREF="gnome-xml-htmlparser.html#HTMLCREATEPUSHPARSERCTXT"
356>htmlCreatePushParserCtxt</A
357> (<A
358HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
359>htmlSAXHandlerPtr</A
360> sax,
361 void *user_data,
362 const char *chunk,
363 int size,
364 const char *filename,
365 <A
366HREF="gnome-xml-encoding.html#XMLCHARENCODING"
367>xmlCharEncoding</A
368> enc);
369int <A
370HREF="gnome-xml-htmlparser.html#HTMLPARSECHUNK"
371>htmlParseChunk</A
372> (<A
373HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
374>htmlParserCtxtPtr</A
375> ctxt,
376 const char *chunk,
377 int size,
378 int terminate);</PRE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000379></TD
380></TR
381></TABLE
382></DIV
383><DIV
384CLASS="REFSECT1"
385><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000386NAME="AEN9701"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000387></A
388><H2
389>Description</H2
390><P
391></P
392></DIV
393><DIV
394CLASS="REFSECT1"
395><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000396NAME="AEN9704"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000397></A
398><H2
399>Details</H2
400><DIV
401CLASS="REFSECT2"
402><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000403NAME="AEN9706"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000404></A
405><H3
406><A
407NAME="HTMLPARSERCTXT"
408></A
409>htmlParserCtxt</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000410><TABLE
411BORDER="0"
412BGCOLOR="#D6E8FF"
413WIDTH="100%"
414CELLPADDING="6"
415><TR
416><TD
417><PRE
418CLASS="PROGRAMLISTING"
419>typedef xmlParserCtxt htmlParserCtxt;</PRE
420></TD
421></TR
422></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000423><P
424></P
425></DIV
426><HR><DIV
427CLASS="REFSECT2"
428><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000429NAME="AEN9711"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000430></A
431><H3
432><A
433NAME="HTMLPARSERCTXTPTR"
434></A
435>htmlParserCtxtPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000436><TABLE
437BORDER="0"
438BGCOLOR="#D6E8FF"
439WIDTH="100%"
440CELLPADDING="6"
441><TR
442><TD
443><PRE
444CLASS="PROGRAMLISTING"
445>typedef xmlParserCtxtPtr htmlParserCtxtPtr;</PRE
446></TD
447></TR
448></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000449><P
450></P
451></DIV
452><HR><DIV
453CLASS="REFSECT2"
454><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000455NAME="AEN9716"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000456></A
457><H3
458><A
459NAME="HTMLPARSERNODEINFO"
460></A
461>htmlParserNodeInfo</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000462><TABLE
463BORDER="0"
464BGCOLOR="#D6E8FF"
465WIDTH="100%"
466CELLPADDING="6"
467><TR
468><TD
469><PRE
470CLASS="PROGRAMLISTING"
471>typedef xmlParserNodeInfo htmlParserNodeInfo;</PRE
472></TD
473></TR
474></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000475><P
476></P
477></DIV
478><HR><DIV
479CLASS="REFSECT2"
480><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000481NAME="AEN9721"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000482></A
483><H3
484><A
485NAME="HTMLSAXHANDLER"
486></A
487>htmlSAXHandler</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000488><TABLE
489BORDER="0"
490BGCOLOR="#D6E8FF"
491WIDTH="100%"
492CELLPADDING="6"
493><TR
494><TD
495><PRE
496CLASS="PROGRAMLISTING"
497>typedef xmlSAXHandler htmlSAXHandler;</PRE
498></TD
499></TR
500></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000501><P
502></P
503></DIV
504><HR><DIV
505CLASS="REFSECT2"
506><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000507NAME="AEN9726"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000508></A
509><H3
510><A
511NAME="HTMLSAXHANDLERPTR"
512></A
513>htmlSAXHandlerPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000514><TABLE
515BORDER="0"
516BGCOLOR="#D6E8FF"
517WIDTH="100%"
518CELLPADDING="6"
519><TR
520><TD
521><PRE
522CLASS="PROGRAMLISTING"
523>typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;</PRE
524></TD
525></TR
526></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000527><P
528></P
529></DIV
530><HR><DIV
531CLASS="REFSECT2"
532><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000533NAME="AEN9731"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000534></A
535><H3
536><A
537NAME="HTMLPARSERINPUT"
538></A
539>htmlParserInput</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000540><TABLE
541BORDER="0"
542BGCOLOR="#D6E8FF"
543WIDTH="100%"
544CELLPADDING="6"
545><TR
546><TD
547><PRE
548CLASS="PROGRAMLISTING"
549>typedef xmlParserInput htmlParserInput;</PRE
550></TD
551></TR
552></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000553><P
554></P
555></DIV
556><HR><DIV
557CLASS="REFSECT2"
558><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000559NAME="AEN9736"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000560></A
561><H3
562><A
563NAME="HTMLPARSERINPUTPTR"
564></A
565>htmlParserInputPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000566><TABLE
567BORDER="0"
568BGCOLOR="#D6E8FF"
569WIDTH="100%"
570CELLPADDING="6"
571><TR
572><TD
573><PRE
574CLASS="PROGRAMLISTING"
575>typedef xmlParserInputPtr htmlParserInputPtr;</PRE
576></TD
577></TR
578></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000579><P
580></P
581></DIV
582><HR><DIV
583CLASS="REFSECT2"
584><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000585NAME="AEN9741"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000586></A
587><H3
588><A
589NAME="HTMLDOCPTR"
590></A
591>htmlDocPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000592><TABLE
593BORDER="0"
594BGCOLOR="#D6E8FF"
595WIDTH="100%"
596CELLPADDING="6"
597><TR
598><TD
599><PRE
600CLASS="PROGRAMLISTING"
601>typedef xmlDocPtr htmlDocPtr;</PRE
602></TD
603></TR
604></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000605><P
606></P
607></DIV
608><HR><DIV
609CLASS="REFSECT2"
610><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000611NAME="AEN9746"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000612></A
613><H3
614><A
615NAME="HTMLNODEPTR"
616></A
617>htmlNodePtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000618><TABLE
619BORDER="0"
620BGCOLOR="#D6E8FF"
621WIDTH="100%"
622CELLPADDING="6"
623><TR
624><TD
625><PRE
626CLASS="PROGRAMLISTING"
627>typedef xmlNodePtr htmlNodePtr;</PRE
628></TD
629></TR
630></TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000631><P
632></P
633></DIV
634><HR><DIV
635CLASS="REFSECT2"
636><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000637NAME="AEN9751"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000638></A
639><H3
640><A
641NAME="HTMLELEMDESC"
642></A
643>struct htmlElemDesc</H3
644><TABLE
645BORDER="0"
646BGCOLOR="#D6E8FF"
647WIDTH="100%"
648CELLPADDING="6"
649><TR
650><TD
651><PRE
652CLASS="PROGRAMLISTING"
653>struct htmlElemDesc {
654 const char *name; /* The tag name */
655 int startTag; /* Whether the start tag can be implied */
656 int endTag; /* Whether the end tag can be implied */
657 int empty; /* Is this an empty element ? */
658 int depr; /* Is this a deprecated element ? */
659 int dtd; /* 1: only in Loose DTD, 2: only Frameset one */
660 const char *desc; /* the description */
661};</PRE
662></TD
663></TR
664></TABLE
665><P
666></P
667></DIV
668><HR><DIV
669CLASS="REFSECT2"
670><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000671NAME="AEN9756"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000672></A
673><H3
674><A
675NAME="HTMLELEMDESCPTR"
676></A
677>htmlElemDescPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000678><TABLE
679BORDER="0"
680BGCOLOR="#D6E8FF"
681WIDTH="100%"
682CELLPADDING="6"
683><TR
684><TD
685><PRE
686CLASS="PROGRAMLISTING"
687>typedef htmlElemDesc *htmlElemDescPtr;</PRE
688></TD
689></TR
690></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000691><P
692></P
693></DIV
694><HR><DIV
695CLASS="REFSECT2"
696><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000697NAME="AEN9761"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000698></A
699><H3
700><A
701NAME="HTMLENTITYDESC"
702></A
703>struct htmlEntityDesc</H3
704><TABLE
705BORDER="0"
706BGCOLOR="#D6E8FF"
707WIDTH="100%"
708CELLPADDING="6"
709><TR
710><TD
711><PRE
712CLASS="PROGRAMLISTING"
713>struct htmlEntityDesc {
714 int value; /* the UNICODE value for the character */
715 const char *name; /* The entity name */
716 const char *desc; /* the description */
717};</PRE
718></TD
719></TR
720></TABLE
721><P
722></P
723></DIV
724><HR><DIV
725CLASS="REFSECT2"
726><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000727NAME="AEN9766"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000728></A
729><H3
730><A
731NAME="HTMLENTITYDESCPTR"
732></A
733>htmlEntityDescPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000734><TABLE
735BORDER="0"
736BGCOLOR="#D6E8FF"
737WIDTH="100%"
738CELLPADDING="6"
739><TR
740><TD
741><PRE
742CLASS="PROGRAMLISTING"
743>typedef htmlEntityDesc *htmlEntityDescPtr;</PRE
744></TD
745></TR
746></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000747><P
748></P
749></DIV
750><HR><DIV
751CLASS="REFSECT2"
752><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000753NAME="AEN9771"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000754></A
755><H3
756><A
757NAME="HTMLTAGLOOKUP"
758></A
759>htmlTagLookup ()</H3
760><TABLE
761BORDER="0"
762BGCOLOR="#D6E8FF"
763WIDTH="100%"
764CELLPADDING="6"
765><TR
766><TD
767><PRE
768CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000769><A
770HREF="gnome-xml-htmlparser.html#HTMLELEMDESCPTR"
771>htmlElemDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000772> htmlTagLookup (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000773HREF="gnome-xml-tree.html#XMLCHAR"
774>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000775> *tag);</PRE
776></TD
777></TR
778></TABLE
779><P
780>Lookup the HTML tag in the ElementTable</P
781><P
782></P
783><DIV
784CLASS="INFORMALTABLE"
785><P
786></P
787><TABLE
788BORDER="0"
789WIDTH="100%"
790BGCOLOR="#FFD0D0"
791CELLSPACING="0"
792CELLPADDING="4"
793CLASS="CALSTABLE"
794><TR
795><TD
796WIDTH="20%"
797ALIGN="RIGHT"
798VALIGN="TOP"
799><TT
800CLASS="PARAMETER"
801><I
802>tag</I
803></TT
804>&nbsp;:</TD
805><TD
806WIDTH="80%"
807ALIGN="LEFT"
808VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000809> The tag name in lowercase</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000810></TR
811><TR
812><TD
813WIDTH="20%"
814ALIGN="RIGHT"
815VALIGN="TOP"
816><I
817CLASS="EMPHASIS"
818>Returns</I
819> :</TD
820><TD
821WIDTH="80%"
822ALIGN="LEFT"
823VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000824>the related htmlElemDescPtr or NULL if not found.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000825></TR
826></TABLE
827><P
828></P
829></DIV
830></DIV
831><HR><DIV
832CLASS="REFSECT2"
833><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000834NAME="AEN9792"
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000835></A
836><H3
837><A
838NAME="HTMLENTITYLOOKUP"
839></A
840>htmlEntityLookup ()</H3
841><TABLE
842BORDER="0"
843BGCOLOR="#D6E8FF"
844WIDTH="100%"
845CELLPADDING="6"
846><TR
847><TD
848><PRE
849CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000850><A
851HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
852>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000853> htmlEntityLookup (const <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +0000854HREF="gnome-xml-tree.html#XMLCHAR"
855>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000856> *name);</PRE
857></TD
858></TR
859></TABLE
860><P
861>Lookup the given entity in EntitiesTable</P
862><P
863>TODO: the linear scan is really ugly, an hash table is really needed.</P
864><P
865></P
866><DIV
867CLASS="INFORMALTABLE"
868><P
869></P
870><TABLE
871BORDER="0"
872WIDTH="100%"
873BGCOLOR="#FFD0D0"
874CELLSPACING="0"
875CELLPADDING="4"
876CLASS="CALSTABLE"
877><TR
878><TD
879WIDTH="20%"
880ALIGN="RIGHT"
881VALIGN="TOP"
882><TT
883CLASS="PARAMETER"
884><I
885>name</I
886></TT
887>&nbsp;:</TD
888><TD
889WIDTH="80%"
890ALIGN="LEFT"
891VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000892> the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000893></TR
894><TR
895><TD
896WIDTH="20%"
897ALIGN="RIGHT"
898VALIGN="TOP"
899><I
900CLASS="EMPHASIS"
901>Returns</I
902> :</TD
903><TD
904WIDTH="80%"
905ALIGN="LEFT"
906VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000907>the associated htmlEntityDescPtr if found, NULL otherwise.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000908></TR
909></TABLE
910><P
911></P
912></DIV
913></DIV
914><HR><DIV
915CLASS="REFSECT2"
916><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000917NAME="AEN9814"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000918></A
919><H3
920><A
921NAME="HTMLENTITYVALUELOOKUP"
922></A
923>htmlEntityValueLookup ()</H3
924><TABLE
925BORDER="0"
926BGCOLOR="#D6E8FF"
927WIDTH="100%"
928CELLPADDING="6"
929><TR
930><TD
931><PRE
932CLASS="PROGRAMLISTING"
933><A
934HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
935>htmlEntityDescPtr</A
936> htmlEntityValueLookup (int value);</PRE
937></TD
938></TR
939></TABLE
940><P
941>Lookup the given entity in EntitiesTable</P
942><P
943>TODO: the linear scan is really ugly, an hash table is really needed.</P
944><P
945></P
946><DIV
947CLASS="INFORMALTABLE"
948><P
949></P
950><TABLE
951BORDER="0"
952WIDTH="100%"
953BGCOLOR="#FFD0D0"
954CELLSPACING="0"
955CELLPADDING="4"
956CLASS="CALSTABLE"
957><TR
958><TD
959WIDTH="20%"
960ALIGN="RIGHT"
961VALIGN="TOP"
962><TT
963CLASS="PARAMETER"
964><I
965>value</I
966></TT
967>&nbsp;:</TD
968><TD
969WIDTH="80%"
970ALIGN="LEFT"
971VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000972> the entity's unicode value</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000973></TR
974><TR
975><TD
976WIDTH="20%"
977ALIGN="RIGHT"
978VALIGN="TOP"
979><I
980CLASS="EMPHASIS"
981>Returns</I
982> :</TD
983><TD
984WIDTH="80%"
985ALIGN="LEFT"
986VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000987>the associated htmlEntityDescPtr if found, NULL otherwise.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000988></TR
989></TABLE
990><P
991></P
992></DIV
993></DIV
994><HR><DIV
995CLASS="REFSECT2"
996><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000997NAME="AEN9835"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000998></A
999><H3
1000><A
1001NAME="HTMLISAUTOCLOSED"
1002></A
1003>htmlIsAutoClosed ()</H3
1004><TABLE
1005BORDER="0"
1006BGCOLOR="#D6E8FF"
1007WIDTH="100%"
1008CELLPADDING="6"
1009><TR
1010><TD
1011><PRE
1012CLASS="PROGRAMLISTING"
1013>int htmlIsAutoClosed (<A
1014HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1015>htmlDocPtr</A
1016> doc,
1017 <A
1018HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
1019>htmlNodePtr</A
1020> elem);</PRE
1021></TD
1022></TR
1023></TABLE
1024><P
1025>The HTmL DtD allows a tag to implicitely close other tags.
1026The list is kept in htmlStartClose array. This function checks
1027if a tag is autoclosed by one of it's child</P
1028><P
1029></P
1030><DIV
1031CLASS="INFORMALTABLE"
1032><P
1033></P
1034><TABLE
1035BORDER="0"
1036WIDTH="100%"
1037BGCOLOR="#FFD0D0"
1038CELLSPACING="0"
1039CELLPADDING="4"
1040CLASS="CALSTABLE"
1041><TR
1042><TD
1043WIDTH="20%"
1044ALIGN="RIGHT"
1045VALIGN="TOP"
1046><TT
1047CLASS="PARAMETER"
1048><I
1049>doc</I
1050></TT
1051>&nbsp;:</TD
1052><TD
1053WIDTH="80%"
1054ALIGN="LEFT"
1055VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001056> the HTML document</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001057></TR
1058><TR
1059><TD
1060WIDTH="20%"
1061ALIGN="RIGHT"
1062VALIGN="TOP"
1063><TT
1064CLASS="PARAMETER"
1065><I
1066>elem</I
1067></TT
1068>&nbsp;:</TD
1069><TD
1070WIDTH="80%"
1071ALIGN="LEFT"
1072VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001073> the HTML element</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001074></TR
1075><TR
1076><TD
1077WIDTH="20%"
1078ALIGN="RIGHT"
1079VALIGN="TOP"
1080><I
1081CLASS="EMPHASIS"
1082>Returns</I
1083> :</TD
1084><TD
1085WIDTH="80%"
1086ALIGN="LEFT"
1087VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001088>1 if autoclosed, 0 otherwise</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001089></TR
1090></TABLE
1091><P
1092></P
1093></DIV
1094></DIV
1095><HR><DIV
1096CLASS="REFSECT2"
1097><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001098NAME="AEN9860"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001099></A
1100><H3
1101><A
1102NAME="HTMLAUTOCLOSETAG"
1103></A
1104>htmlAutoCloseTag ()</H3
1105><TABLE
1106BORDER="0"
1107BGCOLOR="#D6E8FF"
1108WIDTH="100%"
1109CELLPADDING="6"
1110><TR
1111><TD
1112><PRE
1113CLASS="PROGRAMLISTING"
1114>int htmlAutoCloseTag (<A
1115HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1116>htmlDocPtr</A
1117> doc,
1118 const <A
1119HREF="gnome-xml-tree.html#XMLCHAR"
1120>xmlChar</A
1121> *name,
1122 <A
1123HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
1124>htmlNodePtr</A
1125> elem);</PRE
1126></TD
1127></TR
1128></TABLE
1129><P
1130>The HTmL DtD allows a tag to implicitely close other tags.
1131The list is kept in htmlStartClose array. This function checks
1132if the element or one of it's children would autoclose the
1133given tag.</P
1134><P
1135></P
1136><DIV
1137CLASS="INFORMALTABLE"
1138><P
1139></P
1140><TABLE
1141BORDER="0"
1142WIDTH="100%"
1143BGCOLOR="#FFD0D0"
1144CELLSPACING="0"
1145CELLPADDING="4"
1146CLASS="CALSTABLE"
1147><TR
1148><TD
1149WIDTH="20%"
1150ALIGN="RIGHT"
1151VALIGN="TOP"
1152><TT
1153CLASS="PARAMETER"
1154><I
1155>doc</I
1156></TT
1157>&nbsp;:</TD
1158><TD
1159WIDTH="80%"
1160ALIGN="LEFT"
1161VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001162> the HTML document</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001163></TR
1164><TR
1165><TD
1166WIDTH="20%"
1167ALIGN="RIGHT"
1168VALIGN="TOP"
1169><TT
1170CLASS="PARAMETER"
1171><I
1172>name</I
1173></TT
1174>&nbsp;:</TD
1175><TD
1176WIDTH="80%"
1177ALIGN="LEFT"
1178VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001179> The tag name</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001180></TR
1181><TR
1182><TD
1183WIDTH="20%"
1184ALIGN="RIGHT"
1185VALIGN="TOP"
1186><TT
1187CLASS="PARAMETER"
1188><I
1189>elem</I
1190></TT
1191>&nbsp;:</TD
1192><TD
1193WIDTH="80%"
1194ALIGN="LEFT"
1195VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001196> the HTML element</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001197></TR
1198><TR
1199><TD
1200WIDTH="20%"
1201ALIGN="RIGHT"
1202VALIGN="TOP"
1203><I
1204CLASS="EMPHASIS"
1205>Returns</I
1206> :</TD
1207><TD
1208WIDTH="80%"
1209ALIGN="LEFT"
1210VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001211>1 if autoclose, 0 otherwise</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001212></TR
1213></TABLE
1214><P
1215></P
1216></DIV
1217></DIV
1218><HR><DIV
1219CLASS="REFSECT2"
1220><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001221NAME="AEN9890"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001222></A
1223><H3
1224><A
1225NAME="HTMLPARSEENTITYREF"
1226></A
1227>htmlParseEntityRef ()</H3
1228><TABLE
1229BORDER="0"
1230BGCOLOR="#D6E8FF"
1231WIDTH="100%"
1232CELLPADDING="6"
1233><TR
1234><TD
1235><PRE
1236CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001237><A
1238HREF="gnome-xml-htmlparser.html#HTMLENTITYDESCPTR"
1239>htmlEntityDescPtr</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001240> htmlParseEntityRef (<A
1241HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1242>htmlParserCtxtPtr</A
1243> ctxt,
1244 <A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001245HREF="gnome-xml-tree.html#XMLCHAR"
1246>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001247> **str);</PRE
1248></TD
1249></TR
1250></TABLE
1251><P
1252>parse an HTML ENTITY references</P
1253><P
1254>[68] EntityRef ::= '&amp;' Name ';'</P
1255><P
1256></P
1257><DIV
1258CLASS="INFORMALTABLE"
1259><P
1260></P
1261><TABLE
1262BORDER="0"
1263WIDTH="100%"
1264BGCOLOR="#FFD0D0"
1265CELLSPACING="0"
1266CELLPADDING="4"
1267CLASS="CALSTABLE"
1268><TR
1269><TD
1270WIDTH="20%"
1271ALIGN="RIGHT"
1272VALIGN="TOP"
1273><TT
1274CLASS="PARAMETER"
1275><I
1276>ctxt</I
1277></TT
1278>&nbsp;:</TD
1279><TD
1280WIDTH="80%"
1281ALIGN="LEFT"
1282VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001283> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001284></TR
1285><TR
1286><TD
1287WIDTH="20%"
1288ALIGN="RIGHT"
1289VALIGN="TOP"
1290><TT
1291CLASS="PARAMETER"
1292><I
1293>str</I
1294></TT
1295>&nbsp;:</TD
1296><TD
1297WIDTH="80%"
1298ALIGN="LEFT"
1299VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001300> location to store the entity name</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001301></TR
1302><TR
1303><TD
1304WIDTH="20%"
1305ALIGN="RIGHT"
1306VALIGN="TOP"
1307><I
1308CLASS="EMPHASIS"
1309>Returns</I
1310> :</TD
1311><TD
1312WIDTH="80%"
1313ALIGN="LEFT"
1314VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001315>the associated htmlEntityDescPtr if found, or NULL otherwise,
1316if non-NULL *str will have to be freed by the caller.</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001317></TR
1318></TABLE
1319><P
1320></P
1321></DIV
1322></DIV
1323><HR><DIV
1324CLASS="REFSECT2"
1325><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001326NAME="AEN9917"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001327></A
1328><H3
1329><A
1330NAME="HTMLPARSECHARREF"
1331></A
1332>htmlParseCharRef ()</H3
1333><TABLE
1334BORDER="0"
1335BGCOLOR="#D6E8FF"
1336WIDTH="100%"
1337CELLPADDING="6"
1338><TR
1339><TD
1340><PRE
1341CLASS="PROGRAMLISTING"
1342>int htmlParseCharRef (<A
1343HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1344>htmlParserCtxtPtr</A
1345> ctxt);</PRE
1346></TD
1347></TR
1348></TABLE
1349><P
1350>parse Reference declarations</P
1351><P
1352>[66] CharRef ::= '&amp;#' [0-9]+ ';' |
1353'&amp;<GTKDOCLINK
1354HREF="X"
1355>x</GTKDOCLINK
1356>' [0-9a-fA-F]+ ';'</P
1357><P
1358></P
1359><DIV
1360CLASS="INFORMALTABLE"
1361><P
1362></P
1363><TABLE
1364BORDER="0"
1365WIDTH="100%"
1366BGCOLOR="#FFD0D0"
1367CELLSPACING="0"
1368CELLPADDING="4"
1369CLASS="CALSTABLE"
1370><TR
1371><TD
1372WIDTH="20%"
1373ALIGN="RIGHT"
1374VALIGN="TOP"
1375><TT
1376CLASS="PARAMETER"
1377><I
1378>ctxt</I
1379></TT
1380>&nbsp;:</TD
1381><TD
1382WIDTH="80%"
1383ALIGN="LEFT"
1384VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001385> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001386></TR
1387><TR
1388><TD
1389WIDTH="20%"
1390ALIGN="RIGHT"
1391VALIGN="TOP"
1392><I
1393CLASS="EMPHASIS"
1394>Returns</I
1395> :</TD
1396><TD
1397WIDTH="80%"
1398ALIGN="LEFT"
1399VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001400>the value parsed (as an int)</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001401></TR
1402></TABLE
1403><P
1404></P
1405></DIV
1406></DIV
1407><HR><DIV
1408CLASS="REFSECT2"
1409><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001410NAME="AEN9939"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001411></A
1412><H3
1413><A
1414NAME="HTMLPARSEELEMENT"
1415></A
1416>htmlParseElement ()</H3
1417><TABLE
1418BORDER="0"
1419BGCOLOR="#D6E8FF"
1420WIDTH="100%"
1421CELLPADDING="6"
1422><TR
1423><TD
1424><PRE
1425CLASS="PROGRAMLISTING"
1426>void htmlParseElement (<A
1427HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
1428>htmlParserCtxtPtr</A
1429> ctxt);</PRE
1430></TD
1431></TR
1432></TABLE
1433><P
1434>parse an HTML element, this is highly recursive</P
1435><P
1436>[39] element ::= EmptyElemTag | STag content ETag</P
1437><P
1438>[41] Attribute ::= Name Eq AttValue</P
1439><P
1440></P
1441><DIV
1442CLASS="INFORMALTABLE"
1443><P
1444></P
1445><TABLE
1446BORDER="0"
1447WIDTH="100%"
1448BGCOLOR="#FFD0D0"
1449CELLSPACING="0"
1450CELLPADDING="4"
1451CLASS="CALSTABLE"
1452><TR
1453><TD
1454WIDTH="20%"
1455ALIGN="RIGHT"
1456VALIGN="TOP"
1457><TT
1458CLASS="PARAMETER"
1459><I
1460>ctxt</I
1461></TT
1462>&nbsp;:</TD
1463><TD
1464WIDTH="80%"
1465ALIGN="LEFT"
1466VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001467> an HTML parser context</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001468></TR
1469></TABLE
1470><P
1471></P
1472></DIV
1473></DIV
1474><HR><DIV
1475CLASS="REFSECT2"
1476><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001477NAME="AEN9957"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001478></A
1479><H3
1480><A
1481NAME="HTMLSAXPARSEDOC"
1482></A
1483>htmlSAXParseDoc ()</H3
1484><TABLE
1485BORDER="0"
1486BGCOLOR="#D6E8FF"
1487WIDTH="100%"
1488CELLPADDING="6"
1489><TR
1490><TD
1491><PRE
1492CLASS="PROGRAMLISTING"
1493><A
1494HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1495>htmlDocPtr</A
1496> htmlSAXParseDoc (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001497HREF="gnome-xml-tree.html#XMLCHAR"
1498>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001499> *cur,
1500 const char *encoding,
1501 <A
1502HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1503>htmlSAXHandlerPtr</A
1504> sax,
1505 void *userData);</PRE
1506></TD
1507></TR
1508></TABLE
1509><P
1510>parse an HTML in-memory document and build a tree.
1511It use the given SAX function block to handle the parsing callback.
1512If sax is NULL, fallback to the default DOM tree building routines.</P
1513><P
1514></P
1515><DIV
1516CLASS="INFORMALTABLE"
1517><P
1518></P
1519><TABLE
1520BORDER="0"
1521WIDTH="100%"
1522BGCOLOR="#FFD0D0"
1523CELLSPACING="0"
1524CELLPADDING="4"
1525CLASS="CALSTABLE"
1526><TR
1527><TD
1528WIDTH="20%"
1529ALIGN="RIGHT"
1530VALIGN="TOP"
1531><TT
1532CLASS="PARAMETER"
1533><I
1534>cur</I
1535></TT
1536>&nbsp;:</TD
1537><TD
1538WIDTH="80%"
1539ALIGN="LEFT"
1540VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001541> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001542></TR
1543><TR
1544><TD
1545WIDTH="20%"
1546ALIGN="RIGHT"
1547VALIGN="TOP"
1548><TT
1549CLASS="PARAMETER"
1550><I
1551>encoding</I
1552></TT
1553>&nbsp;:</TD
1554><TD
1555WIDTH="80%"
1556ALIGN="LEFT"
1557VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001558> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001559></TR
1560><TR
1561><TD
1562WIDTH="20%"
1563ALIGN="RIGHT"
1564VALIGN="TOP"
1565><TT
1566CLASS="PARAMETER"
1567><I
1568>sax</I
1569></TT
1570>&nbsp;:</TD
1571><TD
1572WIDTH="80%"
1573ALIGN="LEFT"
1574VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001575> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001576></TR
1577><TR
1578><TD
1579WIDTH="20%"
1580ALIGN="RIGHT"
1581VALIGN="TOP"
1582><TT
1583CLASS="PARAMETER"
1584><I
1585>userData</I
1586></TT
1587>&nbsp;:</TD
1588><TD
1589WIDTH="80%"
1590ALIGN="LEFT"
1591VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001592> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001593></TR
1594><TR
1595><TD
1596WIDTH="20%"
1597ALIGN="RIGHT"
1598VALIGN="TOP"
1599><I
1600CLASS="EMPHASIS"
1601>Returns</I
1602> :</TD
1603><TD
1604WIDTH="80%"
1605ALIGN="LEFT"
1606VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001607>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001608></TR
1609></TABLE
1610><P
1611></P
1612></DIV
1613></DIV
1614><HR><DIV
1615CLASS="REFSECT2"
1616><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001617NAME="AEN9991"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001618></A
1619><H3
1620><A
1621NAME="HTMLPARSEDOC"
1622></A
1623>htmlParseDoc ()</H3
1624><TABLE
1625BORDER="0"
1626BGCOLOR="#D6E8FF"
1627WIDTH="100%"
1628CELLPADDING="6"
1629><TR
1630><TD
1631><PRE
1632CLASS="PROGRAMLISTING"
1633><A
1634HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1635>htmlDocPtr</A
1636> htmlParseDoc (<A
Daniel Veillarddd6b3671999-09-23 22:19:22 +00001637HREF="gnome-xml-tree.html#XMLCHAR"
1638>xmlChar</A
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001639> *cur,
1640 const char *encoding);</PRE
1641></TD
1642></TR
1643></TABLE
1644><P
1645>parse an HTML in-memory document and build a tree.</P
1646><P
1647></P
1648><DIV
1649CLASS="INFORMALTABLE"
1650><P
1651></P
1652><TABLE
1653BORDER="0"
1654WIDTH="100%"
1655BGCOLOR="#FFD0D0"
1656CELLSPACING="0"
1657CELLPADDING="4"
1658CLASS="CALSTABLE"
1659><TR
1660><TD
1661WIDTH="20%"
1662ALIGN="RIGHT"
1663VALIGN="TOP"
1664><TT
1665CLASS="PARAMETER"
1666><I
1667>cur</I
1668></TT
1669>&nbsp;:</TD
1670><TD
1671WIDTH="80%"
1672ALIGN="LEFT"
1673VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001674> a pointer to an array of xmlChar</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001675></TR
1676><TR
1677><TD
1678WIDTH="20%"
1679ALIGN="RIGHT"
1680VALIGN="TOP"
1681><TT
1682CLASS="PARAMETER"
1683><I
1684>encoding</I
1685></TT
1686>&nbsp;:</TD
1687><TD
1688WIDTH="80%"
1689ALIGN="LEFT"
1690VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001691> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001692></TR
1693><TR
1694><TD
1695WIDTH="20%"
1696ALIGN="RIGHT"
1697VALIGN="TOP"
1698><I
1699CLASS="EMPHASIS"
1700>Returns</I
1701> :</TD
1702><TD
1703WIDTH="80%"
1704ALIGN="LEFT"
1705VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001706>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001707></TR
1708></TABLE
1709><P
1710></P
1711></DIV
1712></DIV
1713><HR><DIV
1714CLASS="REFSECT2"
1715><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001716NAME="AEN10016"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001717></A
1718><H3
1719><A
1720NAME="HTMLSAXPARSEFILE"
1721></A
1722>htmlSAXParseFile ()</H3
1723><TABLE
1724BORDER="0"
1725BGCOLOR="#D6E8FF"
1726WIDTH="100%"
1727CELLPADDING="6"
1728><TR
1729><TD
1730><PRE
1731CLASS="PROGRAMLISTING"
1732><A
1733HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1734>htmlDocPtr</A
1735> htmlSAXParseFile (const char *filename,
1736 const char *encoding,
1737 <A
1738HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
1739>htmlSAXHandlerPtr</A
1740> sax,
1741 void *userData);</PRE
1742></TD
1743></TR
1744></TABLE
1745><P
1746>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1747compressed document is provided by default if found at compile-time.
1748It use the given SAX function block to handle the parsing callback.
1749If sax is NULL, fallback to the default DOM tree building routines.</P
1750><P
1751></P
1752><DIV
1753CLASS="INFORMALTABLE"
1754><P
1755></P
1756><TABLE
1757BORDER="0"
1758WIDTH="100%"
1759BGCOLOR="#FFD0D0"
1760CELLSPACING="0"
1761CELLPADDING="4"
1762CLASS="CALSTABLE"
1763><TR
1764><TD
1765WIDTH="20%"
1766ALIGN="RIGHT"
1767VALIGN="TOP"
1768><TT
1769CLASS="PARAMETER"
1770><I
1771>filename</I
1772></TT
1773>&nbsp;:</TD
1774><TD
1775WIDTH="80%"
1776ALIGN="LEFT"
1777VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001778> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001779></TR
1780><TR
1781><TD
1782WIDTH="20%"
1783ALIGN="RIGHT"
1784VALIGN="TOP"
1785><TT
1786CLASS="PARAMETER"
1787><I
1788>encoding</I
1789></TT
1790>&nbsp;:</TD
1791><TD
1792WIDTH="80%"
1793ALIGN="LEFT"
1794VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001795> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001796></TR
1797><TR
1798><TD
1799WIDTH="20%"
1800ALIGN="RIGHT"
1801VALIGN="TOP"
1802><TT
1803CLASS="PARAMETER"
1804><I
1805>sax</I
1806></TT
1807>&nbsp;:</TD
1808><TD
1809WIDTH="80%"
1810ALIGN="LEFT"
1811VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001812> the SAX handler block</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001813></TR
1814><TR
1815><TD
1816WIDTH="20%"
1817ALIGN="RIGHT"
1818VALIGN="TOP"
1819><TT
1820CLASS="PARAMETER"
1821><I
1822>userData</I
1823></TT
1824>&nbsp;:</TD
1825><TD
1826WIDTH="80%"
1827ALIGN="LEFT"
1828VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001829> if using SAX, this pointer will be provided on callbacks. </TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001830></TR
1831><TR
1832><TD
1833WIDTH="20%"
1834ALIGN="RIGHT"
1835VALIGN="TOP"
1836><I
1837CLASS="EMPHASIS"
1838>Returns</I
1839> :</TD
1840><TD
1841WIDTH="80%"
1842ALIGN="LEFT"
1843VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001844>the resulting document tree</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001845></TR
1846></TABLE
1847><P
1848></P
1849></DIV
1850></DIV
1851><HR><DIV
1852CLASS="REFSECT2"
1853><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001854NAME="AEN10049"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001855></A
1856><H3
1857><A
1858NAME="HTMLPARSEFILE"
1859></A
1860>htmlParseFile ()</H3
1861><TABLE
1862BORDER="0"
1863BGCOLOR="#D6E8FF"
1864WIDTH="100%"
1865CELLPADDING="6"
1866><TR
1867><TD
1868><PRE
1869CLASS="PROGRAMLISTING"
1870><A
1871HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
1872>htmlDocPtr</A
1873> htmlParseFile (const char *filename,
1874 const char *encoding);</PRE
1875></TD
1876></TR
1877></TABLE
1878><P
1879>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
1880compressed document is provided by default if found at compile-time.</P
1881><P
1882></P
1883><DIV
1884CLASS="INFORMALTABLE"
1885><P
1886></P
1887><TABLE
1888BORDER="0"
1889WIDTH="100%"
1890BGCOLOR="#FFD0D0"
1891CELLSPACING="0"
1892CELLPADDING="4"
1893CLASS="CALSTABLE"
1894><TR
1895><TD
1896WIDTH="20%"
1897ALIGN="RIGHT"
1898VALIGN="TOP"
1899><TT
1900CLASS="PARAMETER"
1901><I
1902>filename</I
1903></TT
1904>&nbsp;:</TD
1905><TD
1906WIDTH="80%"
1907ALIGN="LEFT"
1908VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001909> the filename</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001910></TR
1911><TR
1912><TD
1913WIDTH="20%"
1914ALIGN="RIGHT"
1915VALIGN="TOP"
1916><TT
1917CLASS="PARAMETER"
1918><I
1919>encoding</I
1920></TT
1921>&nbsp;:</TD
1922><TD
1923WIDTH="80%"
1924ALIGN="LEFT"
1925VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001926> a free form C string describing the HTML document encoding, or NULL</TD
Daniel Veillard1566d3a1999-07-15 14:24:29 +00001927></TR
1928><TR
1929><TD
1930WIDTH="20%"
1931ALIGN="RIGHT"
1932VALIGN="TOP"
1933><I
1934CLASS="EMPHASIS"
1935>Returns</I
1936> :</TD
1937><TD
1938WIDTH="80%"
1939ALIGN="LEFT"
1940VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001941>the resulting document tree</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001942></TR
1943></TABLE
1944><P
1945></P
1946></DIV
1947></DIV
1948><HR><DIV
1949CLASS="REFSECT2"
1950><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001951NAME="AEN10073"
Daniel Veillarde46e20d2000-07-14 15:02:46 +00001952></A
1953><H3
1954><A
1955NAME="UTF8TOHTML"
1956></A
1957>UTF8ToHtml ()</H3
1958><TABLE
1959BORDER="0"
1960BGCOLOR="#D6E8FF"
1961WIDTH="100%"
1962CELLPADDING="6"
1963><TR
1964><TD
1965><PRE
1966CLASS="PROGRAMLISTING"
1967>int UTF8ToHtml (unsigned char *out,
1968 int *outlen,
1969 unsigned char *in,
1970 int *inlen);</PRE
1971></TD
1972></TR
1973></TABLE
1974><P
1975>Take a block of UTF-8 chars in and try to convert it to an ASCII
1976plus HTML entities block of chars out.</P
1977><P
1978></P
1979><DIV
1980CLASS="INFORMALTABLE"
1981><P
1982></P
1983><TABLE
1984BORDER="0"
1985WIDTH="100%"
1986BGCOLOR="#FFD0D0"
1987CELLSPACING="0"
1988CELLPADDING="4"
1989CLASS="CALSTABLE"
1990><TR
1991><TD
1992WIDTH="20%"
1993ALIGN="RIGHT"
1994VALIGN="TOP"
1995><TT
1996CLASS="PARAMETER"
1997><I
1998>out</I
1999></TT
2000>&nbsp;:</TD
2001><TD
2002WIDTH="80%"
2003ALIGN="LEFT"
2004VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002005> a pointer to an array of bytes to store the result</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002006></TR
2007><TR
2008><TD
2009WIDTH="20%"
2010ALIGN="RIGHT"
2011VALIGN="TOP"
2012><TT
2013CLASS="PARAMETER"
2014><I
2015>outlen</I
2016></TT
2017>&nbsp;:</TD
2018><TD
2019WIDTH="80%"
2020ALIGN="LEFT"
2021VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002022> the length of <TT
2023CLASS="PARAMETER"
2024><I
2025>out</I
2026></TT
2027></TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002028></TR
2029><TR
2030><TD
2031WIDTH="20%"
2032ALIGN="RIGHT"
2033VALIGN="TOP"
2034><TT
2035CLASS="PARAMETER"
2036><I
2037>in</I
2038></TT
2039>&nbsp;:</TD
2040><TD
2041WIDTH="80%"
2042ALIGN="LEFT"
2043VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002044> a pointer to an array of UTF-8 chars</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002045></TR
2046><TR
2047><TD
2048WIDTH="20%"
2049ALIGN="RIGHT"
2050VALIGN="TOP"
2051><TT
2052CLASS="PARAMETER"
2053><I
2054>inlen</I
2055></TT
2056>&nbsp;:</TD
2057><TD
2058WIDTH="80%"
2059ALIGN="LEFT"
2060VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002061> the length of <TT
2062CLASS="PARAMETER"
2063><I
2064>in</I
2065></TT
2066></TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002067></TR
2068><TR
2069><TD
2070WIDTH="20%"
2071ALIGN="RIGHT"
2072VALIGN="TOP"
2073><I
2074CLASS="EMPHASIS"
2075>Returns</I
2076> :</TD
2077><TD
2078WIDTH="80%"
2079ALIGN="LEFT"
2080VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002081>0 if success, -2 if the transcoding fails, or -1 otherwise
2082The value of <TT
2083CLASS="PARAMETER"
2084><I
2085>inlen</I
2086></TT
2087> after return is the number of octets consumed
2088as the return value is positive, else unpredictiable.
2089The value of <TT
2090CLASS="PARAMETER"
2091><I
2092>outlen</I
2093></TT
2094> after return is the number of octets consumed.</TD
Daniel Veillarde46e20d2000-07-14 15:02:46 +00002095></TR
2096></TABLE
2097><P
2098></P
2099></DIV
2100></DIV
2101><HR><DIV
2102CLASS="REFSECT2"
2103><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00002104NAME="AEN10108"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002105></A
2106><H3
2107><A
2108NAME="HTMLENCODEENTITIES"
2109></A
2110>htmlEncodeEntities ()</H3
2111><TABLE
2112BORDER="0"
2113BGCOLOR="#D6E8FF"
2114WIDTH="100%"
2115CELLPADDING="6"
2116><TR
2117><TD
2118><PRE
2119CLASS="PROGRAMLISTING"
2120>int htmlEncodeEntities (unsigned char *out,
2121 int *outlen,
2122 unsigned char *in,
2123 int *inlen,
2124 int quoteChar);</PRE
2125></TD
2126></TR
2127></TABLE
2128><P
2129>Take a block of UTF-8 chars in and try to convert it to an ASCII
2130plus HTML entities block of chars out.</P
2131><P
2132></P
2133><DIV
2134CLASS="INFORMALTABLE"
2135><P
2136></P
2137><TABLE
2138BORDER="0"
2139WIDTH="100%"
2140BGCOLOR="#FFD0D0"
2141CELLSPACING="0"
2142CELLPADDING="4"
2143CLASS="CALSTABLE"
2144><TR
2145><TD
2146WIDTH="20%"
2147ALIGN="RIGHT"
2148VALIGN="TOP"
2149><TT
2150CLASS="PARAMETER"
2151><I
2152>out</I
2153></TT
2154>&nbsp;:</TD
2155><TD
2156WIDTH="80%"
2157ALIGN="LEFT"
2158VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002159> a pointer to an array of bytes to store the result</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002160></TR
2161><TR
2162><TD
2163WIDTH="20%"
2164ALIGN="RIGHT"
2165VALIGN="TOP"
2166><TT
2167CLASS="PARAMETER"
2168><I
2169>outlen</I
2170></TT
2171>&nbsp;:</TD
2172><TD
2173WIDTH="80%"
2174ALIGN="LEFT"
2175VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002176> the length of <TT
2177CLASS="PARAMETER"
2178><I
2179>out</I
2180></TT
2181></TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002182></TR
2183><TR
2184><TD
2185WIDTH="20%"
2186ALIGN="RIGHT"
2187VALIGN="TOP"
2188><TT
2189CLASS="PARAMETER"
2190><I
2191>in</I
2192></TT
2193>&nbsp;:</TD
2194><TD
2195WIDTH="80%"
2196ALIGN="LEFT"
2197VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002198> a pointer to an array of UTF-8 chars</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002199></TR
2200><TR
2201><TD
2202WIDTH="20%"
2203ALIGN="RIGHT"
2204VALIGN="TOP"
2205><TT
2206CLASS="PARAMETER"
2207><I
2208>inlen</I
2209></TT
2210>&nbsp;:</TD
2211><TD
2212WIDTH="80%"
2213ALIGN="LEFT"
2214VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002215> the length of <TT
2216CLASS="PARAMETER"
2217><I
2218>in</I
2219></TT
2220></TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002221></TR
2222><TR
2223><TD
2224WIDTH="20%"
2225ALIGN="RIGHT"
2226VALIGN="TOP"
2227><TT
2228CLASS="PARAMETER"
2229><I
2230>quoteChar</I
2231></TT
2232>&nbsp;:</TD
2233><TD
2234WIDTH="80%"
2235ALIGN="LEFT"
2236VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002237> the quote character to escape (' or ") or zero.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002238></TR
2239><TR
2240><TD
2241WIDTH="20%"
2242ALIGN="RIGHT"
2243VALIGN="TOP"
2244><I
2245CLASS="EMPHASIS"
2246>Returns</I
2247> :</TD
2248><TD
2249WIDTH="80%"
2250ALIGN="LEFT"
2251VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002252>0 if success, -2 if the transcoding fails, or -1 otherwise
2253The value of <TT
2254CLASS="PARAMETER"
2255><I
2256>inlen</I
2257></TT
2258> after return is the number of octets consumed
2259as the return value is positive, else unpredictiable.
2260The value of <TT
2261CLASS="PARAMETER"
2262><I
2263>outlen</I
2264></TT
2265> after return is the number of octets consumed.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00002266></TR
2267></TABLE
2268><P
2269></P
2270></DIV
2271></DIV
2272><HR><DIV
2273CLASS="REFSECT2"
2274><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00002275NAME="AEN10147"
Daniel Veillard29a11cc2000-10-25 13:32:39 +00002276></A
2277><H3
2278><A
2279NAME="HTMLISSCRIPTATTRIBUTE"
2280></A
2281>htmlIsScriptAttribute ()</H3
2282><TABLE
2283BORDER="0"
2284BGCOLOR="#D6E8FF"
2285WIDTH="100%"
2286CELLPADDING="6"
2287><TR
2288><TD
2289><PRE
2290CLASS="PROGRAMLISTING"
2291>int htmlIsScriptAttribute (const <A
2292HREF="gnome-xml-tree.html#XMLCHAR"
2293>xmlChar</A
2294> *name);</PRE
2295></TD
2296></TR
2297></TABLE
2298><P
2299>Check if an attribute is of content type Script</P
2300><P
2301></P
2302><DIV
2303CLASS="INFORMALTABLE"
2304><P
2305></P
2306><TABLE
2307BORDER="0"
2308WIDTH="100%"
2309BGCOLOR="#FFD0D0"
2310CELLSPACING="0"
2311CELLPADDING="4"
2312CLASS="CALSTABLE"
2313><TR
2314><TD
2315WIDTH="20%"
2316ALIGN="RIGHT"
2317VALIGN="TOP"
2318><TT
2319CLASS="PARAMETER"
2320><I
2321>name</I
2322></TT
2323>&nbsp;:</TD
2324><TD
2325WIDTH="80%"
2326ALIGN="LEFT"
2327VALIGN="TOP"
2328> an attribute name</TD
2329></TR
2330><TR
2331><TD
2332WIDTH="20%"
2333ALIGN="RIGHT"
2334VALIGN="TOP"
2335><I
2336CLASS="EMPHASIS"
2337>Returns</I
2338> :</TD
2339><TD
2340WIDTH="80%"
2341ALIGN="LEFT"
2342VALIGN="TOP"
2343>1 is the attribute is a script 0 otherwise</TD
2344></TR
2345></TABLE
2346><P
2347></P
2348></DIV
2349></DIV
2350><HR><DIV
2351CLASS="REFSECT2"
2352><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00002353NAME="AEN10167"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002354></A
2355><H3
2356><A
2357NAME="HTMLFREEPARSERCTXT"
2358></A
2359>htmlFreeParserCtxt ()</H3
2360><TABLE
2361BORDER="0"
2362BGCOLOR="#D6E8FF"
2363WIDTH="100%"
2364CELLPADDING="6"
2365><TR
2366><TD
2367><PRE
2368CLASS="PROGRAMLISTING"
2369>void htmlFreeParserCtxt (<A
2370HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
2371>htmlParserCtxtPtr</A
2372> ctxt);</PRE
2373></TD
2374></TR
2375></TABLE
2376><P
2377>Free all the memory used by a parser context. However the parsed
2378document in ctxt-&gt;myDoc is not freed.</P
2379><P
2380></P
2381><DIV
2382CLASS="INFORMALTABLE"
2383><P
2384></P
2385><TABLE
2386BORDER="0"
2387WIDTH="100%"
2388BGCOLOR="#FFD0D0"
2389CELLSPACING="0"
2390CELLPADDING="4"
2391CLASS="CALSTABLE"
2392><TR
2393><TD
2394WIDTH="20%"
2395ALIGN="RIGHT"
2396VALIGN="TOP"
2397><TT
2398CLASS="PARAMETER"
2399><I
2400>ctxt</I
2401></TT
2402>&nbsp;:</TD
2403><TD
2404WIDTH="80%"
2405ALIGN="LEFT"
2406VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002407> an HTML parser context</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002408></TR
2409></TABLE
2410><P
2411></P
2412></DIV
2413></DIV
2414><HR><DIV
2415CLASS="REFSECT2"
2416><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00002417NAME="AEN10183"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002418></A
2419><H3
2420><A
2421NAME="HTMLCREATEPUSHPARSERCTXT"
2422></A
2423>htmlCreatePushParserCtxt ()</H3
2424><TABLE
2425BORDER="0"
2426BGCOLOR="#D6E8FF"
2427WIDTH="100%"
2428CELLPADDING="6"
2429><TR
2430><TD
2431><PRE
2432CLASS="PROGRAMLISTING"
2433><A
2434HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
2435>htmlParserCtxtPtr</A
2436> htmlCreatePushParserCtxt (<A
2437HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
2438>htmlSAXHandlerPtr</A
2439> sax,
2440 void *user_data,
2441 const char *chunk,
2442 int size,
2443 const char *filename,
2444 <A
2445HREF="gnome-xml-encoding.html#XMLCHARENCODING"
2446>xmlCharEncoding</A
2447> enc);</PRE
2448></TD
2449></TR
2450></TABLE
2451><P
2452>Create a parser context for using the HTML parser in push mode
2453To allow content encoding detection, <TT
2454CLASS="PARAMETER"
2455><I
2456>size</I
2457></TT
2458> should be &gt;= 4
2459The value of <TT
2460CLASS="PARAMETER"
2461><I
2462>filename</I
2463></TT
2464> is used for fetching external entities
2465and error/warning reports.</P
2466><P
2467></P
2468><DIV
2469CLASS="INFORMALTABLE"
2470><P
2471></P
2472><TABLE
2473BORDER="0"
2474WIDTH="100%"
2475BGCOLOR="#FFD0D0"
2476CELLSPACING="0"
2477CELLPADDING="4"
2478CLASS="CALSTABLE"
2479><TR
2480><TD
2481WIDTH="20%"
2482ALIGN="RIGHT"
2483VALIGN="TOP"
2484><TT
2485CLASS="PARAMETER"
2486><I
2487>sax</I
2488></TT
2489>&nbsp;:</TD
2490><TD
2491WIDTH="80%"
2492ALIGN="LEFT"
2493VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002494> a SAX handler</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002495></TR
2496><TR
2497><TD
2498WIDTH="20%"
2499ALIGN="RIGHT"
2500VALIGN="TOP"
2501><TT
2502CLASS="PARAMETER"
2503><I
2504>user_data</I
2505></TT
2506>&nbsp;:</TD
2507><TD
2508WIDTH="80%"
2509ALIGN="LEFT"
2510VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002511> The user data returned on SAX callbacks</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002512></TR
2513><TR
2514><TD
2515WIDTH="20%"
2516ALIGN="RIGHT"
2517VALIGN="TOP"
2518><TT
2519CLASS="PARAMETER"
2520><I
2521>chunk</I
2522></TT
2523>&nbsp;:</TD
2524><TD
2525WIDTH="80%"
2526ALIGN="LEFT"
2527VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002528> a pointer to an array of chars</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002529></TR
2530><TR
2531><TD
2532WIDTH="20%"
2533ALIGN="RIGHT"
2534VALIGN="TOP"
2535><TT
2536CLASS="PARAMETER"
2537><I
2538>size</I
2539></TT
2540>&nbsp;:</TD
2541><TD
2542WIDTH="80%"
2543ALIGN="LEFT"
2544VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002545> number of chars in the array</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002546></TR
2547><TR
2548><TD
2549WIDTH="20%"
2550ALIGN="RIGHT"
2551VALIGN="TOP"
2552><TT
2553CLASS="PARAMETER"
2554><I
2555>filename</I
2556></TT
2557>&nbsp;:</TD
2558><TD
2559WIDTH="80%"
2560ALIGN="LEFT"
2561VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002562> an optional file name or URI</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002563></TR
2564><TR
2565><TD
2566WIDTH="20%"
2567ALIGN="RIGHT"
2568VALIGN="TOP"
2569><TT
2570CLASS="PARAMETER"
2571><I
2572>enc</I
2573></TT
2574>&nbsp;:</TD
2575><TD
2576WIDTH="80%"
2577ALIGN="LEFT"
2578VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002579> an optional encoding</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002580></TR
2581><TR
2582><TD
2583WIDTH="20%"
2584ALIGN="RIGHT"
2585VALIGN="TOP"
2586><I
2587CLASS="EMPHASIS"
2588>Returns</I
2589> :</TD
2590><TD
2591WIDTH="80%"
2592ALIGN="LEFT"
2593VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002594>the new parser context or NULL</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002595></TR
2596></TABLE
2597><P
2598></P
2599></DIV
2600></DIV
2601><HR><DIV
2602CLASS="REFSECT2"
2603><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00002604NAME="AEN10227"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002605></A
2606><H3
2607><A
2608NAME="HTMLPARSECHUNK"
2609></A
2610>htmlParseChunk ()</H3
2611><TABLE
2612BORDER="0"
2613BGCOLOR="#D6E8FF"
2614WIDTH="100%"
2615CELLPADDING="6"
2616><TR
2617><TD
2618><PRE
2619CLASS="PROGRAMLISTING"
2620>int htmlParseChunk (<A
2621HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
2622>htmlParserCtxtPtr</A
2623> ctxt,
2624 const char *chunk,
2625 int size,
2626 int terminate);</PRE
2627></TD
2628></TR
2629></TABLE
2630><P
2631>Parse a Chunk of memory</P
2632><P
2633></P
2634><DIV
2635CLASS="INFORMALTABLE"
2636><P
2637></P
2638><TABLE
2639BORDER="0"
2640WIDTH="100%"
2641BGCOLOR="#FFD0D0"
2642CELLSPACING="0"
2643CELLPADDING="4"
2644CLASS="CALSTABLE"
2645><TR
2646><TD
2647WIDTH="20%"
2648ALIGN="RIGHT"
2649VALIGN="TOP"
2650><TT
2651CLASS="PARAMETER"
2652><I
2653>ctxt</I
2654></TT
2655>&nbsp;:</TD
2656><TD
2657WIDTH="80%"
2658ALIGN="LEFT"
2659VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002660> an XML parser context</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002661></TR
2662><TR
2663><TD
2664WIDTH="20%"
2665ALIGN="RIGHT"
2666VALIGN="TOP"
2667><TT
2668CLASS="PARAMETER"
2669><I
2670>chunk</I
2671></TT
2672>&nbsp;:</TD
2673><TD
2674WIDTH="80%"
2675ALIGN="LEFT"
2676VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002677> an char array</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002678></TR
2679><TR
2680><TD
2681WIDTH="20%"
2682ALIGN="RIGHT"
2683VALIGN="TOP"
2684><TT
2685CLASS="PARAMETER"
2686><I
2687>size</I
2688></TT
2689>&nbsp;:</TD
2690><TD
2691WIDTH="80%"
2692ALIGN="LEFT"
2693VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002694> the size in byte of the chunk</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002695></TR
2696><TR
2697><TD
2698WIDTH="20%"
2699ALIGN="RIGHT"
2700VALIGN="TOP"
2701><TT
2702CLASS="PARAMETER"
2703><I
2704>terminate</I
2705></TT
2706>&nbsp;:</TD
2707><TD
2708WIDTH="80%"
2709ALIGN="LEFT"
2710VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002711> last chunk indicator</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002712></TR
2713><TR
2714><TD
2715WIDTH="20%"
2716ALIGN="RIGHT"
2717VALIGN="TOP"
2718><I
2719CLASS="EMPHASIS"
2720>Returns</I
2721> :</TD
2722><TD
2723WIDTH="80%"
2724ALIGN="LEFT"
2725VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002726>zero if no error, the xmlParserErrors otherwise.</TD
Daniel Veillard437b87b2000-01-03 17:30:46 +00002727></TR
2728></TABLE
2729><P
2730></P
2731></DIV
2732></DIV
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002733></DIV
2734><DIV
2735CLASS="NAVFOOTER"
Daniel Veillard00fdf371999-10-08 09:40:39 +00002736><BR
2737CLEAR="all"><BR><TABLE
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002738WIDTH="100%"
2739BORDER="0"
2740BGCOLOR="#000000"
2741CELLPADDING="1"
2742CELLSPACING="0"
2743><TR
2744><TD
2745WIDTH="25%"
2746BGCOLOR="#C00000"
2747ALIGN="left"
2748><A
Daniel Veillard6bd26dc1999-09-03 14:28:40 +00002749HREF="gnome-xml-xml-error.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002750><FONT
2751COLOR="#FFFFFF"
2752SIZE="3"
2753><B
2754>&#60;&#60;&#60; Previous Page</B
2755></FONT
2756></A
2757></TD
2758><TD
2759WIDTH="25%"
2760BGCOLOR="#0000C0"
2761ALIGN="center"
2762><FONT
2763COLOR="#FFFFFF"
2764SIZE="3"
2765><B
2766><A
2767HREF="book1.html"
2768><FONT
2769COLOR="#FFFFFF"
2770SIZE="3"
2771><B
2772>Home</B
2773></FONT
2774></A
2775></B
2776></FONT
2777></TD
2778><TD
2779WIDTH="25%"
2780BGCOLOR="#00C000"
2781ALIGN="center"
2782><FONT
2783COLOR="#FFFFFF"
2784SIZE="3"
2785><B
2786><A
Daniel Veillard35008381999-10-25 13:15:52 +00002787HREF="libxml-lib.html"
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002788><FONT
2789COLOR="#FFFFFF"
2790SIZE="3"
2791><B
2792>Up</B
2793></FONT
2794></A
2795></B
2796></FONT
2797></TD
2798><TD
2799WIDTH="25%"
2800BGCOLOR="#C00000"
2801ALIGN="right"
2802><A
2803HREF="gnome-xml-htmltree.html"
2804><FONT
2805COLOR="#FFFFFF"
2806SIZE="3"
2807><B
2808>Next Page &#62;&#62;&#62;</B
2809></FONT
2810></A
2811></TD
2812></TR
2813><TR
2814><TD
2815COLSPAN="2"
2816ALIGN="left"
2817><FONT
2818COLOR="#FFFFFF"
2819SIZE="3"
2820><B
Daniel Veillard6bd26dc1999-09-03 14:28:40 +00002821>xml-error</B
Daniel Veillard1566d3a1999-07-15 14:24:29 +00002822></FONT
2823></TD
2824><TD
2825COLSPAN="2"
2826ALIGN="right"
2827><FONT
2828COLOR="#FFFFFF"
2829SIZE="3"
2830><B
2831>HTMLtree</B
2832></FONT
2833></TD
2834></TR
2835></TABLE
2836></DIV
2837></BODY
2838></HTML
2839>