# PaCkAgE DaTaStReAm libxml2 1 32682 # end of header 0707010002b1b0000081a40000000000000000000000014cb7d88c000000ff000000b500010002ffffffffffffffff0000001000000000libxml2/pkginfoPKG=libxml2 NAME=libxml2 2.7.7 i86pc Solaris 10 VERSION=2.7.7 PSTAMP=15th October 2010 VENDOR=Daniel Veillard EMAIL=http://xmlsoft.org/downloads.html DESC=XML C library ARCH=i386 CATEGORY=utility CLASSES=none BASEDIR=/ ISTATES=S s 1 2 3 RSTATES=S s 1 2 3 0707010002b1af000081a40000000000000000000000014cb7d88c00006fb3000000b500010002ffffffffffffffff0000000f00000000libxml2/pkgmap: 1 32682 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/bin 0755 root root 1 f none /usr/local/bin/xml2-config 0755 root root 1980 21608 1287116933 1 f none /usr/local/bin/xmlcatalog 0755 root root 27840 34685 1287116933 1 f none /usr/local/bin/xmllint 0755 root root 135492 39209 1287116933 1 d none /usr/local/include 0755 root root 1 d none /usr/local/include/libxml2 0755 root root 1 d none /usr/local/include/libxml2/libxml 0755 root root 1 f none /usr/local/include/libxml2/libxml/DOCBparser.h 0644 root root 3277 26997 1287116932 1 f none /usr/local/include/libxml2/libxml/HTMLparser.h 0644 root root 9296 21688 1287116932 1 f none /usr/local/include/libxml2/libxml/HTMLtree.h 0644 root root 3685 24202 1287116932 1 f none /usr/local/include/libxml2/libxml/SAX.h 0644 root root 4412 254 1287116932 1 f none /usr/local/include/libxml2/libxml/SAX2.h 0644 root root 4944 47206 1287116932 1 f none /usr/local/include/libxml2/libxml/c14n.h 0644 root root 3110 45713 1287116932 1 f none /usr/local/include/libxml2/libxml/catalog.h 0644 root root 4958 62701 1287116932 1 f none /usr/local/include/libxml2/libxml/chvalid.h 0644 root root 5159 6441 1287116932 1 f none /usr/local/include/libxml2/libxml/debugXML.h 0644 root root 5181 58739 1287116932 1 f none /usr/local/include/libxml2/libxml/dict.h 0644 root root 1582 54062 1287116932 1 f none /usr/local/include/libxml2/libxml/encoding.h 0644 root root 7931 33159 1287116932 1 f none /usr/local/include/libxml2/libxml/entities.h 0644 root root 4672 34987 1287116932 1 f none /usr/local/include/libxml2/libxml/globals.h 0644 root root 14651 41700 1287116932 1 f none /usr/local/include/libxml2/libxml/hash.h 0644 root root 6567 40118 1287116932 1 f none /usr/local/include/libxml2/libxml/list.h 0644 root root 3422 9290 1287116932 1 f none /usr/local/include/libxml2/libxml/nanoftp.h 0644 root root 3347 65046 1287116932 1 f none /usr/local/include/libxml2/libxml/nanohttp.h 0644 root root 2018 25405 1287116932 1 f none /usr/local/include/libxml2/libxml/parser.h 0644 root root 39556 20438 1287116932 1 f none /usr/local/include/libxml2/libxml/parserInternals.h 0644 root root 16573 38289 1287116932 1 f none /usr/local/include/libxml2/libxml/pattern.h 0644 root root 2586 14250 1287116932 1 f none /usr/local/include/libxml2/libxml/relaxng.h 0644 root root 5958 14236 1287116932 1 f none /usr/local/include/libxml2/libxml/schemasInternals.h 0644 root root 26023 46943 1287116932 1 f none /usr/local/include/libxml2/libxml/schematron.h 0644 root root 4393 38715 1287116932 1 f none /usr/local/include/libxml2/libxml/threads.h 0644 root root 1852 22060 1287116932 1 f none /usr/local/include/libxml2/libxml/tree.h 0644 root root 36628 28341 1287116932 1 f none /usr/local/include/libxml2/libxml/uri.h 0644 root root 2664 14130 1287116932 1 f none /usr/local/include/libxml2/libxml/valid.h 0644 root root 13818 42837 1287116932 1 f none /usr/local/include/libxml2/libxml/xinclude.h 0644 root root 2967 33993 1287116932 1 f none /usr/local/include/libxml2/libxml/xlink.h 0644 root root 5051 29979 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlIO.h 0644 root root 10448 54431 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlautomata.h 0644 root root 3992 52088 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlerror.h 0644 root root 36676 39870 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlexports.h 0644 root root 3914 45768 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlmemory.h 0644 root root 5945 32295 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlmodule.h 0644 root root 1171 28508 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlreader.h 0644 root root 12551 25798 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlregexp.h 0644 root root 5458 46433 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlsave.h 0644 root root 2260 49170 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlschemas.h 0644 root root 6202 44970 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlschemastypes.h 0644 root root 4893 2118 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlstring.h 0644 root root 5472 10623 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlunicode.h 0644 root root 9993 44615 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlversion.h 0644 root root 7636 59172 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlwriter.h 0644 root root 21159 10920 1287116932 1 f none /usr/local/include/libxml2/libxml/xpath.h 0644 root root 16199 42789 1287116932 1 f none /usr/local/include/libxml2/libxml/xpathInternals.h 0644 root root 19448 19089 1287116932 1 f none /usr/local/include/libxml2/libxml/xpointer.h 0644 root root 3411 12454 1287116932 1 d none /usr/local/lib 0755 root root 1 f none /usr/local/lib/libxml2.a 0644 root root 4797692 20086 1287116932 1 f none /usr/local/lib/libxml2.la 0755 root root 1014 23283 1287116932 1 s none /usr/local/lib/libxml2.so=libxml2.so.2.7.7 1 s none /usr/local/lib/libxml2.so.2=libxml2.so.2.7.7 1 f none /usr/local/lib/libxml2.so.2.7.7 0755 root root 4089284 4979 1287116932 1 d none /usr/local/lib/pkgconfig 0755 root root 1 f none /usr/local/lib/pkgconfig/libxml-2.0.pc 0644 root root 369 32976 1287116933 1 f none /usr/local/lib/xml2Conf.sh 0644 root root 330 27338 1287116933 1 d none /usr/local/share 0755 root root 1 d none /usr/local/share/aclocal 0755 root root 1 f none /usr/local/share/aclocal/libxml.m4 0644 root root 7880 31344 1287116933 1 d none /usr/local/share/doc 0755 root root 1 d none /usr/local/share/doc/libxml2-2.7.7 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/Copyright 0644 root root 1498 60471 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/examples 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/examples/testHTML.c 0644 root root 21178 11625 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/examples/testSAX.c 0644 root root 27618 44379 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/examples/testXPath.c 0644 root root 5900 8360 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/examples/xmllint.c 0644 root root 96991 8100 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/DOM.gif 0644 root root 3166 16454 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/FAQ.html 0644 root root 21086 20502 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/Libxml2-Logo-180x168.gif 0644 root root 8195 18372 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/Libxml2-Logo-90x34.gif 0644 root root 3070 5797 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/encoding.html 0644 root root 19332 45298 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/examples.xml 0644 root root 32143 64944 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/examples.xsl 0644 root root 7232 22745 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html/html 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/book1.html 0644 root root 9645 56651 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/home.png 0644 root root 654 8089 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/index.html 0644 root root 9645 56651 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/left.png 0644 root root 459 49669 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-DOCBparser.html 0644 root root 20644 9976 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-HTMLparser.html 0644 root root 59714 54097 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-HTMLtree.html 0644 root root 28620 28841 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-SAX.html 0644 root root 43501 2070 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-SAX2.html 0644 root root 44470 29057 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-c14n.html 0644 root root 18074 34566 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-catalog.html 0644 root root 41039 42872 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-chvalid.html 0644 root root 18442 36279 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-debugXML.html 0644 root root 37931 47824 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-dict.html 0644 root root 15745 47928 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-encoding.html 0644 root root 34231 58628 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-entities.html 0644 root root 27700 56334 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-globals.html 0644 root root 33107 11987 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-hash.html 0644 root root 46558 65082 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-lib.html 0644 root root 9645 56651 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-list.html 0644 root root 30126 56146 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-nanoftp.html 0644 root root 26396 22543 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-nanohttp.html 0644 root root 21243 49368 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-parser.html 0644 root root 146100 54015 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-parserInternals.html 0644 root root 120088 15304 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-pattern.html 0644 root root 23692 41744 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-relaxng.html 0644 root root 41021 5883 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-schemasInternals.html 0644 root root 64077 1066 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-schematron.html 0644 root root 21748 25694 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-threads.html 0644 root root 17180 60252 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-tree.html 0644 root root 226158 8499 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-uri.html 0644 root root 22697 58171 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-valid.html 0644 root root 102478 18341 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xinclude.html 0644 root root 19725 885 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xlink.html 0644 root root 21665 29749 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlIO.html 0644 root root 61477 37480 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlautomata.html 0644 root root 39585 3665 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlerror.html 0644 root root 109408 17081 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlexports.html 0644 root root 7610 49486 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlmemory.html 0644 root root 29237 40271 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlmodule.html 0644 root root 11220 47362 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlreader.html 0644 root root 112604 4431 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlregexp.html 0644 root root 45805 15284 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlsave.html 0644 root root 19182 19763 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlschemas.html 0644 root root 44179 2731 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlschemastypes.html 0644 root root 49399 28650 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlstring.html 0644 root root 39315 46149 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlunicode.html 0644 root root 112871 31965 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlversion.html 0644 root root 19720 55141 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlwriter.html 0644 root root 116402 37530 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xpath.html 0644 root root 62165 26014 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xpathInternals.html 0644 root root 142763 55727 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xpointer.html 0644 root root 29887 17355 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/right.png 0644 root root 472 50613 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/up.png 0644 root root 406 41501 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/io1.c 0644 root root 3758 32816 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/io1.res 0644 root root 165 13941 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/io2.c 0644 root root 1187 27049 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/io2.res 0644 root root 43 3641 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/libxml.gif 0644 root root 7692 3071 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/parse1.c 0644 root root 1300 37651 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/parse2.c 0644 root root 1967 26348 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/parse3.c 0644 root root 1506 55755 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/parse4.c 0644 root root 3545 15935 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader1.c 0644 root root 2536 438 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader1.res 0644 root root 149 7963 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader2.c 0644 root root 3139 49199 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader3.c 0644 root root 2953 33274 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader3.res 0644 root root 360 28205 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader4.c 0644 root root 3134 48755 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader4.res 0644 root root 72 6501 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/redhat.gif 0644 root root 697 1392 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/smallfootonly.gif 0644 root root 2772 33479 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/structure.gif 0644 root root 5559 10757 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/test1.xml 0644 root root 7 489 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/test2.xml 0644 root root 227 16084 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/test3.xml 0644 root root 833 64269 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/testWriter.c 0644 root root 38443 23535 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tree1.c 0644 root root 2249 49217 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tree1.res 0644 root root 121 10602 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tree2.c 0644 root root 3475 64636 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tree2.res 0644 root root 453 34440 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tst.xml 0644 root root 91 7269 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html/tutorial 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apa.html 0644 root root 2114 50077 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apb.html 0644 root root 2026 41976 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apc.html 0644 root root 3094 59411 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apd.html 0644 root root 3232 10161 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ape.html 0644 root root 3096 60954 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apf.html 0644 root root 2949 50052 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apg.html 0644 root root 3022 55514 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/aph.html 0644 root root 3600 14216 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/api.html 0644 root root 1899 32299 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s02.html 0644 root root 3298 21719 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s03.html 0644 root root 5718 25593 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s04.html 0644 root root 6223 3967 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s05.html 0644 root root 7422 46605 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s06.html 0644 root root 3849 62759 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s07.html 0644 root root 3866 788 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s08.html 0644 root root 3894 1098 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s09.html 0644 root root 7603 1099 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/blank.png 0644 root root 374 27553 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/1.png 0644 root root 329 26541 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/10.png 0644 root root 361 31046 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/2.png 0644 root root 353 30241 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/3.png 0644 root root 350 30758 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/4.png 0644 root root 345 29927 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/5.png 0644 root root 348 29262 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/6.png 0644 root root 355 31934 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/7.png 0644 root root 344 29378 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/8.png 0644 root root 357 30798 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/9.png 0644 root root 357 30377 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/caution.png 0644 root root 1250 25620 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/draft.png 0644 root root 17454 5031 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/home.png 0644 root root 1156 29224 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/important.png 0644 root root 722 19454 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/next.png 0644 root root 1150 26768 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/note.png 0644 root root 490 47376 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/prev.png 0644 root root 1132 25218 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/tip.png 0644 root root 449 41167 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-blank.png 0644 root root 318 25047 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-minus.png 0644 root root 259 19780 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-plus.png 0644 root root 264 20542 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/up.png 0644 root root 1111 21898 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/warning.png 0644 root root 1241 17822 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeaddattribute.c 0644 root root 1136 25548 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeaddkeyword.c 0644 root root 1320 40297 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeconvert.c 0644 root root 1808 56314 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includegetattribute.c 0644 root root 1171 27155 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includekeyword.c 0644 root root 1351 41532 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includexpath.c 0644 root root 1491 58164 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/index.html 0644 root root 5930 50707 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ix01.html 0644 root root 2545 19990 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/xmltutorial.pdf 0644 root root 51709 26614 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/w3c.png 0644 root root 2028 53965 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/writer.xml 0644 root root 544 42503 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xml.html 0644 root root 249610 1241 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xpath1.c 0644 root root 6631 749 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xpath1.res 0644 root root 114 9317 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xpath2.c 0644 root root 5335 38108 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xpath2.res 0644 root root 757 60811 1287116933 1 d none /usr/local/share/gtk-doc 0755 root root 1 d none /usr/local/share/gtk-doc/html 0755 root root 1 d none /usr/local/share/gtk-doc/html/libxml2 0755 root root 1 f none /usr/local/share/gtk-doc/html/libxml2/general.html 0644 root root 5459 10614 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/home.png 0644 root root 654 8089 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/index.html 0644 root root 4321 23385 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/left.png 0644 root root 459 49669 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-DOCBparser.html 0644 root root 17361 21918 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-HTMLparser.html 0644 root root 57872 3734 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-HTMLtree.html 0644 root root 24416 11475 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-SAX.html 0644 root root 38875 56552 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-SAX2.html 0644 root root 39659 2380 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-c14n.html 0644 root root 13546 17146 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-catalog.html 0644 root root 36549 35065 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-chvalid.html 0644 root root 19835 32590 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-debugXML.html 0644 root root 33317 47086 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-dict.html 0644 root root 11361 30250 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-encoding.html 0644 root root 29012 21195 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-entities.html 0644 root root 23118 9981 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-globals.html 0644 root root 35642 21806 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-hash.html 0644 root root 42055 10287 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-list.html 0644 root root 25568 55847 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-nanoftp.html 0644 root root 21563 17347 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-nanohttp.html 0644 root root 16614 5874 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-parser.html 0644 root root 137314 29487 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-parserInternals.html 0644 root root 122546 15856 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-pattern.html 0644 root root 19362 15833 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-relaxng.html 0644 root root 35230 40777 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-schemasInternals.html 0644 root root 65119 15818 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-schematron.html 0644 root root 17105 38134 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-threads.html 0644 root root 12896 39118 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-tree.html 0644 root root 225192 48172 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-uri.html 0644 root root 18434 43196 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-valid.html 0644 root root 98504 41382 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xinclude.html 0644 root root 15920 18434 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xlink.html 0644 root root 17329 12128 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlIO.html 0644 root root 55659 16744 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlautomata.html 0644 root root 35179 33651 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlerror.html 0644 root root 84473 26265 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlexports.html 0644 root root 3585 8335 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlmemory.html 0644 root root 24012 60278 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlmodule.html 0644 root root 6858 40149 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlreader.html 0644 root root 106566 41623 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlregexp.html 0644 root root 42013 8561 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlsave.html 0644 root root 14737 61995 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlschemas.html 0644 root root 39085 22777 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlschemastypes.html 0644 root root 44455 54737 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlstring.html 0644 root root 35113 14365 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlunicode.html 0644 root root 106596 4303 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlversion.html 0644 root root 17973 24519 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlwriter.html 0644 root root 110993 3662 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xpath.html 0644 root root 59447 952 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xpathInternals.html 0644 root root 144553 28328 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xpointer.html 0644 root root 25453 42833 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2.devhelp 0644 root root 339203 52285 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/right.png 0644 root root 472 50613 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/style.css 0644 root root 820 1833 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/up.png 0644 root root 406 41501 1287116933 1 d none /usr/local/share/man 0755 root root 1 d none /usr/local/share/man/man1 0755 root root 1 f none /usr/local/share/man/man1/xml2-config.1 0644 root root 1184 36544 1287116933 1 f none /usr/local/share/man/man1/xmlcatalog.1 0644 root root 6103 7794 1287116933 1 f none /usr/local/share/man/man1/xmllint.1 0644 root root 10772 27186 1287116933 1 d none /usr/local/share/man/man3 0755 root root 1 f none /usr/local/share/man/man3/libxml.3 0644 root root 1630 6442 1287116933 1 i checkinstall 790 2504 1287116940 1 i pkginfo 255 19474 1287116940 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!0707010002b1b0000081a40000000000000000000000014cb7d88c000000ff000000b500010002ffffffffffffffff0000000800000000pkginfoPKG=libxml2 NAME=libxml2 2.7.7 i86pc Solaris 10 VERSION=2.7.7 PSTAMP=15th October 2010 VENDOR=Daniel Veillard EMAIL=http://xmlsoft.org/downloads.html DESC=XML C library ARCH=i386 CATEGORY=utility CLASSES=none BASEDIR=/ ISTATES=S s 1 2 3 RSTATES=S s 1 2 3 0707010002b1af000081a40000000000000000000000014cb7d88c00006fb3000000b500010002ffffffffffffffff0000000700000000pkgmap: 1 32682 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/bin 0755 root root 1 f none /usr/local/bin/xml2-config 0755 root root 1980 21608 1287116933 1 f none /usr/local/bin/xmlcatalog 0755 root root 27840 34685 1287116933 1 f none /usr/local/bin/xmllint 0755 root root 135492 39209 1287116933 1 d none /usr/local/include 0755 root root 1 d none /usr/local/include/libxml2 0755 root root 1 d none /usr/local/include/libxml2/libxml 0755 root root 1 f none /usr/local/include/libxml2/libxml/DOCBparser.h 0644 root root 3277 26997 1287116932 1 f none /usr/local/include/libxml2/libxml/HTMLparser.h 0644 root root 9296 21688 1287116932 1 f none /usr/local/include/libxml2/libxml/HTMLtree.h 0644 root root 3685 24202 1287116932 1 f none /usr/local/include/libxml2/libxml/SAX.h 0644 root root 4412 254 1287116932 1 f none /usr/local/include/libxml2/libxml/SAX2.h 0644 root root 4944 47206 1287116932 1 f none /usr/local/include/libxml2/libxml/c14n.h 0644 root root 3110 45713 1287116932 1 f none /usr/local/include/libxml2/libxml/catalog.h 0644 root root 4958 62701 1287116932 1 f none /usr/local/include/libxml2/libxml/chvalid.h 0644 root root 5159 6441 1287116932 1 f none /usr/local/include/libxml2/libxml/debugXML.h 0644 root root 5181 58739 1287116932 1 f none /usr/local/include/libxml2/libxml/dict.h 0644 root root 1582 54062 1287116932 1 f none /usr/local/include/libxml2/libxml/encoding.h 0644 root root 7931 33159 1287116932 1 f none /usr/local/include/libxml2/libxml/entities.h 0644 root root 4672 34987 1287116932 1 f none /usr/local/include/libxml2/libxml/globals.h 0644 root root 14651 41700 1287116932 1 f none /usr/local/include/libxml2/libxml/hash.h 0644 root root 6567 40118 1287116932 1 f none /usr/local/include/libxml2/libxml/list.h 0644 root root 3422 9290 1287116932 1 f none /usr/local/include/libxml2/libxml/nanoftp.h 0644 root root 3347 65046 1287116932 1 f none /usr/local/include/libxml2/libxml/nanohttp.h 0644 root root 2018 25405 1287116932 1 f none /usr/local/include/libxml2/libxml/parser.h 0644 root root 39556 20438 1287116932 1 f none /usr/local/include/libxml2/libxml/parserInternals.h 0644 root root 16573 38289 1287116932 1 f none /usr/local/include/libxml2/libxml/pattern.h 0644 root root 2586 14250 1287116932 1 f none /usr/local/include/libxml2/libxml/relaxng.h 0644 root root 5958 14236 1287116932 1 f none /usr/local/include/libxml2/libxml/schemasInternals.h 0644 root root 26023 46943 1287116932 1 f none /usr/local/include/libxml2/libxml/schematron.h 0644 root root 4393 38715 1287116932 1 f none /usr/local/include/libxml2/libxml/threads.h 0644 root root 1852 22060 1287116932 1 f none /usr/local/include/libxml2/libxml/tree.h 0644 root root 36628 28341 1287116932 1 f none /usr/local/include/libxml2/libxml/uri.h 0644 root root 2664 14130 1287116932 1 f none /usr/local/include/libxml2/libxml/valid.h 0644 root root 13818 42837 1287116932 1 f none /usr/local/include/libxml2/libxml/xinclude.h 0644 root root 2967 33993 1287116932 1 f none /usr/local/include/libxml2/libxml/xlink.h 0644 root root 5051 29979 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlIO.h 0644 root root 10448 54431 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlautomata.h 0644 root root 3992 52088 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlerror.h 0644 root root 36676 39870 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlexports.h 0644 root root 3914 45768 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlmemory.h 0644 root root 5945 32295 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlmodule.h 0644 root root 1171 28508 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlreader.h 0644 root root 12551 25798 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlregexp.h 0644 root root 5458 46433 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlsave.h 0644 root root 2260 49170 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlschemas.h 0644 root root 6202 44970 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlschemastypes.h 0644 root root 4893 2118 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlstring.h 0644 root root 5472 10623 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlunicode.h 0644 root root 9993 44615 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlversion.h 0644 root root 7636 59172 1287116932 1 f none /usr/local/include/libxml2/libxml/xmlwriter.h 0644 root root 21159 10920 1287116932 1 f none /usr/local/include/libxml2/libxml/xpath.h 0644 root root 16199 42789 1287116932 1 f none /usr/local/include/libxml2/libxml/xpathInternals.h 0644 root root 19448 19089 1287116932 1 f none /usr/local/include/libxml2/libxml/xpointer.h 0644 root root 3411 12454 1287116932 1 d none /usr/local/lib 0755 root root 1 f none /usr/local/lib/libxml2.a 0644 root root 4797692 20086 1287116932 1 f none /usr/local/lib/libxml2.la 0755 root root 1014 23283 1287116932 1 s none /usr/local/lib/libxml2.so=libxml2.so.2.7.7 1 s none /usr/local/lib/libxml2.so.2=libxml2.so.2.7.7 1 f none /usr/local/lib/libxml2.so.2.7.7 0755 root root 4089284 4979 1287116932 1 d none /usr/local/lib/pkgconfig 0755 root root 1 f none /usr/local/lib/pkgconfig/libxml-2.0.pc 0644 root root 369 32976 1287116933 1 f none /usr/local/lib/xml2Conf.sh 0644 root root 330 27338 1287116933 1 d none /usr/local/share 0755 root root 1 d none /usr/local/share/aclocal 0755 root root 1 f none /usr/local/share/aclocal/libxml.m4 0644 root root 7880 31344 1287116933 1 d none /usr/local/share/doc 0755 root root 1 d none /usr/local/share/doc/libxml2-2.7.7 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/Copyright 0644 root root 1498 60471 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/examples 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/examples/testHTML.c 0644 root root 21178 11625 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/examples/testSAX.c 0644 root root 27618 44379 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/examples/testXPath.c 0644 root root 5900 8360 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/examples/xmllint.c 0644 root root 96991 8100 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/DOM.gif 0644 root root 3166 16454 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/FAQ.html 0644 root root 21086 20502 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/Libxml2-Logo-180x168.gif 0644 root root 8195 18372 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/Libxml2-Logo-90x34.gif 0644 root root 3070 5797 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/encoding.html 0644 root root 19332 45298 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/examples.xml 0644 root root 32143 64944 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/examples.xsl 0644 root root 7232 22745 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html/html 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/book1.html 0644 root root 9645 56651 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/home.png 0644 root root 654 8089 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/index.html 0644 root root 9645 56651 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/left.png 0644 root root 459 49669 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-DOCBparser.html 0644 root root 20644 9976 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-HTMLparser.html 0644 root root 59714 54097 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-HTMLtree.html 0644 root root 28620 28841 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-SAX.html 0644 root root 43501 2070 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-SAX2.html 0644 root root 44470 29057 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-c14n.html 0644 root root 18074 34566 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-catalog.html 0644 root root 41039 42872 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-chvalid.html 0644 root root 18442 36279 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-debugXML.html 0644 root root 37931 47824 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-dict.html 0644 root root 15745 47928 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-encoding.html 0644 root root 34231 58628 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-entities.html 0644 root root 27700 56334 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-globals.html 0644 root root 33107 11987 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-hash.html 0644 root root 46558 65082 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-lib.html 0644 root root 9645 56651 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-list.html 0644 root root 30126 56146 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-nanoftp.html 0644 root root 26396 22543 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-nanohttp.html 0644 root root 21243 49368 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-parser.html 0644 root root 146100 54015 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-parserInternals.html 0644 root root 120088 15304 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-pattern.html 0644 root root 23692 41744 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-relaxng.html 0644 root root 41021 5883 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-schemasInternals.html 0644 root root 64077 1066 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-schematron.html 0644 root root 21748 25694 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-threads.html 0644 root root 17180 60252 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-tree.html 0644 root root 226158 8499 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-uri.html 0644 root root 22697 58171 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-valid.html 0644 root root 102478 18341 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xinclude.html 0644 root root 19725 885 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xlink.html 0644 root root 21665 29749 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlIO.html 0644 root root 61477 37480 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlautomata.html 0644 root root 39585 3665 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlerror.html 0644 root root 109408 17081 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlexports.html 0644 root root 7610 49486 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlmemory.html 0644 root root 29237 40271 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlmodule.html 0644 root root 11220 47362 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlreader.html 0644 root root 112604 4431 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlregexp.html 0644 root root 45805 15284 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlsave.html 0644 root root 19182 19763 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlschemas.html 0644 root root 44179 2731 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlschemastypes.html 0644 root root 49399 28650 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlstring.html 0644 root root 39315 46149 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlunicode.html 0644 root root 112871 31965 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlversion.html 0644 root root 19720 55141 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlwriter.html 0644 root root 116402 37530 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xpath.html 0644 root root 62165 26014 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xpathInternals.html 0644 root root 142763 55727 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xpointer.html 0644 root root 29887 17355 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/right.png 0644 root root 472 50613 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/html/up.png 0644 root root 406 41501 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/io1.c 0644 root root 3758 32816 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/io1.res 0644 root root 165 13941 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/io2.c 0644 root root 1187 27049 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/io2.res 0644 root root 43 3641 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/libxml.gif 0644 root root 7692 3071 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/parse1.c 0644 root root 1300 37651 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/parse2.c 0644 root root 1967 26348 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/parse3.c 0644 root root 1506 55755 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/parse4.c 0644 root root 3545 15935 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader1.c 0644 root root 2536 438 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader1.res 0644 root root 149 7963 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader2.c 0644 root root 3139 49199 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader3.c 0644 root root 2953 33274 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader3.res 0644 root root 360 28205 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader4.c 0644 root root 3134 48755 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/reader4.res 0644 root root 72 6501 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/redhat.gif 0644 root root 697 1392 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/smallfootonly.gif 0644 root root 2772 33479 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/structure.gif 0644 root root 5559 10757 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/test1.xml 0644 root root 7 489 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/test2.xml 0644 root root 227 16084 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/test3.xml 0644 root root 833 64269 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/testWriter.c 0644 root root 38443 23535 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tree1.c 0644 root root 2249 49217 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tree1.res 0644 root root 121 10602 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tree2.c 0644 root root 3475 64636 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tree2.res 0644 root root 453 34440 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tst.xml 0644 root root 91 7269 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html/tutorial 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apa.html 0644 root root 2114 50077 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apb.html 0644 root root 2026 41976 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apc.html 0644 root root 3094 59411 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apd.html 0644 root root 3232 10161 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ape.html 0644 root root 3096 60954 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apf.html 0644 root root 2949 50052 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/apg.html 0644 root root 3022 55514 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/aph.html 0644 root root 3600 14216 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/api.html 0644 root root 1899 32299 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s02.html 0644 root root 3298 21719 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s03.html 0644 root root 5718 25593 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s04.html 0644 root root 6223 3967 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s05.html 0644 root root 7422 46605 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s06.html 0644 root root 3849 62759 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s07.html 0644 root root 3866 788 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s08.html 0644 root root 3894 1098 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s09.html 0644 root root 7603 1099 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/blank.png 0644 root root 374 27553 1287116933 1 d none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts 0755 root root 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/1.png 0644 root root 329 26541 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/10.png 0644 root root 361 31046 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/2.png 0644 root root 353 30241 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/3.png 0644 root root 350 30758 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/4.png 0644 root root 345 29927 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/5.png 0644 root root 348 29262 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/6.png 0644 root root 355 31934 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/7.png 0644 root root 344 29378 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/8.png 0644 root root 357 30798 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/9.png 0644 root root 357 30377 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/caution.png 0644 root root 1250 25620 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/draft.png 0644 root root 17454 5031 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/home.png 0644 root root 1156 29224 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/important.png 0644 root root 722 19454 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/next.png 0644 root root 1150 26768 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/note.png 0644 root root 490 47376 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/prev.png 0644 root root 1132 25218 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/tip.png 0644 root root 449 41167 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-blank.png 0644 root root 318 25047 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-minus.png 0644 root root 259 19780 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-plus.png 0644 root root 264 20542 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/up.png 0644 root root 1111 21898 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/warning.png 0644 root root 1241 17822 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeaddattribute.c 0644 root root 1136 25548 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeaddkeyword.c 0644 root root 1320 40297 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeconvert.c 0644 root root 1808 56314 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includegetattribute.c 0644 root root 1171 27155 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includekeyword.c 0644 root root 1351 41532 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/includexpath.c 0644 root root 1491 58164 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/index.html 0644 root root 5930 50707 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/ix01.html 0644 root root 2545 19990 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/tutorial/xmltutorial.pdf 0644 root root 51709 26614 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/w3c.png 0644 root root 2028 53965 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/writer.xml 0644 root root 544 42503 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xml.html 0644 root root 249610 1241 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xpath1.c 0644 root root 6631 749 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xpath1.res 0644 root root 114 9317 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xpath2.c 0644 root root 5335 38108 1287116933 1 f none /usr/local/share/doc/libxml2-2.7.7/html/xpath2.res 0644 root root 757 60811 1287116933 1 d none /usr/local/share/gtk-doc 0755 root root 1 d none /usr/local/share/gtk-doc/html 0755 root root 1 d none /usr/local/share/gtk-doc/html/libxml2 0755 root root 1 f none /usr/local/share/gtk-doc/html/libxml2/general.html 0644 root root 5459 10614 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/home.png 0644 root root 654 8089 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/index.html 0644 root root 4321 23385 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/left.png 0644 root root 459 49669 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-DOCBparser.html 0644 root root 17361 21918 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-HTMLparser.html 0644 root root 57872 3734 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-HTMLtree.html 0644 root root 24416 11475 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-SAX.html 0644 root root 38875 56552 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-SAX2.html 0644 root root 39659 2380 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-c14n.html 0644 root root 13546 17146 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-catalog.html 0644 root root 36549 35065 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-chvalid.html 0644 root root 19835 32590 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-debugXML.html 0644 root root 33317 47086 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-dict.html 0644 root root 11361 30250 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-encoding.html 0644 root root 29012 21195 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-entities.html 0644 root root 23118 9981 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-globals.html 0644 root root 35642 21806 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-hash.html 0644 root root 42055 10287 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-list.html 0644 root root 25568 55847 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-nanoftp.html 0644 root root 21563 17347 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-nanohttp.html 0644 root root 16614 5874 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-parser.html 0644 root root 137314 29487 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-parserInternals.html 0644 root root 122546 15856 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-pattern.html 0644 root root 19362 15833 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-relaxng.html 0644 root root 35230 40777 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-schemasInternals.html 0644 root root 65119 15818 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-schematron.html 0644 root root 17105 38134 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-threads.html 0644 root root 12896 39118 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-tree.html 0644 root root 225192 48172 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-uri.html 0644 root root 18434 43196 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-valid.html 0644 root root 98504 41382 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xinclude.html 0644 root root 15920 18434 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xlink.html 0644 root root 17329 12128 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlIO.html 0644 root root 55659 16744 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlautomata.html 0644 root root 35179 33651 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlerror.html 0644 root root 84473 26265 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlexports.html 0644 root root 3585 8335 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlmemory.html 0644 root root 24012 60278 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlmodule.html 0644 root root 6858 40149 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlreader.html 0644 root root 106566 41623 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlregexp.html 0644 root root 42013 8561 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlsave.html 0644 root root 14737 61995 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlschemas.html 0644 root root 39085 22777 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlschemastypes.html 0644 root root 44455 54737 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlstring.html 0644 root root 35113 14365 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlunicode.html 0644 root root 106596 4303 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlversion.html 0644 root root 17973 24519 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xmlwriter.html 0644 root root 110993 3662 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xpath.html 0644 root root 59447 952 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xpathInternals.html 0644 root root 144553 28328 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2-xpointer.html 0644 root root 25453 42833 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/libxml2.devhelp 0644 root root 339203 52285 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/right.png 0644 root root 472 50613 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/style.css 0644 root root 820 1833 1287116933 1 f none /usr/local/share/gtk-doc/html/libxml2/up.png 0644 root root 406 41501 1287116933 1 d none /usr/local/share/man 0755 root root 1 d none /usr/local/share/man/man1 0755 root root 1 f none /usr/local/share/man/man1/xml2-config.1 0644 root root 1184 36544 1287116933 1 f none /usr/local/share/man/man1/xmlcatalog.1 0644 root root 6103 7794 1287116933 1 f none /usr/local/share/man/man1/xmllint.1 0644 root root 10772 27186 1287116933 1 d none /usr/local/share/man/man3 0755 root root 1 f none /usr/local/share/man/man3/libxml.3 0644 root root 1630 6442 1287116933 1 i checkinstall 790 2504 1287116940 1 i pkginfo 255 19474 1287116940 0707010002b2d5000041ed0000000000000000000000024cb7d88c00000000000000b500010002ffffffffffffffff0000000800000000install0707010002b2d6000081ed0000000000000000000000014cb7d88c00000316000000b500010002ffffffffffffffff0000001500000000install/checkinstall#!/bin/sh # expected_bits="64" expected_release="5.10" expected_platform="i386" # release=`uname -r` platform=`uname -p` bits=`isainfo -b` # if [ ${platform} != ${expected_platform} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n" echo "\tAborting installation.\n\n\n" exit 1 fi if [ ${release} != ${expected_release} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n" echo "\tAborting installation.\n\n\n" exit 1 fi #if [ ${bits} != ${expected_bits} ]; then # echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n" # echo "\tYour machine is running a ${bits} bit O.S. currently\n" # echo "\tAborting installation.\n\n\n" # exit 1 #fi exit 0 0707010002b1b1000041ed0000000000000000000000034cb7d88c00000000000000b500010002ffffffffffffffff0000000500000000root0707010002b1b2000041ed0000000000000000000000034cb7d88c00000000000000b500010002ffffffffffffffff0000000900000000root/usr0707010002b1b3000041ed0000000000000000000000064cb7d88c00000000000000b500010002ffffffffffffffff0000000f00000000root/usr/local0707010002b1f2000041ed0000000000000000000000064cb7d88c00000000000000b500010002ffffffffffffffff0000001500000000root/usr/local/share0707010002b1f5000041ed0000000000000000000000034cb7d88c00000000000000b500010002ffffffffffffffff0000001900000000root/usr/local/share/doc0707010002b1f6000041ed0000000000000000000000044cb7d88c00000000000000b500010002ffffffffffffffff0000002700000000root/usr/local/share/doc/libxml2-2.7.70707010002b1f8000041ed0000000000000000000000024cb7d88c00000000000000b500010002ffffffffffffffff0000003000000000root/usr/local/share/doc/libxml2-2.7.7/examples0707010002b1fc000081a40000000000000000000000014cb7d88500017adf000000b500010002ffffffffffffffff0000003a00000000root/usr/local/share/doc/libxml2-2.7.7/examples/xmllint.c/* * xmllint.c : a small tester program for XML input. * * See Copyright for the status of this software. * * daniel@veillard.com */ #include "libxml.h" #include #include #include #if defined (_WIN32) && !defined(__CYGWIN__) #if defined (_MSC_VER) || defined(__BORLANDC__) #include #pragma comment(lib, "ws2_32.lib") #define gettimeofday(p1,p2) #endif /* _MSC_VER */ #endif /* _WIN32 */ #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_TIME_H #include #endif #ifdef __MINGW32__ #define _WINSOCKAPI_ #include #include #undef XML_SOCKLEN_T #define XML_SOCKLEN_T unsigned int #endif #ifdef HAVE_SYS_TIMEB_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_MMAN_H #include /* seems needed for Solaris */ #ifndef MAP_FAILED #define MAP_FAILED ((void *) -1) #endif #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_LIBREADLINE #include #ifdef HAVE_LIBHISTORY #include #endif #endif #include #include #include #include #include #include #include #include #include #ifdef LIBXML_XINCLUDE_ENABLED #include #endif #ifdef LIBXML_CATALOG_ENABLED #include #endif #include #include #ifdef LIBXML_SCHEMATRON_ENABLED #include #endif #ifdef LIBXML_SCHEMAS_ENABLED #include #include #endif #ifdef LIBXML_PATTERN_ENABLED #include #endif #ifdef LIBXML_C14N_ENABLED #include #endif #ifdef LIBXML_OUTPUT_ENABLED #include #endif #ifndef XML_XML_DEFAULT_CATALOG #define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog" #endif typedef enum { XMLLINT_RETURN_OK = 0, /* No error */ XMLLINT_ERR_UNCLASS = 1, /* Unclassified */ XMLLINT_ERR_DTD = 2, /* Error in DTD */ XMLLINT_ERR_VALID = 3, /* Validation error */ XMLLINT_ERR_RDFILE = 4, /* CtxtReadFile error */ XMLLINT_ERR_SCHEMACOMP = 5, /* Schema compilation */ XMLLINT_ERR_OUT = 6, /* Error writing output */ XMLLINT_ERR_SCHEMAPAT = 7, /* Error in schema pattern */ XMLLINT_ERR_RDREGIS = 8, /* Error in Reader registration */ XMLLINT_ERR_MEM = 9, /* Out of memory error */ XMLLINT_ERR_XPATH = 10 /* XPath evaluation error */ } xmllintReturnCode; #ifdef LIBXML_DEBUG_ENABLED static int shell = 0; static int debugent = 0; #endif static int debug = 0; static int maxmem = 0; #ifdef LIBXML_TREE_ENABLED static int copy = 0; #endif /* LIBXML_TREE_ENABLED */ static int recovery = 0; static int noent = 0; static int noblanks = 0; static int noout = 0; static int nowrap = 0; #ifdef LIBXML_OUTPUT_ENABLED static int format = 0; static const char *output = NULL; static int compress = 0; static int oldout = 0; #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef LIBXML_VALID_ENABLED static int valid = 0; static int postvalid = 0; static char * dtdvalid = NULL; static char * dtdvalidfpi = NULL; #endif #ifdef LIBXML_SCHEMAS_ENABLED static char * relaxng = NULL; static xmlRelaxNGPtr relaxngschemas = NULL; static char * schema = NULL; static xmlSchemaPtr wxschemas = NULL; #endif #ifdef LIBXML_SCHEMATRON_ENABLED static char * schematron = NULL; static xmlSchematronPtr wxschematron = NULL; #endif static int repeat = 0; static int insert = 0; #if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED) static int html = 0; static int xmlout = 0; #endif static int htmlout = 0; #ifdef LIBXML_PUSH_ENABLED static int push = 0; #endif /* LIBXML_PUSH_ENABLED */ #ifdef HAVE_SYS_MMAN_H static int memory = 0; #endif static int testIO = 0; static char *encoding = NULL; #ifdef LIBXML_XINCLUDE_ENABLED static int xinclude = 0; #endif static int dtdattrs = 0; static int loaddtd = 0; static xmllintReturnCode progresult = XMLLINT_RETURN_OK; static int timing = 0; static int generate = 0; static int dropdtd = 0; #ifdef LIBXML_CATALOG_ENABLED static int catalogs = 0; static int nocatalogs = 0; #endif #ifdef LIBXML_C14N_ENABLED static int canonical = 0; static int canonical_11 = 0; static int exc_canonical = 0; #endif #ifdef LIBXML_READER_ENABLED static int stream = 0; static int walker = 0; #endif /* LIBXML_READER_ENABLED */ static int chkregister = 0; static int nbregister = 0; #ifdef LIBXML_SAX1_ENABLED static int sax1 = 0; #endif /* LIBXML_SAX1_ENABLED */ #ifdef LIBXML_PATTERN_ENABLED static const char *pattern = NULL; static xmlPatternPtr patternc = NULL; static xmlStreamCtxtPtr patstream = NULL; #endif #ifdef LIBXML_XPATH_ENABLED static const char *xpathquery = NULL; #endif static int options = XML_PARSE_COMPACT; static int sax = 0; static int oldxml10 = 0; /************************************************************************ * * * Entity loading control and customization. * * * ************************************************************************/ #define MAX_PATHS 64 #ifdef _WIN32 # define PATH_SEPARATOR ';' #else # define PATH_SEPARATOR ':' #endif static xmlChar *paths[MAX_PATHS + 1]; static int nbpaths = 0; static int load_trace = 0; static void parsePath(const xmlChar *path) { const xmlChar *cur; if (path == NULL) return; while (*path != 0) { if (nbpaths >= MAX_PATHS) { fprintf(stderr, "MAX_PATHS reached: too many paths\n"); return; } cur = path; while ((*cur == ' ') || (*cur == PATH_SEPARATOR)) cur++; path = cur; while ((*cur != 0) && (*cur != ' ') && (*cur != PATH_SEPARATOR)) cur++; if (cur != path) { paths[nbpaths] = xmlStrndup(path, cur - path); if (paths[nbpaths] != NULL) nbpaths++; path = cur; } } } static xmlExternalEntityLoader defaultEntityLoader = NULL; static xmlParserInputPtr xmllintExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) { xmlParserInputPtr ret; warningSAXFunc warning = NULL; errorSAXFunc err = NULL; int i; const char *lastsegment = URL; const char *iter = URL; if ((nbpaths > 0) && (iter != NULL)) { while (*iter != 0) { if (*iter == '/') lastsegment = iter + 1; iter++; } } if ((ctxt != NULL) && (ctxt->sax != NULL)) { warning = ctxt->sax->warning; err = ctxt->sax->error; ctxt->sax->warning = NULL; ctxt->sax->error = NULL; } if (defaultEntityLoader != NULL) { ret = defaultEntityLoader(URL, ID, ctxt); if (ret != NULL) { if (warning != NULL) ctxt->sax->warning = warning; if (err != NULL) ctxt->sax->error = err; if (load_trace) { fprintf \ (stderr, "Loaded URL=\"%s\" ID=\"%s\"\n", URL ? URL : "(null)", ID ? ID : "(null)"); } return(ret); } } for (i = 0;i < nbpaths;i++) { xmlChar *newURL; newURL = xmlStrdup((const xmlChar *) paths[i]); newURL = xmlStrcat(newURL, (const xmlChar *) "/"); newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment); if (newURL != NULL) { ret = defaultEntityLoader((const char *)newURL, ID, ctxt); if (ret != NULL) { if (warning != NULL) ctxt->sax->warning = warning; if (err != NULL) ctxt->sax->error = err; if (load_trace) { fprintf \ (stderr, "Loaded URL=\"%s\" ID=\"%s\"\n", newURL, ID ? ID : "(null)"); } xmlFree(newURL); return(ret); } xmlFree(newURL); } } if (err != NULL) ctxt->sax->error = err; if (warning != NULL) { ctxt->sax->warning = warning; if (URL != NULL) warning(ctxt, "failed to load external entity \"%s\"\n", URL); else if (ID != NULL) warning(ctxt, "failed to load external entity \"%s\"\n", ID); } return(NULL); } /************************************************************************ * * * Memory allocation consumption debugging * * * ************************************************************************/ static void OOM(void) { fprintf(stderr, "Ran out of memory needs > %d bytes\n", maxmem); progresult = XMLLINT_ERR_MEM; } static void myFreeFunc(void *mem) { xmlMemFree(mem); } static void * myMallocFunc(size_t size) { void *ret; ret = xmlMemMalloc(size); if (ret != NULL) { if (xmlMemUsed() > maxmem) { OOM(); xmlMemFree(ret); return (NULL); } } return (ret); } static void * myReallocFunc(void *mem, size_t size) { void *ret; ret = xmlMemRealloc(mem, size); if (ret != NULL) { if (xmlMemUsed() > maxmem) { OOM(); xmlMemFree(ret); return (NULL); } } return (ret); } static char * myStrdupFunc(const char *str) { char *ret; ret = xmlMemoryStrdup(str); if (ret != NULL) { if (xmlMemUsed() > maxmem) { OOM(); xmlFree(ret); return (NULL); } } return (ret); } /************************************************************************ * * * Internal timing routines to remove the necessity to have * * unix-specific function calls. * * * ************************************************************************/ #ifndef HAVE_GETTIMEOFDAY #ifdef HAVE_SYS_TIMEB_H #ifdef HAVE_SYS_TIME_H #ifdef HAVE_FTIME static int my_gettimeofday(struct timeval *tvp, void *tzp) { struct timeb timebuffer; ftime(&timebuffer); if (tvp) { tvp->tv_sec = timebuffer.time; tvp->tv_usec = timebuffer.millitm * 1000L; } return (0); } #define HAVE_GETTIMEOFDAY 1 #define gettimeofday my_gettimeofday #endif /* HAVE_FTIME */ #endif /* HAVE_SYS_TIME_H */ #endif /* HAVE_SYS_TIMEB_H */ #endif /* !HAVE_GETTIMEOFDAY */ #if defined(HAVE_GETTIMEOFDAY) static struct timeval begin, end; /* * startTimer: call where you want to start timing */ static void startTimer(void) { gettimeofday(&begin, NULL); } /* * endTimer: call where you want to stop timing and to print out a * message about the timing performed; format is a printf * type argument */ static void XMLCDECL endTimer(const char *fmt, ...) { long msec; va_list ap; gettimeofday(&end, NULL); msec = end.tv_sec - begin.tv_sec; msec *= 1000; msec += (end.tv_usec - begin.tv_usec) / 1000; #ifndef HAVE_STDARG_H #error "endTimer required stdarg functions" #endif va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, " took %ld ms\n", msec); } #elif defined(HAVE_TIME_H) /* * No gettimeofday function, so we have to make do with calling clock. * This is obviously less accurate, but there's little we can do about * that. */ #ifndef CLOCKS_PER_SEC #define CLOCKS_PER_SEC 100 #endif static clock_t begin, end; static void startTimer(void) { begin = clock(); } static void XMLCDECL endTimer(const char *fmt, ...) { long msec; va_list ap; end = clock(); msec = ((end - begin) * 1000) / CLOCKS_PER_SEC; #ifndef HAVE_STDARG_H #error "endTimer required stdarg functions" #endif va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, " took %ld ms\n", msec); } #else /* * We don't have a gettimeofday or time.h, so we just don't do timing */ static void startTimer(void) { /* * Do nothing */ } static void XMLCDECL endTimer(char *format, ...) { /* * We cannot do anything because we don't have a timing function */ #ifdef HAVE_STDARG_H va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); fprintf(stderr, " was not timed\n", msec); #else /* We don't have gettimeofday, time or stdarg.h, what crazy world is * this ?! */ #endif } #endif /************************************************************************ * * * HTML ouput * * * ************************************************************************/ static char buffer[50000]; static void xmlHTMLEncodeSend(void) { char *result; result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); if (result) { xmlGenericError(xmlGenericErrorContext, "%s", result); xmlFree(result); } buffer[0] = 0; } /** * xmlHTMLPrintFileInfo: * @input: an xmlParserInputPtr input * * Displays the associated file and line informations for the current input */ static void xmlHTMLPrintFileInfo(xmlParserInputPtr input) { int len; xmlGenericError(xmlGenericErrorContext, "

"); len = strlen(buffer); if (input != NULL) { if (input->filename) { snprintf(&buffer[len], sizeof(buffer) - len, "%s:%d: ", input->filename, input->line); } else { snprintf(&buffer[len], sizeof(buffer) - len, "Entity: line %d: ", input->line); } } xmlHTMLEncodeSend(); } /** * xmlHTMLPrintFileContext: * @input: an xmlParserInputPtr input * * Displays current context within the input content for error tracking */ static void xmlHTMLPrintFileContext(xmlParserInputPtr input) { const xmlChar *cur, *base; int len; int n; if (input == NULL) return; xmlGenericError(xmlGenericErrorContext, "

\n");
    cur = input->cur;
    base = input->base;
    while ((cur > base) && ((*cur == '\n') || (*cur == '\r'))) {
	cur--;
    }
    n = 0;
    while ((n++ < 80) && (cur > base) && (*cur != '\n') && (*cur != '\r'))
        cur--;
    if ((*cur == '\n') || (*cur == '\r')) cur++;
    base = cur;
    n = 0;
    while ((*cur != 0) && (*cur != '\n') && (*cur != '\r') && (n < 79)) {
	len = strlen(buffer);
        snprintf(&buffer[len], sizeof(buffer) - len, "%c",
		    (unsigned char) *cur++);
	n++;
    }
    len = strlen(buffer);
    snprintf(&buffer[len], sizeof(buffer) - len, "\n");
    cur = input->cur;
    while ((*cur == '\n') || (*cur == '\r'))
	cur--;
    n = 0;
    while ((cur != base) && (n++ < 80)) {
	len = strlen(buffer);
        snprintf(&buffer[len], sizeof(buffer) - len, " ");
        base++;
    }
    len = strlen(buffer);
    snprintf(&buffer[len], sizeof(buffer) - len, "^\n");
    xmlHTMLEncodeSend();
    xmlGenericError(xmlGenericErrorContext, "
"); } /** * xmlHTMLError: * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display * * Display and format an error messages, gives file, line, position and * extra parameters. */ static void XMLCDECL xmlHTMLError(void *ctx, const char *msg, ...) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserInputPtr input; va_list args; int len; buffer[0] = 0; input = ctxt->input; if ((input != NULL) && (input->filename == NULL) && (ctxt->inputNr > 1)) { input = ctxt->inputTab[ctxt->inputNr - 2]; } xmlHTMLPrintFileInfo(input); xmlGenericError(xmlGenericErrorContext, "error: "); va_start(args, msg); len = strlen(buffer); vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args); va_end(args); xmlHTMLEncodeSend(); xmlGenericError(xmlGenericErrorContext, "

\n"); xmlHTMLPrintFileContext(input); xmlHTMLEncodeSend(); } /** * xmlHTMLWarning: * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display * * Display and format a warning messages, gives file, line, position and * extra parameters. */ static void XMLCDECL xmlHTMLWarning(void *ctx, const char *msg, ...) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserInputPtr input; va_list args; int len; buffer[0] = 0; input = ctxt->input; if ((input != NULL) && (input->filename == NULL) && (ctxt->inputNr > 1)) { input = ctxt->inputTab[ctxt->inputNr - 2]; } xmlHTMLPrintFileInfo(input); xmlGenericError(xmlGenericErrorContext, "warning: "); va_start(args, msg); len = strlen(buffer); vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args); va_end(args); xmlHTMLEncodeSend(); xmlGenericError(xmlGenericErrorContext, "

\n"); xmlHTMLPrintFileContext(input); xmlHTMLEncodeSend(); } /** * xmlHTMLValidityError: * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display * * Display and format an validity error messages, gives file, * line, position and extra parameters. */ static void XMLCDECL xmlHTMLValidityError(void *ctx, const char *msg, ...) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserInputPtr input; va_list args; int len; buffer[0] = 0; input = ctxt->input; if ((input->filename == NULL) && (ctxt->inputNr > 1)) input = ctxt->inputTab[ctxt->inputNr - 2]; xmlHTMLPrintFileInfo(input); xmlGenericError(xmlGenericErrorContext, "validity error: "); len = strlen(buffer); va_start(args, msg); vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args); va_end(args); xmlHTMLEncodeSend(); xmlGenericError(xmlGenericErrorContext, "

\n"); xmlHTMLPrintFileContext(input); xmlHTMLEncodeSend(); progresult = XMLLINT_ERR_VALID; } /** * xmlHTMLValidityWarning: * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display * * Display and format a validity warning messages, gives file, line, * position and extra parameters. */ static void XMLCDECL xmlHTMLValidityWarning(void *ctx, const char *msg, ...) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserInputPtr input; va_list args; int len; buffer[0] = 0; input = ctxt->input; if ((input->filename == NULL) && (ctxt->inputNr > 1)) input = ctxt->inputTab[ctxt->inputNr - 2]; xmlHTMLPrintFileInfo(input); xmlGenericError(xmlGenericErrorContext, "validity warning: "); va_start(args, msg); len = strlen(buffer); vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args); va_end(args); xmlHTMLEncodeSend(); xmlGenericError(xmlGenericErrorContext, "

\n"); xmlHTMLPrintFileContext(input); xmlHTMLEncodeSend(); } /************************************************************************ * * * Shell Interface * * * ************************************************************************/ #ifdef LIBXML_DEBUG_ENABLED #ifdef LIBXML_XPATH_ENABLED /** * xmlShellReadline: * @prompt: the prompt value * * Read a string * * Returns a pointer to it or NULL on EOF the caller is expected to * free the returned string. */ static char * xmlShellReadline(char *prompt) { #ifdef HAVE_LIBREADLINE char *line_read; /* Get a line from the user. */ line_read = readline (prompt); /* If the line has any text in it, save it on the history. */ if (line_read && *line_read) add_history (line_read); return (line_read); #else char line_read[501]; char *ret; int len; if (prompt != NULL) fprintf(stdout, "%s", prompt); if (!fgets(line_read, 500, stdin)) return(NULL); line_read[500] = 0; len = strlen(line_read); ret = (char *) malloc(len + 1); if (ret != NULL) { memcpy (ret, line_read, len + 1); } return(ret); #endif } #endif /* LIBXML_XPATH_ENABLED */ #endif /* LIBXML_DEBUG_ENABLED */ /************************************************************************ * * * I/O Interfaces * * * ************************************************************************/ static int myRead(FILE *f, char * buf, int len) { return(fread(buf, 1, len, f)); } static void myClose(FILE *f) { if (f != stdin) { fclose(f); } } /************************************************************************ * * * SAX based tests * * * ************************************************************************/ /* * empty SAX block */ static xmlSAXHandler emptySAXHandlerStruct = { NULL, /* internalSubset */ NULL, /* isStandalone */ NULL, /* hasInternalSubset */ NULL, /* hasExternalSubset */ NULL, /* resolveEntity */ NULL, /* getEntity */ NULL, /* entityDecl */ NULL, /* notationDecl */ NULL, /* attributeDecl */ NULL, /* elementDecl */ NULL, /* unparsedEntityDecl */ NULL, /* setDocumentLocator */ NULL, /* startDocument */ NULL, /* endDocument */ NULL, /* startElement */ NULL, /* endElement */ NULL, /* reference */ NULL, /* characters */ NULL, /* ignorableWhitespace */ NULL, /* processingInstruction */ NULL, /* comment */ NULL, /* xmlParserWarning */ NULL, /* xmlParserError */ NULL, /* xmlParserError */ NULL, /* getParameterEntity */ NULL, /* cdataBlock; */ NULL, /* externalSubset; */ XML_SAX2_MAGIC, NULL, NULL, /* startElementNs */ NULL, /* endElementNs */ NULL /* xmlStructuredErrorFunc */ }; static xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct; extern xmlSAXHandlerPtr debugSAXHandler; static int callbacks; /** * isStandaloneDebug: * @ctxt: An XML parser context * * Is this document tagged standalone ? * * Returns 1 if true */ static int isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (noout) return(0); fprintf(stdout, "SAX.isStandalone()\n"); return(0); } /** * hasInternalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an internal subset * * Returns 1 if true */ static int hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (noout) return(0); fprintf(stdout, "SAX.hasInternalSubset()\n"); return(0); } /** * hasExternalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an external subset * * Returns 1 if true */ static int hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (noout) return(0); fprintf(stdout, "SAX.hasExternalSubset()\n"); return(0); } /** * internalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an internal subset */ static void internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { callbacks++; if (noout) return; fprintf(stdout, "SAX.internalSubset(%s,", name); if (ExternalID == NULL) fprintf(stdout, " ,"); else fprintf(stdout, " %s,", ExternalID); if (SystemID == NULL) fprintf(stdout, " )\n"); else fprintf(stdout, " %s)\n", SystemID); } /** * externalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an external subset */ static void externalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { callbacks++; if (noout) return; fprintf(stdout, "SAX.externalSubset(%s,", name); if (ExternalID == NULL) fprintf(stdout, " ,"); else fprintf(stdout, " %s,", ExternalID); if (SystemID == NULL) fprintf(stdout, " )\n"); else fprintf(stdout, " %s)\n", SystemID); } /** * resolveEntityDebug: * @ctxt: An XML parser context * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * Special entity resolver, better left to the parser, it has * more context than the application layer. * The default behaviour is to NOT resolve the entities, in that case * the ENTITY_REF nodes are built in the structure (and the parameter * values). * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ static xmlParserInputPtr resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId) { callbacks++; if (noout) return(NULL); /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ fprintf(stdout, "SAX.resolveEntity("); if (publicId != NULL) fprintf(stdout, "%s", (char *)publicId); else fprintf(stdout, " "); if (systemId != NULL) fprintf(stdout, ", %s)\n", (char *)systemId); else fprintf(stdout, ", )\n"); return(NULL); } /** * getEntityDebug: * @ctxt: An XML parser context * @name: The entity name * * Get an entity by name * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ static xmlEntityPtr getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { callbacks++; if (noout) return(NULL); fprintf(stdout, "SAX.getEntity(%s)\n", name); return(NULL); } /** * getParameterEntityDebug: * @ctxt: An XML parser context * @name: The entity name * * Get a parameter entity by name * * Returns the xmlParserInputPtr */ static xmlEntityPtr getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { callbacks++; if (noout) return(NULL); fprintf(stdout, "SAX.getParameterEntity(%s)\n", name); return(NULL); } /** * entityDeclDebug: * @ctxt: An XML parser context * @name: the entity name * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). * * An entity definition has been parsed */ static void entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) { const xmlChar *nullstr = BAD_CAST "(null)"; /* not all libraries handle printing null pointers nicely */ if (publicId == NULL) publicId = nullstr; if (systemId == NULL) systemId = nullstr; if (content == NULL) content = (xmlChar *)nullstr; callbacks++; if (noout) return; fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n", name, type, publicId, systemId, content); } /** * attributeDeclDebug: * @ctxt: An XML parser context * @name: the attribute name * @type: the attribute type * * An attribute definition has been parsed */ static void attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem, const xmlChar * name, int type, int def, const xmlChar * defaultValue, xmlEnumerationPtr tree) { callbacks++; if (noout) return; if (defaultValue == NULL) fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, NULL, ...)\n", elem, name, type, def); else fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n", elem, name, type, def, defaultValue); xmlFreeEnumeration(tree); } /** * elementDeclDebug: * @ctxt: An XML parser context * @name: the element name * @type: the element type * @content: the element value (without processing). * * An element definition has been parsed */ static void elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type, xmlElementContentPtr content ATTRIBUTE_UNUSED) { callbacks++; if (noout) return; fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n", name, type); } /** * notationDeclDebug: * @ctxt: An XML parser context * @name: The name of the notation * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * What to do when a notation declaration has been parsed. */ static void notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) { callbacks++; if (noout) return; fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n", (char *) name, (char *) publicId, (char *) systemId); } /** * unparsedEntityDeclDebug: * @ctxt: An XML parser context * @name: The name of the entity * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @notationName: the name of the notation * * What to do when an unparsed entity declaration is parsed */ static void unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) { const xmlChar *nullstr = BAD_CAST "(null)"; if (publicId == NULL) publicId = nullstr; if (systemId == NULL) systemId = nullstr; if (notationName == NULL) notationName = nullstr; callbacks++; if (noout) return; fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n", (char *) name, (char *) publicId, (char *) systemId, (char *) notationName); } /** * setDocumentLocatorDebug: * @ctxt: An XML parser context * @loc: A SAX Locator * * Receive the document locator at startup, actually xmlDefaultSAXLocator * Everything is available on the context, so this is useless in our case. */ static void setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED) { callbacks++; if (noout) return; fprintf(stdout, "SAX.setDocumentLocator()\n"); } /** * startDocumentDebug: * @ctxt: An XML parser context * * called when the document start being processed. */ static void startDocumentDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (noout) return; fprintf(stdout, "SAX.startDocument()\n"); } /** * endDocumentDebug: * @ctxt: An XML parser context * * called when the document end has been detected. */ static void endDocumentDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (noout) return; fprintf(stdout, "SAX.endDocument()\n"); } /** * startElementDebug: * @ctxt: An XML parser context * @name: The element name * * called when an opening tag has been processed. */ static void startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts) { int i; callbacks++; if (noout) return; fprintf(stdout, "SAX.startElement(%s", (char *) name); if (atts != NULL) { for (i = 0;(atts[i] != NULL);i++) { fprintf(stdout, ", %s='", atts[i++]); if (atts[i] != NULL) fprintf(stdout, "%s'", atts[i]); } } fprintf(stdout, ")\n"); } /** * endElementDebug: * @ctxt: An XML parser context * @name: The element name * * called when the end of an element has been detected. */ static void endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { callbacks++; if (noout) return; fprintf(stdout, "SAX.endElement(%s)\n", (char *) name); } /** * charactersDebug: * @ctxt: An XML parser context * @ch: a xmlChar string * @len: the number of xmlChar * * receiving some chars from the parser. * Question: how much at a time ??? */ static void charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) { char out[40]; int i; callbacks++; if (noout) return; for (i = 0;(i 0) { fprintf(stderr, "%s fails to validate\n", filename); progresult = XMLLINT_ERR_VALID; } else { fprintf(stderr, "%s validation generated an internal error\n", filename); progresult = XMLLINT_ERR_VALID; } } xmlSchemaFreeValidCtxt(vctxt); } else #endif { /* * Create the parser context amd hook the input */ ctxt = xmlNewParserCtxt(); if (ctxt == NULL) { xmlFreeParserInputBuffer(buf); goto error; } old_sax = ctxt->sax; ctxt->sax = handler; ctxt->userData = (void *) user_data; inputStream = xmlNewIOInputStream(ctxt, buf, XML_CHAR_ENCODING_NONE); if (inputStream == NULL) { xmlFreeParserInputBuffer(buf); goto error; } inputPush(ctxt, inputStream); /* do the parsing */ xmlParseDocument(ctxt); if (ctxt->myDoc != NULL) { fprintf(stderr, "SAX generated a doc !\n"); xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL; } } error: if (ctxt != NULL) { ctxt->sax = old_sax; xmlFreeParserCtxt(ctxt); } } /************************************************************************ * * * Stream Test processing * * * ************************************************************************/ #ifdef LIBXML_READER_ENABLED static void processNode(xmlTextReaderPtr reader) { const xmlChar *name, *value; int type, empty; type = xmlTextReaderNodeType(reader); empty = xmlTextReaderIsEmptyElement(reader); if (debug) { name = xmlTextReaderConstName(reader); if (name == NULL) name = BAD_CAST "--"; value = xmlTextReaderConstValue(reader); printf("%d %d %s %d %d", xmlTextReaderDepth(reader), type, name, empty, xmlTextReaderHasValue(reader)); if (value == NULL) printf("\n"); else { printf(" %s\n", value); } } #ifdef LIBXML_PATTERN_ENABLED if (patternc) { xmlChar *path = NULL; int match = -1; if (type == XML_READER_TYPE_ELEMENT) { /* do the check only on element start */ match = xmlPatternMatch(patternc, xmlTextReaderCurrentNode(reader)); if (match) { #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) path = xmlGetNodePath(xmlTextReaderCurrentNode(reader)); printf("Node %s matches pattern %s\n", path, pattern); #else printf("Node %s matches pattern %s\n", xmlTextReaderConstName(reader), pattern); #endif } } if (patstream != NULL) { int ret; if (type == XML_READER_TYPE_ELEMENT) { ret = xmlStreamPush(patstream, xmlTextReaderConstLocalName(reader), xmlTextReaderConstNamespaceUri(reader)); if (ret < 0) { fprintf(stderr, "xmlStreamPush() failure\n"); xmlFreeStreamCtxt(patstream); patstream = NULL; } else if (ret != match) { #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) if (path == NULL) { path = xmlGetNodePath( xmlTextReaderCurrentNode(reader)); } #endif fprintf(stderr, "xmlPatternMatch and xmlStreamPush disagree\n"); if (path != NULL) fprintf(stderr, " pattern %s node %s\n", pattern, path); else fprintf(stderr, " pattern %s node %s\n", pattern, xmlTextReaderConstName(reader)); } } if ((type == XML_READER_TYPE_END_ELEMENT) || ((type == XML_READER_TYPE_ELEMENT) && (empty))) { ret = xmlStreamPop(patstream); if (ret < 0) { fprintf(stderr, "xmlStreamPop() failure\n"); xmlFreeStreamCtxt(patstream); patstream = NULL; } } } if (path != NULL) xmlFree(path); } #endif } static void streamFile(char *filename) { xmlTextReaderPtr reader; int ret; #ifdef HAVE_SYS_MMAN_H int fd = -1; struct stat info; const char *base = NULL; xmlParserInputBufferPtr input = NULL; if (memory) { if (stat(filename, &info) < 0) return; if ((fd = open(filename, O_RDONLY)) < 0) return; base = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0) ; if (base == (void *) MAP_FAILED) return; reader = xmlReaderForMemory(base, info.st_size, filename, NULL, options); } else #endif reader = xmlReaderForFile(filename, NULL, options); #ifdef LIBXML_PATTERN_ENABLED if (pattern != NULL) { patternc = xmlPatterncompile((const xmlChar *) pattern, NULL, 0, NULL); if (patternc == NULL) { xmlGenericError(xmlGenericErrorContext, "Pattern %s failed to compile\n", pattern); progresult = XMLLINT_ERR_SCHEMAPAT; pattern = NULL; } } if (patternc != NULL) { patstream = xmlPatternGetStreamCtxt(patternc); if (patstream != NULL) { ret = xmlStreamPush(patstream, NULL, NULL); if (ret < 0) { fprintf(stderr, "xmlStreamPush() failure\n"); xmlFreeStreamCtxt(patstream); patstream = NULL; } } } #endif if (reader != NULL) { #ifdef LIBXML_VALID_ENABLED if (valid) xmlTextReaderSetParserProp(reader, XML_PARSER_VALIDATE, 1); else #endif /* LIBXML_VALID_ENABLED */ xmlTextReaderSetParserProp(reader, XML_PARSER_LOADDTD, 1); #ifdef LIBXML_SCHEMAS_ENABLED if (relaxng != NULL) { if ((timing) && (!repeat)) { startTimer(); } ret = xmlTextReaderRelaxNGValidate(reader, relaxng); if (ret < 0) { xmlGenericError(xmlGenericErrorContext, "Relax-NG schema %s failed to compile\n", relaxng); progresult = XMLLINT_ERR_SCHEMACOMP; relaxng = NULL; } if ((timing) && (!repeat)) { endTimer("Compiling the schemas"); } } if (schema != NULL) { if ((timing) && (!repeat)) { startTimer(); } ret = xmlTextReaderSchemaValidate(reader, schema); if (ret < 0) { xmlGenericError(xmlGenericErrorContext, "XSD schema %s failed to compile\n", schema); progresult = XMLLINT_ERR_SCHEMACOMP; schema = NULL; } if ((timing) && (!repeat)) { endTimer("Compiling the schemas"); } } #endif /* * Process all nodes in sequence */ if ((timing) && (!repeat)) { startTimer(); } ret = xmlTextReaderRead(reader); while (ret == 1) { if ((debug) #ifdef LIBXML_PATTERN_ENABLED || (patternc) #endif ) processNode(reader); ret = xmlTextReaderRead(reader); } if ((timing) && (!repeat)) { #ifdef LIBXML_SCHEMAS_ENABLED if (relaxng != NULL) endTimer("Parsing and validating"); else #endif #ifdef LIBXML_VALID_ENABLED if (valid) endTimer("Parsing and validating"); else #endif endTimer("Parsing"); } #ifdef LIBXML_VALID_ENABLED if (valid) { if (xmlTextReaderIsValid(reader) != 1) { xmlGenericError(xmlGenericErrorContext, "Document %s does not validate\n", filename); progresult = XMLLINT_ERR_VALID; } } #endif /* LIBXML_VALID_ENABLED */ #ifdef LIBXML_SCHEMAS_ENABLED if ((relaxng != NULL) || (schema != NULL)) { if (xmlTextReaderIsValid(reader) != 1) { fprintf(stderr, "%s fails to validate\n", filename); progresult = XMLLINT_ERR_VALID; } else { fprintf(stderr, "%s validates\n", filename); } } #endif /* * Done, cleanup and status */ xmlFreeTextReader(reader); if (ret != 0) { fprintf(stderr, "%s : failed to parse\n", filename); progresult = XMLLINT_ERR_UNCLASS; } } else { fprintf(stderr, "Unable to open %s\n", filename); progresult = XMLLINT_ERR_UNCLASS; } #ifdef LIBXML_PATTERN_ENABLED if (patstream != NULL) { xmlFreeStreamCtxt(patstream); patstream = NULL; } #endif #ifdef HAVE_SYS_MMAN_H if (memory) { xmlFreeParserInputBuffer(input); munmap((char *) base, info.st_size); close(fd); } #endif } static void walkDoc(xmlDocPtr doc) { xmlTextReaderPtr reader; int ret; #ifdef LIBXML_PATTERN_ENABLED xmlNodePtr root; const xmlChar *namespaces[22]; int i; xmlNsPtr ns; root = xmlDocGetRootElement(doc); for (ns = root->nsDef, i = 0;ns != NULL && i < 20;ns=ns->next) { namespaces[i++] = ns->href; namespaces[i++] = ns->prefix; } namespaces[i++] = NULL; namespaces[i] = NULL; if (pattern != NULL) { patternc = xmlPatterncompile((const xmlChar *) pattern, doc->dict, 0, &namespaces[0]); if (patternc == NULL) { xmlGenericError(xmlGenericErrorContext, "Pattern %s failed to compile\n", pattern); progresult = XMLLINT_ERR_SCHEMAPAT; pattern = NULL; } } if (patternc != NULL) { patstream = xmlPatternGetStreamCtxt(patternc); if (patstream != NULL) { ret = xmlStreamPush(patstream, NULL, NULL); if (ret < 0) { fprintf(stderr, "xmlStreamPush() failure\n"); xmlFreeStreamCtxt(patstream); patstream = NULL; } } } #endif /* LIBXML_PATTERN_ENABLED */ reader = xmlReaderWalker(doc); if (reader != NULL) { if ((timing) && (!repeat)) { startTimer(); } ret = xmlTextReaderRead(reader); while (ret == 1) { if ((debug) #ifdef LIBXML_PATTERN_ENABLED || (patternc) #endif ) processNode(reader); ret = xmlTextReaderRead(reader); } if ((timing) && (!repeat)) { endTimer("walking through the doc"); } xmlFreeTextReader(reader); if (ret != 0) { fprintf(stderr, "failed to walk through the doc\n"); progresult = XMLLINT_ERR_UNCLASS; } } else { fprintf(stderr, "Failed to crate a reader from the document\n"); progresult = XMLLINT_ERR_UNCLASS; } #ifdef LIBXML_PATTERN_ENABLED if (patstream != NULL) { xmlFreeStreamCtxt(patstream); patstream = NULL; } #endif } #endif /* LIBXML_READER_ENABLED */ #ifdef LIBXML_XPATH_ENABLED /************************************************************************ * * * XPath Query * * * ************************************************************************/ static void doXPathDump(xmlXPathObjectPtr cur) { switch(cur->type) { case XPATH_NODESET: { int i; xmlNodePtr node; #ifdef LIBXML_OUTPUT_ENABLED xmlSaveCtxtPtr ctxt; if (cur->nodesetval->nodeNr <= 0) { fprintf(stderr, "XPath set is empty\n"); progresult = XMLLINT_ERR_XPATH; break; } ctxt = xmlSaveToFd(1, NULL, 0); if (ctxt == NULL) { fprintf(stderr, "Out of memory for XPath\n"); progresult = XMLLINT_ERR_MEM; return; } for (i = 0;i < cur->nodesetval->nodeNr;i++) { node = cur->nodesetval->nodeTab[i]; xmlSaveTree(ctxt, node); } xmlSaveClose(ctxt); #else printf("xpath returned %d nodes\n", cur->nodesetval->nodeNr); #endif break; } case XPATH_BOOLEAN: if (cur->boolval) printf("true"); else printf("false"); break; case XPATH_NUMBER: switch (xmlXPathIsInf(cur->floatval)) { case 1: printf("Infinity"); break; case -1: printf("-Infinity"); break; default: if (xmlXPathIsNaN(cur->floatval)) { printf("NaN"); } else { printf("%0g", cur->floatval); } } break; case XPATH_STRING: printf("%s", (const char *) cur->stringval); break; case XPATH_UNDEFINED: fprintf(stderr, "XPath Object is uninitialized\n"); progresult = XMLLINT_ERR_XPATH; break; default: fprintf(stderr, "XPath object of unexpected type\n"); progresult = XMLLINT_ERR_XPATH; break; } } static void doXPathQuery(xmlDocPtr doc, const char *query) { xmlXPathContextPtr ctxt; xmlXPathObjectPtr res; ctxt = xmlXPathNewContext(doc); if (ctxt == NULL) { fprintf(stderr, "Out of memory for XPath\n"); progresult = XMLLINT_ERR_MEM; return; } ctxt->node = xmlDocGetRootElement(doc); res = xmlXPathEval(BAD_CAST query, ctxt); xmlXPathFreeContext(ctxt); if (res == NULL) { fprintf(stderr, "XPath evaluation failure\n"); progresult = XMLLINT_ERR_XPATH; return; } doXPathDump(res); xmlXPathFreeObject(res); } #endif /* LIBXML_XPATH_ENABLED */ /************************************************************************ * * * Tree Test processing * * * ************************************************************************/ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { xmlDocPtr doc = NULL; #ifdef LIBXML_TREE_ENABLED xmlDocPtr tmp; #endif /* LIBXML_TREE_ENABLED */ if ((timing) && (!repeat)) startTimer(); #ifdef LIBXML_TREE_ENABLED if (filename == NULL) { if (generate) { xmlNodePtr n; doc = xmlNewDoc(BAD_CAST "1.0"); n = xmlNewDocNode(doc, NULL, BAD_CAST "info", NULL); xmlNodeSetContent(n, BAD_CAST "abc"); xmlDocSetRootElement(doc, n); } } #endif /* LIBXML_TREE_ENABLED */ #ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_PUSH_ENABLED else if ((html) && (push)) { FILE *f; #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) f = fopen(filename, "rb"); #else f = fopen(filename, "r"); #endif if (f != NULL) { int res, size = 3; char chars[4096]; htmlParserCtxtPtr ctxt; /* if (repeat) */ size = 4096; res = fread(chars, 1, 4, f); if (res > 0) { ctxt = htmlCreatePushParserCtxt(NULL, NULL, chars, res, filename, XML_CHAR_ENCODING_NONE); while ((res = fread(chars, 1, size, f)) > 0) { htmlParseChunk(ctxt, chars, res, 0); } htmlParseChunk(ctxt, chars, 0, 1); doc = ctxt->myDoc; htmlFreeParserCtxt(ctxt); } fclose(f); } } #endif /* LIBXML_PUSH_ENABLED */ #ifdef HAVE_SYS_MMAN_H else if ((html) && (memory)) { int fd; struct stat info; const char *base; if (stat(filename, &info) < 0) return; if ((fd = open(filename, O_RDONLY)) < 0) return; base = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0) ; if (base == (void *) MAP_FAILED) return; doc = htmlReadMemory((char *) base, info.st_size, filename, NULL, options); munmap((char *) base, info.st_size); close(fd); } #endif else if (html) { doc = htmlReadFile(filename, NULL, options); } #endif /* LIBXML_HTML_ENABLED */ else { #ifdef LIBXML_PUSH_ENABLED /* * build an XML tree from a string; */ if (push) { FILE *f; /* '-' Usually means stdin - */ if ((filename[0] == '-') && (filename[1] == 0)) { f = stdin; } else { #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) f = fopen(filename, "rb"); #else f = fopen(filename, "r"); #endif } if (f != NULL) { int ret; int res, size = 1024; char chars[1024]; xmlParserCtxtPtr ctxt; /* if (repeat) size = 1024; */ res = fread(chars, 1, 4, f); if (res > 0) { ctxt = xmlCreatePushParserCtxt(NULL, NULL, chars, res, filename); xmlCtxtUseOptions(ctxt, options); while ((res = fread(chars, 1, size, f)) > 0) { xmlParseChunk(ctxt, chars, res, 0); } xmlParseChunk(ctxt, chars, 0, 1); doc = ctxt->myDoc; ret = ctxt->wellFormed; xmlFreeParserCtxt(ctxt); if (!ret) { xmlFreeDoc(doc); doc = NULL; } } if (f != stdin) fclose(f); } } else #endif /* LIBXML_PUSH_ENABLED */ if (testIO) { if ((filename[0] == '-') && (filename[1] == 0)) { doc = xmlReadFd(0, NULL, NULL, options); } else { FILE *f; #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) f = fopen(filename, "rb"); #else f = fopen(filename, "r"); #endif if (f != NULL) { if (rectxt == NULL) doc = xmlReadIO((xmlInputReadCallback) myRead, (xmlInputCloseCallback) myClose, f, filename, NULL, options); else doc = xmlCtxtReadIO(rectxt, (xmlInputReadCallback) myRead, (xmlInputCloseCallback) myClose, f, filename, NULL, options); } else doc = NULL; } } else if (htmlout) { xmlParserCtxtPtr ctxt; if (rectxt == NULL) ctxt = xmlNewParserCtxt(); else ctxt = rectxt; if (ctxt == NULL) { doc = NULL; } else { ctxt->sax->error = xmlHTMLError; ctxt->sax->warning = xmlHTMLWarning; ctxt->vctxt.error = xmlHTMLValidityError; ctxt->vctxt.warning = xmlHTMLValidityWarning; doc = xmlCtxtReadFile(ctxt, filename, NULL, options); if (rectxt == NULL) xmlFreeParserCtxt(ctxt); } #ifdef HAVE_SYS_MMAN_H } else if (memory) { int fd; struct stat info; const char *base; if (stat(filename, &info) < 0) return; if ((fd = open(filename, O_RDONLY)) < 0) return; base = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0) ; if (base == (void *) MAP_FAILED) return; if (rectxt == NULL) doc = xmlReadMemory((char *) base, info.st_size, filename, NULL, options); else doc = xmlCtxtReadMemory(rectxt, (char *) base, info.st_size, filename, NULL, options); munmap((char *) base, info.st_size); close(fd); #endif #ifdef LIBXML_VALID_ENABLED } else if (valid) { xmlParserCtxtPtr ctxt = NULL; if (rectxt == NULL) ctxt = xmlNewParserCtxt(); else ctxt = rectxt; if (ctxt == NULL) { doc = NULL; } else { doc = xmlCtxtReadFile(ctxt, filename, NULL, options); if (ctxt->valid == 0) progresult = XMLLINT_ERR_RDFILE; if (rectxt == NULL) xmlFreeParserCtxt(ctxt); } #endif /* LIBXML_VALID_ENABLED */ } else { if (rectxt != NULL) doc = xmlCtxtReadFile(rectxt, filename, NULL, options); else { #ifdef LIBXML_SAX1_ENABLED if (sax1) doc = xmlParseFile(filename); else #endif /* LIBXML_SAX1_ENABLED */ doc = xmlReadFile(filename, NULL, options); } } } /* * If we don't have a document we might as well give up. Do we * want an error message here? */ if (doc == NULL) { progresult = XMLLINT_ERR_UNCLASS; return; } if ((timing) && (!repeat)) { endTimer("Parsing"); } /* * Remove DOCTYPE nodes */ if (dropdtd) { xmlDtdPtr dtd; dtd = xmlGetIntSubset(doc); if (dtd != NULL) { xmlUnlinkNode((xmlNodePtr)dtd); xmlFreeDtd(dtd); } } #ifdef LIBXML_XINCLUDE_ENABLED if (xinclude) { if ((timing) && (!repeat)) { startTimer(); } if (xmlXIncludeProcessFlags(doc, options) < 0) progresult = XMLLINT_ERR_UNCLASS; if ((timing) && (!repeat)) { endTimer("Xinclude processing"); } } #endif #ifdef LIBXML_XPATH_ENABLED if (xpathquery != NULL) { doXPathQuery(doc, xpathquery); } #endif #ifdef LIBXML_DEBUG_ENABLED #ifdef LIBXML_XPATH_ENABLED /* * shell interaction */ if (shell) { xmlXPathOrderDocElems(doc); xmlShell(doc, filename, xmlShellReadline, stdout); } #endif #endif #ifdef LIBXML_TREE_ENABLED /* * test intermediate copy if needed. */ if (copy) { tmp = doc; if (timing) { startTimer(); } doc = xmlCopyDoc(doc, 1); if (timing) { endTimer("Copying"); } if (timing) { startTimer(); } xmlFreeDoc(tmp); if (timing) { endTimer("Freeing original"); } } #endif /* LIBXML_TREE_ENABLED */ #ifdef LIBXML_VALID_ENABLED if ((insert) && (!html)) { const xmlChar* list[256]; int nb, i; xmlNodePtr node; if (doc->children != NULL) { node = doc->children; while ((node != NULL) && (node->last == NULL)) node = node->next; if (node != NULL) { nb = xmlValidGetValidElements(node->last, NULL, list, 256); if (nb < 0) { fprintf(stderr, "could not get valid list of elements\n"); } else if (nb == 0) { fprintf(stderr, "No element can be inserted under root\n"); } else { fprintf(stderr, "%d element types can be inserted under root:\n", nb); for (i = 0;i < nb;i++) { fprintf(stderr, "%s\n", (char *) list[i]); } } } } }else #endif /* LIBXML_VALID_ENABLED */ #ifdef LIBXML_READER_ENABLED if (walker) { walkDoc(doc); } #endif /* LIBXML_READER_ENABLED */ #ifdef LIBXML_OUTPUT_ENABLED if (noout == 0) { int ret; /* * print it. */ #ifdef LIBXML_DEBUG_ENABLED if (!debug) { #endif if ((timing) && (!repeat)) { startTimer(); } #ifdef LIBXML_HTML_ENABLED if ((html) && (!xmlout)) { if (compress) { htmlSaveFile(output ? output : "-", doc); } else if (encoding != NULL) { if ( format ) { htmlSaveFileFormat(output ? output : "-", doc, encoding, 1); } else { htmlSaveFileFormat(output ? output : "-", doc, encoding, 0); } } else if (format) { htmlSaveFileFormat(output ? output : "-", doc, NULL, 1); } else { FILE *out; if (output == NULL) out = stdout; else { out = fopen(output,"wb"); } if (out != NULL) { if (htmlDocDump(out, doc) < 0) progresult = XMLLINT_ERR_OUT; if (output != NULL) fclose(out); } else { fprintf(stderr, "failed to open %s\n", output); progresult = XMLLINT_ERR_OUT; } } if ((timing) && (!repeat)) { endTimer("Saving"); } } else #endif #ifdef LIBXML_C14N_ENABLED if (canonical) { xmlChar *result = NULL; int size; size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_1_0, NULL, 1, &result); if (size >= 0) { write(1, result, size); xmlFree(result); } else { fprintf(stderr, "Failed to canonicalize\n"); progresult = XMLLINT_ERR_OUT; } } else if (canonical) { xmlChar *result = NULL; int size; size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_1_1, NULL, 1, &result); if (size >= 0) { write(1, result, size); xmlFree(result); } else { fprintf(stderr, "Failed to canonicalize\n"); progresult = XMLLINT_ERR_OUT; } } else if (exc_canonical) { xmlChar *result = NULL; int size; size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_EXCLUSIVE_1_0, NULL, 1, &result); if (size >= 0) { write(1, result, size); xmlFree(result); } else { fprintf(stderr, "Failed to canonicalize\n"); progresult = XMLLINT_ERR_OUT; } } else #endif #ifdef HAVE_SYS_MMAN_H if (memory) { xmlChar *result; int len; if (encoding != NULL) { if ( format ) { xmlDocDumpFormatMemoryEnc(doc, &result, &len, encoding, 1); } else { xmlDocDumpMemoryEnc(doc, &result, &len, encoding); } } else { if (format) xmlDocDumpFormatMemory(doc, &result, &len, 1); else xmlDocDumpMemory(doc, &result, &len); } if (result == NULL) { fprintf(stderr, "Failed to save\n"); progresult = XMLLINT_ERR_OUT; } else { write(1, result, len); xmlFree(result); } } else #endif /* HAVE_SYS_MMAN_H */ if (compress) { xmlSaveFile(output ? output : "-", doc); } else if (oldout) { if (encoding != NULL) { if ( format ) { ret = xmlSaveFormatFileEnc(output ? output : "-", doc, encoding, 1); } else { ret = xmlSaveFileEnc(output ? output : "-", doc, encoding); } if (ret < 0) { fprintf(stderr, "failed save to %s\n", output ? output : "-"); progresult = XMLLINT_ERR_OUT; } } else if (format) { ret = xmlSaveFormatFile(output ? output : "-", doc, 1); if (ret < 0) { fprintf(stderr, "failed save to %s\n", output ? output : "-"); progresult = XMLLINT_ERR_OUT; } } else { FILE *out; if (output == NULL) out = stdout; else { out = fopen(output,"wb"); } if (out != NULL) { if (xmlDocDump(out, doc) < 0) progresult = XMLLINT_ERR_OUT; if (output != NULL) fclose(out); } else { fprintf(stderr, "failed to open %s\n", output); progresult = XMLLINT_ERR_OUT; } } } else { xmlSaveCtxtPtr ctxt; int saveOpts = 0; if (format) saveOpts |= XML_SAVE_FORMAT; #if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED) if (xmlout) saveOpts |= XML_SAVE_AS_XML; #endif if (output == NULL) ctxt = xmlSaveToFd(1, encoding, saveOpts); else ctxt = xmlSaveToFilename(output, encoding, saveOpts); if (ctxt != NULL) { if (xmlSaveDoc(ctxt, doc) < 0) { fprintf(stderr, "failed save to %s\n", output ? output : "-"); progresult = XMLLINT_ERR_OUT; } xmlSaveClose(ctxt); } else { progresult = XMLLINT_ERR_OUT; } } if ((timing) && (!repeat)) { endTimer("Saving"); } #ifdef LIBXML_DEBUG_ENABLED } else { FILE *out; if (output == NULL) out = stdout; else { out = fopen(output,"wb"); } if (out != NULL) { xmlDebugDumpDocument(out, doc); if (output != NULL) fclose(out); } else { fprintf(stderr, "failed to open %s\n", output); progresult = XMLLINT_ERR_OUT; } } #endif } #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef LIBXML_VALID_ENABLED /* * A posteriori validation test */ if ((dtdvalid != NULL) || (dtdvalidfpi != NULL)) { xmlDtdPtr dtd; if ((timing) && (!repeat)) { startTimer(); } if (dtdvalid != NULL) dtd = xmlParseDTD(NULL, (const xmlChar *)dtdvalid); else dtd = xmlParseDTD((const xmlChar *)dtdvalidfpi, NULL); if ((timing) && (!repeat)) { endTimer("Parsing DTD"); } if (dtd == NULL) { if (dtdvalid != NULL) xmlGenericError(xmlGenericErrorContext, "Could not parse DTD %s\n", dtdvalid); else xmlGenericError(xmlGenericErrorContext, "Could not parse DTD %s\n", dtdvalidfpi); progresult = XMLLINT_ERR_DTD; } else { xmlValidCtxtPtr cvp; if ((cvp = xmlNewValidCtxt()) == NULL) { xmlGenericError(xmlGenericErrorContext, "Couldn't allocate validation context\n"); exit(-1); } cvp->userData = (void *) stderr; cvp->error = (xmlValidityErrorFunc) fprintf; cvp->warning = (xmlValidityWarningFunc) fprintf; if ((timing) && (!repeat)) { startTimer(); } if (!xmlValidateDtd(cvp, doc, dtd)) { if (dtdvalid != NULL) xmlGenericError(xmlGenericErrorContext, "Document %s does not validate against %s\n", filename, dtdvalid); else xmlGenericError(xmlGenericErrorContext, "Document %s does not validate against %s\n", filename, dtdvalidfpi); progresult = XMLLINT_ERR_VALID; } if ((timing) && (!repeat)) { endTimer("Validating against DTD"); } xmlFreeValidCtxt(cvp); xmlFreeDtd(dtd); } } else if (postvalid) { xmlValidCtxtPtr cvp; if ((cvp = xmlNewValidCtxt()) == NULL) { xmlGenericError(xmlGenericErrorContext, "Couldn't allocate validation context\n"); exit(-1); } if ((timing) && (!repeat)) { startTimer(); } cvp->userData = (void *) stderr; cvp->error = (xmlValidityErrorFunc) fprintf; cvp->warning = (xmlValidityWarningFunc) fprintf; if (!xmlValidateDocument(cvp, doc)) { xmlGenericError(xmlGenericErrorContext, "Document %s does not validate\n", filename); progresult = XMLLINT_ERR_VALID; } if ((timing) && (!repeat)) { endTimer("Validating"); } xmlFreeValidCtxt(cvp); } #endif /* LIBXML_VALID_ENABLED */ #ifdef LIBXML_SCHEMATRON_ENABLED if (wxschematron != NULL) { xmlSchematronValidCtxtPtr ctxt; int ret; int flag; if ((timing) && (!repeat)) { startTimer(); } if (debug) flag = XML_SCHEMATRON_OUT_XML; else flag = XML_SCHEMATRON_OUT_TEXT; if (noout) flag |= XML_SCHEMATRON_OUT_QUIET; ctxt = xmlSchematronNewValidCtxt(wxschematron, flag); #if 0 xmlSchematronSetValidErrors(ctxt, (xmlSchematronValidityErrorFunc) fprintf, (xmlSchematronValidityWarningFunc) fprintf, stderr); #endif ret = xmlSchematronValidateDoc(ctxt, doc); if (ret == 0) { fprintf(stderr, "%s validates\n", filename); } else if (ret > 0) { fprintf(stderr, "%s fails to validate\n", filename); progresult = XMLLINT_ERR_VALID; } else { fprintf(stderr, "%s validation generated an internal error\n", filename); progresult = XMLLINT_ERR_VALID; } xmlSchematronFreeValidCtxt(ctxt); if ((timing) && (!repeat)) { endTimer("Validating"); } } #endif #ifdef LIBXML_SCHEMAS_ENABLED if (relaxngschemas != NULL) { xmlRelaxNGValidCtxtPtr ctxt; int ret; if ((timing) && (!repeat)) { startTimer(); } ctxt = xmlRelaxNGNewValidCtxt(relaxngschemas); xmlRelaxNGSetValidErrors(ctxt, (xmlRelaxNGValidityErrorFunc) fprintf, (xmlRelaxNGValidityWarningFunc) fprintf, stderr); ret = xmlRelaxNGValidateDoc(ctxt, doc); if (ret == 0) { fprintf(stderr, "%s validates\n", filename); } else if (ret > 0) { fprintf(stderr, "%s fails to validate\n", filename); progresult = XMLLINT_ERR_VALID; } else { fprintf(stderr, "%s validation generated an internal error\n", filename); progresult = XMLLINT_ERR_VALID; } xmlRelaxNGFreeValidCtxt(ctxt); if ((timing) && (!repeat)) { endTimer("Validating"); } } else if (wxschemas != NULL) { xmlSchemaValidCtxtPtr ctxt; int ret; if ((timing) && (!repeat)) { startTimer(); } ctxt = xmlSchemaNewValidCtxt(wxschemas); xmlSchemaSetValidErrors(ctxt, (xmlSchemaValidityErrorFunc) fprintf, (xmlSchemaValidityWarningFunc) fprintf, stderr); ret = xmlSchemaValidateDoc(ctxt, doc); if (ret == 0) { fprintf(stderr, "%s validates\n", filename); } else if (ret > 0) { fprintf(stderr, "%s fails to validate\n", filename); progresult = XMLLINT_ERR_VALID; } else { fprintf(stderr, "%s validation generated an internal error\n", filename); progresult = XMLLINT_ERR_VALID; } xmlSchemaFreeValidCtxt(ctxt); if ((timing) && (!repeat)) { endTimer("Validating"); } } #endif #ifdef LIBXML_DEBUG_ENABLED #if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED) if ((debugent) && (!html)) xmlDebugDumpEntities(stderr, doc); #endif #endif /* * free it. */ if ((timing) && (!repeat)) { startTimer(); } xmlFreeDoc(doc); if ((timing) && (!repeat)) { endTimer("Freeing"); } } /************************************************************************ * * * Usage and Main * * * ************************************************************************/ static void showVersion(const char *name) { fprintf(stderr, "%s: using libxml version %s\n", name, xmlParserVersion); fprintf(stderr, " compiled with: "); if (xmlHasFeature(XML_WITH_THREAD)) fprintf(stderr, "Threads "); if (xmlHasFeature(XML_WITH_TREE)) fprintf(stderr, "Tree "); if (xmlHasFeature(XML_WITH_OUTPUT)) fprintf(stderr, "Output "); if (xmlHasFeature(XML_WITH_PUSH)) fprintf(stderr, "Push "); if (xmlHasFeature(XML_WITH_READER)) fprintf(stderr, "Reader "); if (xmlHasFeature(XML_WITH_PATTERN)) fprintf(stderr, "Patterns "); if (xmlHasFeature(XML_WITH_WRITER)) fprintf(stderr, "Writer "); if (xmlHasFeature(XML_WITH_SAX1)) fprintf(stderr, "SAXv1 "); if (xmlHasFeature(XML_WITH_FTP)) fprintf(stderr, "FTP "); if (xmlHasFeature(XML_WITH_HTTP)) fprintf(stderr, "HTTP "); if (xmlHasFeature(XML_WITH_VALID)) fprintf(stderr, "DTDValid "); if (xmlHasFeature(XML_WITH_HTML)) fprintf(stderr, "HTML "); if (xmlHasFeature(XML_WITH_LEGACY)) fprintf(stderr, "Legacy "); if (xmlHasFeature(XML_WITH_C14N)) fprintf(stderr, "C14N "); if (xmlHasFeature(XML_WITH_CATALOG)) fprintf(stderr, "Catalog "); if (xmlHasFeature(XML_WITH_XPATH)) fprintf(stderr, "XPath "); if (xmlHasFeature(XML_WITH_XPTR)) fprintf(stderr, "XPointer "); if (xmlHasFeature(XML_WITH_XINCLUDE)) fprintf(stderr, "XInclude "); if (xmlHasFeature(XML_WITH_ICONV)) fprintf(stderr, "Iconv "); if (xmlHasFeature(XML_WITH_ISO8859X)) fprintf(stderr, "ISO8859X "); if (xmlHasFeature(XML_WITH_UNICODE)) fprintf(stderr, "Unicode "); if (xmlHasFeature(XML_WITH_REGEXP)) fprintf(stderr, "Regexps "); if (xmlHasFeature(XML_WITH_AUTOMATA)) fprintf(stderr, "Automata "); if (xmlHasFeature(XML_WITH_EXPR)) fprintf(stderr, "Expr "); if (xmlHasFeature(XML_WITH_SCHEMAS)) fprintf(stderr, "Schemas "); if (xmlHasFeature(XML_WITH_SCHEMATRON)) fprintf(stderr, "Schematron "); if (xmlHasFeature(XML_WITH_MODULES)) fprintf(stderr, "Modules "); if (xmlHasFeature(XML_WITH_DEBUG)) fprintf(stderr, "Debug "); if (xmlHasFeature(XML_WITH_DEBUG_MEM)) fprintf(stderr, "MemDebug "); if (xmlHasFeature(XML_WITH_DEBUG_RUN)) fprintf(stderr, "RunDebug "); if (xmlHasFeature(XML_WITH_ZLIB)) fprintf(stderr, "Zlib "); fprintf(stderr, "\n"); } static void usage(const char *name) { printf("Usage : %s [options] XMLfiles ...\n", name); #ifdef LIBXML_OUTPUT_ENABLED printf("\tParse the XML files and output the result of the parsing\n"); #else printf("\tParse the XML files\n"); #endif /* LIBXML_OUTPUT_ENABLED */ printf("\t--version : display the version of the XML library used\n"); #ifdef LIBXML_DEBUG_ENABLED printf("\t--debug : dump a debug tree of the in-memory document\n"); printf("\t--shell : run a navigating shell\n"); printf("\t--debugent : debug the entities defined in the document\n"); #else #ifdef LIBXML_READER_ENABLED printf("\t--debug : dump the nodes content when using --stream\n"); #endif /* LIBXML_READER_ENABLED */ #endif #ifdef LIBXML_TREE_ENABLED printf("\t--copy : used to test the internal copy implementation\n"); #endif /* LIBXML_TREE_ENABLED */ printf("\t--recover : output what was parsable on broken XML documents\n"); printf("\t--huge : remove any internal arbitrary parser limits\n"); printf("\t--noent : substitute entity references by their value\n"); printf("\t--noout : don't output the result tree\n"); printf("\t--path 'paths': provide a set of paths for resources\n"); printf("\t--load-trace : print trace of all external entites loaded\n"); printf("\t--nonet : refuse to fetch DTDs or entities over network\n"); printf("\t--nocompact : do not generate compact text nodes\n"); printf("\t--htmlout : output results as HTML\n"); printf("\t--nowrap : do not put HTML doc wrapper\n"); #ifdef LIBXML_VALID_ENABLED printf("\t--valid : validate the document in addition to std well-formed check\n"); printf("\t--postvalid : do a posteriori validation, i.e after parsing\n"); printf("\t--dtdvalid URL : do a posteriori validation against a given DTD\n"); printf("\t--dtdvalidfpi FPI : same but name the DTD with a Public Identifier\n"); #endif /* LIBXML_VALID_ENABLED */ printf("\t--timing : print some timings\n"); printf("\t--output file or -o file: save to a given file\n"); printf("\t--repeat : repeat 100 times, for timing or profiling\n"); printf("\t--insert : ad-hoc test for valid insertions\n"); #ifdef LIBXML_OUTPUT_ENABLED #ifdef HAVE_ZLIB_H printf("\t--compress : turn on gzip compression of output\n"); #endif #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef LIBXML_HTML_ENABLED printf("\t--html : use the HTML parser\n"); printf("\t--xmlout : force to use the XML serializer when using --html\n"); #endif #ifdef LIBXML_PUSH_ENABLED printf("\t--push : use the push mode of the parser\n"); #endif /* LIBXML_PUSH_ENABLED */ #ifdef HAVE_SYS_MMAN_H printf("\t--memory : parse from memory\n"); #endif printf("\t--maxmem nbbytes : limits memory allocation to nbbytes bytes\n"); printf("\t--nowarning : do not emit warnings from parser/validator\n"); printf("\t--noblanks : drop (ignorable?) blanks spaces\n"); printf("\t--nocdata : replace cdata section with text nodes\n"); #ifdef LIBXML_OUTPUT_ENABLED printf("\t--format : reformat/reindent the input\n"); printf("\t--encode encoding : output in the given encoding\n"); printf("\t--dropdtd : remove the DOCTYPE of the input docs\n"); #endif /* LIBXML_OUTPUT_ENABLED */ printf("\t--c14n : save in W3C canonical format v1.0 (with comments)\n"); printf("\t--c14n11 : save in W3C canonical format v1.1 (with comments)\n"); printf("\t--exc-c14n : save in W3C exclusive canonical format (with comments)\n"); #ifdef LIBXML_C14N_ENABLED #endif /* LIBXML_C14N_ENABLED */ printf("\t--nsclean : remove redundant namespace declarations\n"); printf("\t--testIO : test user I/O support\n"); #ifdef LIBXML_CATALOG_ENABLED printf("\t--catalogs : use SGML catalogs from $SGML_CATALOG_FILES\n"); printf("\t otherwise XML Catalogs starting from \n"); printf("\t %s are activated by default\n", XML_XML_DEFAULT_CATALOG); printf("\t--nocatalogs: deactivate all catalogs\n"); #endif printf("\t--auto : generate a small doc on the fly\n"); #ifdef LIBXML_XINCLUDE_ENABLED printf("\t--xinclude : do XInclude processing\n"); printf("\t--noxincludenode : same but do not generate XInclude nodes\n"); printf("\t--nofixup-base-uris : do not fixup xml:base uris\n"); #endif printf("\t--loaddtd : fetch external DTD\n"); printf("\t--dtdattr : loaddtd + populate the tree with inherited attributes \n"); #ifdef LIBXML_READER_ENABLED printf("\t--stream : use the streaming interface to process very large files\n"); printf("\t--walker : create a reader and walk though the resulting doc\n"); #endif /* LIBXML_READER_ENABLED */ #ifdef LIBXML_PATTERN_ENABLED printf("\t--pattern pattern_value : test the pattern support\n"); #endif printf("\t--chkregister : verify the node registration code\n"); #ifdef LIBXML_SCHEMAS_ENABLED printf("\t--relaxng schema : do RelaxNG validation against the schema\n"); printf("\t--schema schema : do validation against the WXS schema\n"); #endif #ifdef LIBXML_SCHEMATRON_ENABLED printf("\t--schematron schema : do validation against a schematron\n"); #endif #ifdef LIBXML_SAX1_ENABLED printf("\t--sax1: use the old SAX1 interfaces for processing\n"); #endif printf("\t--sax: do not build a tree but work just at the SAX level\n"); printf("\t--oldxml10: use XML-1.0 parsing rules before the 5th edition\n"); #ifdef LIBXML_XPATH_ENABLED printf("\t--xpath expr: evaluate the XPath expression, inply --noout\n"); #endif printf("\nLibxml project home page: http://xmlsoft.org/\n"); printf("To report bugs or get some help check: http://xmlsoft.org/bugs.html\n"); } static void registerNode(xmlNodePtr node) { node->_private = malloc(sizeof(long)); *(long*)node->_private = (long) 0x81726354; nbregister++; } static void deregisterNode(xmlNodePtr node) { assert(node->_private != NULL); assert(*(long*)node->_private == (long) 0x81726354); free(node->_private); nbregister--; } int main(int argc, char **argv) { int i, acount; int files = 0; int version = 0; const char* indent; if (argc <= 1) { usage(argv[0]); return(1); } LIBXML_TEST_VERSION for (i = 1; i < argc ; i++) { if (!strcmp(argv[i], "-")) break; if (argv[i][0] != '-') continue; if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) debug++; else #ifdef LIBXML_DEBUG_ENABLED if ((!strcmp(argv[i], "-shell")) || (!strcmp(argv[i], "--shell"))) { shell++; noout = 1; } else #endif #ifdef LIBXML_TREE_ENABLED if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy"))) copy++; else #endif /* LIBXML_TREE_ENABLED */ if ((!strcmp(argv[i], "-recover")) || (!strcmp(argv[i], "--recover"))) { recovery++; options |= XML_PARSE_RECOVER; } else if ((!strcmp(argv[i], "-huge")) || (!strcmp(argv[i], "--huge"))) { options |= XML_PARSE_HUGE; } else if ((!strcmp(argv[i], "-noent")) || (!strcmp(argv[i], "--noent"))) { noent++; options |= XML_PARSE_NOENT; } else if ((!strcmp(argv[i], "-nsclean")) || (!strcmp(argv[i], "--nsclean"))) { options |= XML_PARSE_NSCLEAN; } else if ((!strcmp(argv[i], "-nocdata")) || (!strcmp(argv[i], "--nocdata"))) { options |= XML_PARSE_NOCDATA; } else if ((!strcmp(argv[i], "-nodict")) || (!strcmp(argv[i], "--nodict"))) { options |= XML_PARSE_NODICT; } else if ((!strcmp(argv[i], "-version")) || (!strcmp(argv[i], "--version"))) { showVersion(argv[0]); version = 1; } else if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout"))) noout++; #ifdef LIBXML_OUTPUT_ENABLED else if ((!strcmp(argv[i], "-o")) || (!strcmp(argv[i], "-output")) || (!strcmp(argv[i], "--output"))) { i++; output = argv[i]; } #endif /* LIBXML_OUTPUT_ENABLED */ else if ((!strcmp(argv[i], "-htmlout")) || (!strcmp(argv[i], "--htmlout"))) htmlout++; else if ((!strcmp(argv[i], "-nowrap")) || (!strcmp(argv[i], "--nowrap"))) nowrap++; #ifdef LIBXML_HTML_ENABLED else if ((!strcmp(argv[i], "-html")) || (!strcmp(argv[i], "--html"))) { html++; } else if ((!strcmp(argv[i], "-xmlout")) || (!strcmp(argv[i], "--xmlout"))) { xmlout++; } #endif /* LIBXML_HTML_ENABLED */ else if ((!strcmp(argv[i], "-loaddtd")) || (!strcmp(argv[i], "--loaddtd"))) { loaddtd++; options |= XML_PARSE_DTDLOAD; } else if ((!strcmp(argv[i], "-dtdattr")) || (!strcmp(argv[i], "--dtdattr"))) { loaddtd++; dtdattrs++; options |= XML_PARSE_DTDATTR; } #ifdef LIBXML_VALID_ENABLED else if ((!strcmp(argv[i], "-valid")) || (!strcmp(argv[i], "--valid"))) { valid++; options |= XML_PARSE_DTDVALID; } else if ((!strcmp(argv[i], "-postvalid")) || (!strcmp(argv[i], "--postvalid"))) { postvalid++; loaddtd++; options |= XML_PARSE_DTDLOAD; } else if ((!strcmp(argv[i], "-dtdvalid")) || (!strcmp(argv[i], "--dtdvalid"))) { i++; dtdvalid = argv[i]; loaddtd++; options |= XML_PARSE_DTDLOAD; } else if ((!strcmp(argv[i], "-dtdvalidfpi")) || (!strcmp(argv[i], "--dtdvalidfpi"))) { i++; dtdvalidfpi = argv[i]; loaddtd++; options |= XML_PARSE_DTDLOAD; } #endif /* LIBXML_VALID_ENABLED */ else if ((!strcmp(argv[i], "-dropdtd")) || (!strcmp(argv[i], "--dropdtd"))) dropdtd++; else if ((!strcmp(argv[i], "-insert")) || (!strcmp(argv[i], "--insert"))) insert++; else if ((!strcmp(argv[i], "-timing")) || (!strcmp(argv[i], "--timing"))) timing++; else if ((!strcmp(argv[i], "-auto")) || (!strcmp(argv[i], "--auto"))) generate++; else if ((!strcmp(argv[i], "-repeat")) || (!strcmp(argv[i], "--repeat"))) { if (repeat) repeat *= 10; else repeat = 100; } #ifdef LIBXML_PUSH_ENABLED else if ((!strcmp(argv[i], "-push")) || (!strcmp(argv[i], "--push"))) push++; #endif /* LIBXML_PUSH_ENABLED */ #ifdef HAVE_SYS_MMAN_H else if ((!strcmp(argv[i], "-memory")) || (!strcmp(argv[i], "--memory"))) memory++; #endif else if ((!strcmp(argv[i], "-testIO")) || (!strcmp(argv[i], "--testIO"))) testIO++; #ifdef LIBXML_XINCLUDE_ENABLED else if ((!strcmp(argv[i], "-xinclude")) || (!strcmp(argv[i], "--xinclude"))) { xinclude++; options |= XML_PARSE_XINCLUDE; } else if ((!strcmp(argv[i], "-noxincludenode")) || (!strcmp(argv[i], "--noxincludenode"))) { xinclude++; options |= XML_PARSE_XINCLUDE; options |= XML_PARSE_NOXINCNODE; } else if ((!strcmp(argv[i], "-nofixup-base-uris")) || (!strcmp(argv[i], "--nofixup-base-uris"))) { xinclude++; options |= XML_PARSE_XINCLUDE; options |= XML_PARSE_NOBASEFIX; } #endif #ifdef LIBXML_OUTPUT_ENABLED #ifdef HAVE_ZLIB_H else if ((!strcmp(argv[i], "-compress")) || (!strcmp(argv[i], "--compress"))) { compress++; xmlSetCompressMode(9); } #endif #endif /* LIBXML_OUTPUT_ENABLED */ else if ((!strcmp(argv[i], "-nowarning")) || (!strcmp(argv[i], "--nowarning"))) { xmlGetWarningsDefaultValue = 0; xmlPedanticParserDefault(0); options |= XML_PARSE_NOWARNING; } else if ((!strcmp(argv[i], "-pedantic")) || (!strcmp(argv[i], "--pedantic"))) { xmlGetWarningsDefaultValue = 1; xmlPedanticParserDefault(1); options |= XML_PARSE_PEDANTIC; } #ifdef LIBXML_DEBUG_ENABLED else if ((!strcmp(argv[i], "-debugent")) || (!strcmp(argv[i], "--debugent"))) { debugent++; xmlParserDebugEntities = 1; } #endif #ifdef LIBXML_C14N_ENABLED else if ((!strcmp(argv[i], "-c14n")) || (!strcmp(argv[i], "--c14n"))) { canonical++; options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD; } else if ((!strcmp(argv[i], "-c14n11")) || (!strcmp(argv[i], "--c14n11"))) { canonical_11++; options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD; } else if ((!strcmp(argv[i], "-exc-c14n")) || (!strcmp(argv[i], "--exc-c14n"))) { exc_canonical++; options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD; } #endif #ifdef LIBXML_CATALOG_ENABLED else if ((!strcmp(argv[i], "-catalogs")) || (!strcmp(argv[i], "--catalogs"))) { catalogs++; } else if ((!strcmp(argv[i], "-nocatalogs")) || (!strcmp(argv[i], "--nocatalogs"))) { nocatalogs++; } #endif else if ((!strcmp(argv[i], "-encode")) || (!strcmp(argv[i], "--encode"))) { i++; encoding = argv[i]; /* * OK it's for testing purposes */ xmlAddEncodingAlias("UTF-8", "DVEnc"); } else if ((!strcmp(argv[i], "-noblanks")) || (!strcmp(argv[i], "--noblanks"))) { noblanks++; xmlKeepBlanksDefault(0); } else if ((!strcmp(argv[i], "-maxmem")) || (!strcmp(argv[i], "--maxmem"))) { i++; if (sscanf(argv[i], "%d", &maxmem) == 1) { xmlMemSetup(myFreeFunc, myMallocFunc, myReallocFunc, myStrdupFunc); } else { maxmem = 0; } } else if ((!strcmp(argv[i], "-format")) || (!strcmp(argv[i], "--format"))) { noblanks++; #ifdef LIBXML_OUTPUT_ENABLED format++; #endif /* LIBXML_OUTPUT_ENABLED */ xmlKeepBlanksDefault(0); } #ifdef LIBXML_READER_ENABLED else if ((!strcmp(argv[i], "-stream")) || (!strcmp(argv[i], "--stream"))) { stream++; } else if ((!strcmp(argv[i], "-walker")) || (!strcmp(argv[i], "--walker"))) { walker++; noout++; } #endif /* LIBXML_READER_ENABLED */ #ifdef LIBXML_SAX1_ENABLED else if ((!strcmp(argv[i], "-sax1")) || (!strcmp(argv[i], "--sax1"))) { sax1++; options |= XML_PARSE_SAX1; } #endif /* LIBXML_SAX1_ENABLED */ else if ((!strcmp(argv[i], "-sax")) || (!strcmp(argv[i], "--sax"))) { sax++; } else if ((!strcmp(argv[i], "-chkregister")) || (!strcmp(argv[i], "--chkregister"))) { chkregister++; #ifdef LIBXML_SCHEMAS_ENABLED } else if ((!strcmp(argv[i], "-relaxng")) || (!strcmp(argv[i], "--relaxng"))) { i++; relaxng = argv[i]; noent++; options |= XML_PARSE_NOENT; } else if ((!strcmp(argv[i], "-schema")) || (!strcmp(argv[i], "--schema"))) { i++; schema = argv[i]; noent++; #endif #ifdef LIBXML_SCHEMATRON_ENABLED } else if ((!strcmp(argv[i], "-schematron")) || (!strcmp(argv[i], "--schematron"))) { i++; schematron = argv[i]; noent++; #endif } else if ((!strcmp(argv[i], "-nonet")) || (!strcmp(argv[i], "--nonet"))) { options |= XML_PARSE_NONET; xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader); } else if ((!strcmp(argv[i], "-nocompact")) || (!strcmp(argv[i], "--nocompact"))) { options &= ~XML_PARSE_COMPACT; } else if ((!strcmp(argv[i], "-load-trace")) || (!strcmp(argv[i], "--load-trace"))) { load_trace++; } else if ((!strcmp(argv[i], "-path")) || (!strcmp(argv[i], "--path"))) { i++; parsePath(BAD_CAST argv[i]); #ifdef LIBXML_PATTERN_ENABLED } else if ((!strcmp(argv[i], "-pattern")) || (!strcmp(argv[i], "--pattern"))) { i++; pattern = argv[i]; #endif #ifdef LIBXML_XPATH_ENABLED } else if ((!strcmp(argv[i], "-xpath")) || (!strcmp(argv[i], "--xpath"))) { i++; noout++; xpathquery = argv[i]; #endif } else if ((!strcmp(argv[i], "-oldxml10")) || (!strcmp(argv[i], "--oldxml10"))) { oldxml10++; options |= XML_PARSE_OLD10; } else { fprintf(stderr, "Unknown option %s\n", argv[i]); usage(argv[0]); return(1); } } #ifdef LIBXML_CATALOG_ENABLED if (nocatalogs == 0) { if (catalogs) { const char *catal; catal = getenv("SGML_CATALOG_FILES"); if (catal != NULL) { xmlLoadCatalogs(catal); } else { fprintf(stderr, "Variable $SGML_CATALOG_FILES not set\n"); } } } #endif #ifdef LIBXML_SAX1_ENABLED if (sax1) xmlSAXDefaultVersion(1); else xmlSAXDefaultVersion(2); #endif /* LIBXML_SAX1_ENABLED */ if (chkregister) { xmlRegisterNodeDefault(registerNode); xmlDeregisterNodeDefault(deregisterNode); } indent = getenv("XMLLINT_INDENT"); if(indent != NULL) { xmlTreeIndentString = indent; } defaultEntityLoader = xmlGetExternalEntityLoader(); xmlSetExternalEntityLoader(xmllintExternalEntityLoader); xmlLineNumbersDefault(1); if (loaddtd != 0) xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS; if (dtdattrs) xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS; if (noent != 0) xmlSubstituteEntitiesDefault(1); #ifdef LIBXML_VALID_ENABLED if (valid != 0) xmlDoValidityCheckingDefaultValue = 1; #endif /* LIBXML_VALID_ENABLED */ if ((htmlout) && (!nowrap)) { xmlGenericError(xmlGenericErrorContext, "\n"); xmlGenericError(xmlGenericErrorContext, "%s output\n", argv[0]); xmlGenericError(xmlGenericErrorContext, "

%s output

\n", argv[0]); } #ifdef LIBXML_SCHEMATRON_ENABLED if ((schematron != NULL) && (sax == 0) #ifdef LIBXML_READER_ENABLED && (stream == 0) #endif /* LIBXML_READER_ENABLED */ ) { xmlSchematronParserCtxtPtr ctxt; /* forces loading the DTDs */ xmlLoadExtDtdDefaultValue |= 1; options |= XML_PARSE_DTDLOAD; if (timing) { startTimer(); } ctxt = xmlSchematronNewParserCtxt(schematron); #if 0 xmlSchematronSetParserErrors(ctxt, (xmlSchematronValidityErrorFunc) fprintf, (xmlSchematronValidityWarningFunc) fprintf, stderr); #endif wxschematron = xmlSchematronParse(ctxt); if (wxschematron == NULL) { xmlGenericError(xmlGenericErrorContext, "Schematron schema %s failed to compile\n", schematron); progresult = XMLLINT_ERR_SCHEMACOMP; schematron = NULL; } xmlSchematronFreeParserCtxt(ctxt); if (timing) { endTimer("Compiling the schemas"); } } #endif #ifdef LIBXML_SCHEMAS_ENABLED if ((relaxng != NULL) && (sax == 0) #ifdef LIBXML_READER_ENABLED && (stream == 0) #endif /* LIBXML_READER_ENABLED */ ) { xmlRelaxNGParserCtxtPtr ctxt; /* forces loading the DTDs */ xmlLoadExtDtdDefaultValue |= 1; options |= XML_PARSE_DTDLOAD; if (timing) { startTimer(); } ctxt = xmlRelaxNGNewParserCtxt(relaxng); xmlRelaxNGSetParserErrors(ctxt, (xmlRelaxNGValidityErrorFunc) fprintf, (xmlRelaxNGValidityWarningFunc) fprintf, stderr); relaxngschemas = xmlRelaxNGParse(ctxt); if (relaxngschemas == NULL) { xmlGenericError(xmlGenericErrorContext, "Relax-NG schema %s failed to compile\n", relaxng); progresult = XMLLINT_ERR_SCHEMACOMP; relaxng = NULL; } xmlRelaxNGFreeParserCtxt(ctxt); if (timing) { endTimer("Compiling the schemas"); } } else if ((schema != NULL) #ifdef LIBXML_READER_ENABLED && (stream == 0) #endif ) { xmlSchemaParserCtxtPtr ctxt; if (timing) { startTimer(); } ctxt = xmlSchemaNewParserCtxt(schema); xmlSchemaSetParserErrors(ctxt, (xmlSchemaValidityErrorFunc) fprintf, (xmlSchemaValidityWarningFunc) fprintf, stderr); wxschemas = xmlSchemaParse(ctxt); if (wxschemas == NULL) { xmlGenericError(xmlGenericErrorContext, "WXS schema %s failed to compile\n", schema); progresult = XMLLINT_ERR_SCHEMACOMP; schema = NULL; } xmlSchemaFreeParserCtxt(ctxt); if (timing) { endTimer("Compiling the schemas"); } } #endif /* LIBXML_SCHEMAS_ENABLED */ #ifdef LIBXML_PATTERN_ENABLED if ((pattern != NULL) #ifdef LIBXML_READER_ENABLED && (walker == 0) #endif ) { patternc = xmlPatterncompile((const xmlChar *) pattern, NULL, 0, NULL); if (patternc == NULL) { xmlGenericError(xmlGenericErrorContext, "Pattern %s failed to compile\n", pattern); progresult = XMLLINT_ERR_SCHEMAPAT; pattern = NULL; } } #endif /* LIBXML_PATTERN_ENABLED */ for (i = 1; i < argc ; i++) { if ((!strcmp(argv[i], "-encode")) || (!strcmp(argv[i], "--encode"))) { i++; continue; } else if ((!strcmp(argv[i], "-o")) || (!strcmp(argv[i], "-output")) || (!strcmp(argv[i], "--output"))) { i++; continue; } #ifdef LIBXML_VALID_ENABLED if ((!strcmp(argv[i], "-dtdvalid")) || (!strcmp(argv[i], "--dtdvalid"))) { i++; continue; } if ((!strcmp(argv[i], "-path")) || (!strcmp(argv[i], "--path"))) { i++; continue; } if ((!strcmp(argv[i], "-dtdvalidfpi")) || (!strcmp(argv[i], "--dtdvalidfpi"))) { i++; continue; } #endif /* LIBXML_VALID_ENABLED */ if ((!strcmp(argv[i], "-relaxng")) || (!strcmp(argv[i], "--relaxng"))) { i++; continue; } if ((!strcmp(argv[i], "-maxmem")) || (!strcmp(argv[i], "--maxmem"))) { i++; continue; } if ((!strcmp(argv[i], "-schema")) || (!strcmp(argv[i], "--schema"))) { i++; continue; } if ((!strcmp(argv[i], "-schematron")) || (!strcmp(argv[i], "--schematron"))) { i++; continue; } #ifdef LIBXML_PATTERN_ENABLED if ((!strcmp(argv[i], "-pattern")) || (!strcmp(argv[i], "--pattern"))) { i++; continue; } #endif #ifdef LIBXML_XPATH_ENABLED if ((!strcmp(argv[i], "-xpath")) || (!strcmp(argv[i], "--xpath"))) { i++; continue; } #endif if ((timing) && (repeat)) startTimer(); /* Remember file names. "-" means stdin. */ if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0)) { if (repeat) { xmlParserCtxtPtr ctxt = NULL; for (acount = 0;acount < repeat;acount++) { #ifdef LIBXML_READER_ENABLED if (stream != 0) { streamFile(argv[i]); } else { #endif /* LIBXML_READER_ENABLED */ if (sax) { testSAX(argv[i]); } else { if (ctxt == NULL) ctxt = xmlNewParserCtxt(); parseAndPrintFile(argv[i], ctxt); } #ifdef LIBXML_READER_ENABLED } #endif /* LIBXML_READER_ENABLED */ } if (ctxt != NULL) xmlFreeParserCtxt(ctxt); } else { nbregister = 0; #ifdef LIBXML_READER_ENABLED if (stream != 0) streamFile(argv[i]); else #endif /* LIBXML_READER_ENABLED */ if (sax) { testSAX(argv[i]); } else { parseAndPrintFile(argv[i], NULL); } if ((chkregister) && (nbregister != 0)) { fprintf(stderr, "Registration count off: %d\n", nbregister); progresult = XMLLINT_ERR_RDREGIS; } } files ++; if ((timing) && (repeat)) { endTimer("%d iterations", repeat); } } } if (generate) parseAndPrintFile(NULL, NULL); if ((htmlout) && (!nowrap)) { xmlGenericError(xmlGenericErrorContext, "\n"); } if ((files == 0) && (!generate) && (version == 0)) { usage(argv[0]); } #ifdef LIBXML_SCHEMATRON_ENABLED if (wxschematron != NULL) xmlSchematronFree(wxschematron); #endif #ifdef LIBXML_SCHEMAS_ENABLED if (relaxngschemas != NULL) xmlRelaxNGFree(relaxngschemas); if (wxschemas != NULL) xmlSchemaFree(wxschemas); xmlRelaxNGCleanupTypes(); #endif #ifdef LIBXML_PATTERN_ENABLED if (patternc != NULL) xmlFreePattern(patternc); #endif xmlCleanupParser(); xmlMemoryDump(); return(progresult); } 0707010002b1fa000081a40000000000000000000000014cb7d88500006be2000000b500010002ffffffffffffffff0000003a00000000root/usr/local/share/doc/libxml2-2.7.7/examples/testSAX.c/* * testSAX.c : a small tester program for parsing using the SAX API. * * See Copyright for the status of this software. * * daniel@veillard.com */ #include "libxml.h" #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_SYS_TIMEB_H #include #endif #ifdef HAVE_TIME_H #include #endif #ifdef LIBXML_SAX1_ENABLED #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #include #include #include /* only for xmlNewInputFromFile() */ #include #include #include static int debug = 0; static int copy = 0; static int recovery = 0; static int push = 0; static int speed = 0; static int noent = 0; static int quiet = 0; static int nonull = 0; static int sax2 = 0; static int repeat = 0; static int callbacks = 0; static int timing = 0; /* * Timing routines. */ /* * Internal timing routines to remove the necessity to have unix-specific * function calls */ #ifndef HAVE_GETTIMEOFDAY #ifdef HAVE_SYS_TIMEB_H #ifdef HAVE_SYS_TIME_H #ifdef HAVE_FTIME static int my_gettimeofday(struct timeval *tvp, void *tzp) { struct timeb timebuffer; ftime(&timebuffer); if (tvp) { tvp->tv_sec = timebuffer.time; tvp->tv_usec = timebuffer.millitm * 1000L; } return (0); } #define HAVE_GETTIMEOFDAY 1 #define gettimeofday my_gettimeofday #endif /* HAVE_FTIME */ #endif /* HAVE_SYS_TIME_H */ #endif /* HAVE_SYS_TIMEB_H */ #endif /* !HAVE_GETTIMEOFDAY */ #if defined(HAVE_GETTIMEOFDAY) static struct timeval begin, end; /* * startTimer: call where you want to start timing */ static void startTimer(void) { gettimeofday(&begin, NULL); } /* * endTimer: call where you want to stop timing and to print out a * message about the timing performed; format is a printf * type argument */ static void XMLCDECL endTimer(const char *fmt, ...) { long msec; va_list ap; gettimeofday(&end, NULL); msec = end.tv_sec - begin.tv_sec; msec *= 1000; msec += (end.tv_usec - begin.tv_usec) / 1000; #ifndef HAVE_STDARG_H #error "endTimer required stdarg functions" #endif va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, " took %ld ms\n", msec); } #elif defined(HAVE_TIME_H) /* * No gettimeofday function, so we have to make do with calling clock. * This is obviously less accurate, but there's little we can do about * that. */ #ifndef CLOCKS_PER_SEC #define CLOCKS_PER_SEC 100 #endif static clock_t begin, end; static void startTimer(void) { begin = clock(); } static void XMLCDECL endTimer(const char *fmt, ...) { long msec; va_list ap; end = clock(); msec = ((end - begin) * 1000) / CLOCKS_PER_SEC; #ifndef HAVE_STDARG_H #error "endTimer required stdarg functions" #endif va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, " took %ld ms\n", msec); } #else /* * We don't have a gettimeofday or time.h, so we just don't do timing */ static void startTimer(void) { /* * Do nothing */ } static void XMLCDECL endTimer(char *format, ...) { /* * We cannot do anything because we don't have a timing function */ #ifdef HAVE_STDARG_H va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); fprintf(stderr, " was not timed\n", msec); #else /* We don't have gettimeofday, time or stdarg.h, what crazy world is * this ?! */ #endif } #endif /* * empty SAX block */ static xmlSAXHandler emptySAXHandlerStruct = { NULL, /* internalSubset */ NULL, /* isStandalone */ NULL, /* hasInternalSubset */ NULL, /* hasExternalSubset */ NULL, /* resolveEntity */ NULL, /* getEntity */ NULL, /* entityDecl */ NULL, /* notationDecl */ NULL, /* attributeDecl */ NULL, /* elementDecl */ NULL, /* unparsedEntityDecl */ NULL, /* setDocumentLocator */ NULL, /* startDocument */ NULL, /* endDocument */ NULL, /* startElement */ NULL, /* endElement */ NULL, /* reference */ NULL, /* characters */ NULL, /* ignorableWhitespace */ NULL, /* processingInstruction */ NULL, /* comment */ NULL, /* xmlParserWarning */ NULL, /* xmlParserError */ NULL, /* xmlParserError */ NULL, /* getParameterEntity */ NULL, /* cdataBlock; */ NULL, /* externalSubset; */ 1, NULL, NULL, /* startElementNs */ NULL, /* endElementNs */ NULL /* xmlStructuredErrorFunc */ }; static xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct; extern xmlSAXHandlerPtr debugSAXHandler; /************************************************************************ * * * Debug Handlers * * * ************************************************************************/ /** * isStandaloneDebug: * @ctxt: An XML parser context * * Is this document tagged standalone ? * * Returns 1 if true */ static int isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return(0); fprintf(stdout, "SAX.isStandalone()\n"); return(0); } /** * hasInternalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an internal subset * * Returns 1 if true */ static int hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return(0); fprintf(stdout, "SAX.hasInternalSubset()\n"); return(0); } /** * hasExternalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an external subset * * Returns 1 if true */ static int hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return(0); fprintf(stdout, "SAX.hasExternalSubset()\n"); return(0); } /** * internalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an internal subset */ static void internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { callbacks++; if (quiet) return; fprintf(stdout, "SAX.internalSubset(%s,", name); if (ExternalID == NULL) fprintf(stdout, " ,"); else fprintf(stdout, " %s,", ExternalID); if (SystemID == NULL) fprintf(stdout, " )\n"); else fprintf(stdout, " %s)\n", SystemID); } /** * externalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an external subset */ static void externalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { callbacks++; if (quiet) return; fprintf(stdout, "SAX.externalSubset(%s,", name); if (ExternalID == NULL) fprintf(stdout, " ,"); else fprintf(stdout, " %s,", ExternalID); if (SystemID == NULL) fprintf(stdout, " )\n"); else fprintf(stdout, " %s)\n", SystemID); } /** * resolveEntityDebug: * @ctxt: An XML parser context * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * Special entity resolver, better left to the parser, it has * more context than the application layer. * The default behaviour is to NOT resolve the entities, in that case * the ENTITY_REF nodes are built in the structure (and the parameter * values). * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ static xmlParserInputPtr resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId) { callbacks++; if (quiet) return(NULL); /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ fprintf(stdout, "SAX.resolveEntity("); if (publicId != NULL) fprintf(stdout, "%s", (char *)publicId); else fprintf(stdout, " "); if (systemId != NULL) fprintf(stdout, ", %s)\n", (char *)systemId); else fprintf(stdout, ", )\n"); /********* if (systemId != NULL) { return(xmlNewInputFromFile(ctxt, (char *) systemId)); } *********/ return(NULL); } /** * getEntityDebug: * @ctxt: An XML parser context * @name: The entity name * * Get an entity by name * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ static xmlEntityPtr getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { callbacks++; if (quiet) return(NULL); fprintf(stdout, "SAX.getEntity(%s)\n", name); return(NULL); } /** * getParameterEntityDebug: * @ctxt: An XML parser context * @name: The entity name * * Get a parameter entity by name * * Returns the xmlParserInputPtr */ static xmlEntityPtr getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { callbacks++; if (quiet) return(NULL); fprintf(stdout, "SAX.getParameterEntity(%s)\n", name); return(NULL); } /** * entityDeclDebug: * @ctxt: An XML parser context * @name: the entity name * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). * * An entity definition has been parsed */ static void entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) { const xmlChar *nullstr = BAD_CAST "(null)"; /* not all libraries handle printing null pointers nicely */ if (publicId == NULL) publicId = nullstr; if (systemId == NULL) systemId = nullstr; if (content == NULL) content = (xmlChar *)nullstr; callbacks++; if (quiet) return; fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n", name, type, publicId, systemId, content); } /** * attributeDeclDebug: * @ctxt: An XML parser context * @name: the attribute name * @type: the attribute type * * An attribute definition has been parsed */ static void attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem, const xmlChar * name, int type, int def, const xmlChar * defaultValue, xmlEnumerationPtr tree) { callbacks++; if (quiet) return; if (defaultValue == NULL) fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, NULL, ...)\n", elem, name, type, def); else fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n", elem, name, type, def, defaultValue); xmlFreeEnumeration(tree); } /** * elementDeclDebug: * @ctxt: An XML parser context * @name: the element name * @type: the element type * @content: the element value (without processing). * * An element definition has been parsed */ static void elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type, xmlElementContentPtr content ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return; fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n", name, type); } /** * notationDeclDebug: * @ctxt: An XML parser context * @name: The name of the notation * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * What to do when a notation declaration has been parsed. */ static void notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) { callbacks++; if (quiet) return; fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n", (char *) name, (char *) publicId, (char *) systemId); } /** * unparsedEntityDeclDebug: * @ctxt: An XML parser context * @name: The name of the entity * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @notationName: the name of the notation * * What to do when an unparsed entity declaration is parsed */ static void unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) { const xmlChar *nullstr = BAD_CAST "(null)"; if (publicId == NULL) publicId = nullstr; if (systemId == NULL) systemId = nullstr; if (notationName == NULL) notationName = nullstr; callbacks++; if (quiet) return; fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n", (char *) name, (char *) publicId, (char *) systemId, (char *) notationName); } /** * setDocumentLocatorDebug: * @ctxt: An XML parser context * @loc: A SAX Locator * * Receive the document locator at startup, actually xmlDefaultSAXLocator * Everything is available on the context, so this is useless in our case. */ static void setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return; fprintf(stdout, "SAX.setDocumentLocator()\n"); } /** * startDocumentDebug: * @ctxt: An XML parser context * * called when the document start being processed. */ static void startDocumentDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return; fprintf(stdout, "SAX.startDocument()\n"); } /** * endDocumentDebug: * @ctxt: An XML parser context * * called when the document end has been detected. */ static void endDocumentDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return; fprintf(stdout, "SAX.endDocument()\n"); } /** * startElementDebug: * @ctxt: An XML parser context * @name: The element name * * called when an opening tag has been processed. */ static void startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts) { int i; callbacks++; if (quiet) return; fprintf(stdout, "SAX.startElement(%s", (char *) name); if (atts != NULL) { for (i = 0;(atts[i] != NULL);i++) { fprintf(stdout, ", %s='", atts[i++]); if (atts[i] != NULL) fprintf(stdout, "%s'", atts[i]); } } fprintf(stdout, ")\n"); } /** * endElementDebug: * @ctxt: An XML parser context * @name: The element name * * called when the end of an element has been detected. */ static void endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { callbacks++; if (quiet) return; fprintf(stdout, "SAX.endElement(%s)\n", (char *) name); } /** * charactersDebug: * @ctxt: An XML parser context * @ch: a xmlChar string * @len: the number of xmlChar * * receiving some chars from the parser. * Question: how much at a time ??? */ static void charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) { char output[40]; int i; callbacks++; if (quiet) return; for (i = 0;(i 0) { ctxt = xmlCreatePushParserCtxt(emptySAXHandler, NULL, chars, ret, filename); while ((ret = fread(chars, 1, 3, f)) > 0) { xmlParseChunk(ctxt, chars, ret, 0); } xmlParseChunk(ctxt, chars, 0, 1); xmlFreeParserCtxt(ctxt); } fclose(f); } else { xmlGenericError(xmlGenericErrorContext, "Cannot read file %s\n", filename); } } /* * Debug callback */ #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) f = fopen(filename, "rb"); #else f = fopen(filename, "r"); #endif if (f != NULL) { int ret; char chars[10]; xmlParserCtxtPtr ctxt; ret = fread(chars, 1, 4, f); if (ret > 0) { if (sax2) ctxt = xmlCreatePushParserCtxt(debugSAX2Handler, NULL, chars, ret, filename); else ctxt = xmlCreatePushParserCtxt(debugSAXHandler, NULL, chars, ret, filename); while ((ret = fread(chars, 1, 3, f)) > 0) { xmlParseChunk(ctxt, chars, ret, 0); } ret = xmlParseChunk(ctxt, chars, 0, 1); xmlFreeParserCtxt(ctxt); if (ret != 0) { fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", ret); } } fclose(f); } } else { #endif /* LIBXML_PUSH_ENABLED */ if (!speed) { /* * Empty callbacks for checking */ if ((!quiet) && (!nonull)) { res = xmlSAXUserParseFile(emptySAXHandler, NULL, filename); if (res != 0) { fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res); } } /* * Debug callback */ callbacks = 0; if (repeat) { int i; for (i = 0;i < 99;i++) { if (sax2) res = xmlSAXUserParseFile(debugSAX2Handler, NULL, filename); else res = xmlSAXUserParseFile(debugSAXHandler, NULL, filename); } } if (sax2) res = xmlSAXUserParseFile(debugSAX2Handler, NULL, filename); else res = xmlSAXUserParseFile(debugSAXHandler, NULL, filename); if (res != 0) { fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res); } if (quiet) fprintf(stdout, "%d callbacks generated\n", callbacks); } else { /* * test 100x the SAX parse */ int i; for (i = 0; i<100;i++) res = xmlSAXUserParseFile(emptySAXHandler, NULL, filename); if (res != 0) { fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res); } } #ifdef LIBXML_PUSH_ENABLED } #endif } int main(int argc, char **argv) { int i; int files = 0; LIBXML_TEST_VERSION /* be safe, plus calls xmlInitParser */ for (i = 1; i < argc ; i++) { if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) debug++; else if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy"))) copy++; else if ((!strcmp(argv[i], "-recover")) || (!strcmp(argv[i], "--recover"))) recovery++; else if ((!strcmp(argv[i], "-push")) || (!strcmp(argv[i], "--push"))) #ifdef LIBXML_PUSH_ENABLED push++; #else fprintf(stderr,"'push' not enabled in library - ignoring\n"); #endif /* LIBXML_PUSH_ENABLED */ else if ((!strcmp(argv[i], "-speed")) || (!strcmp(argv[i], "--speed"))) speed++; else if ((!strcmp(argv[i], "-timing")) || (!strcmp(argv[i], "--timing"))) { nonull++; timing++; quiet++; } else if ((!strcmp(argv[i], "-repeat")) || (!strcmp(argv[i], "--repeat"))) { repeat++; quiet++; } else if ((!strcmp(argv[i], "-noent")) || (!strcmp(argv[i], "--noent"))) noent++; else if ((!strcmp(argv[i], "-quiet")) || (!strcmp(argv[i], "--quiet"))) quiet++; else if ((!strcmp(argv[i], "-sax2")) || (!strcmp(argv[i], "--sax2"))) sax2++; else if ((!strcmp(argv[i], "-nonull")) || (!strcmp(argv[i], "--nonull"))) nonull++; } if (noent != 0) xmlSubstituteEntitiesDefault(1); for (i = 1; i < argc ; i++) { if (argv[i][0] != '-') { if (timing) { startTimer(); } parseAndPrintFile(argv[i]); if (timing) { endTimer("Parsing"); } files ++; } } xmlCleanupParser(); xmlMemoryDump(); return(0); } #else int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { printf("%s : SAX1 parsing support not compiled in\n", argv[0]); return(0); } #endif /* LIBXML_SAX1_ENABLED */ 0707010002b1fb000081a40000000000000000000000014cb7d8850000170c000000b500010002ffffffffffffffff0000003c00000000root/usr/local/share/doc/libxml2-2.7.7/examples/testXPath.c/* * testXPath.c : a small tester program for XPath. * * See Copyright for the status of this software. * * daniel@veillard.com */ #include "libxml.h" #if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED) #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include #include #include #include #include #include #include #if defined(LIBXML_XPTR_ENABLED) #include static int xptr = 0; #endif static int debug = 0; static int valid = 0; static int expr = 0; static int tree = 0; static int nocdata = 0; static xmlDocPtr document = NULL; /* * Default document */ static xmlChar buffer[] = "\n\ \n\ \n\ Welcome to Gnome\n\ \n\ \n\ The Linux adventure\n\

bla bla bla ...

\n\ \n\

...

\n\
\n\ \n\ Chapter 2\n\

this is chapter 2 ...

\n\
\n\ \n\ Chapter 3\n\

this is chapter 3 ...

\n\
\n\
\n\ "; static void testXPath(const char *str) { xmlXPathObjectPtr res; xmlXPathContextPtr ctxt; #if defined(LIBXML_XPTR_ENABLED) if (xptr) { ctxt = xmlXPtrNewContext(document, NULL, NULL); res = xmlXPtrEval(BAD_CAST str, ctxt); } else { #endif ctxt = xmlXPathNewContext(document); ctxt->node = xmlDocGetRootElement(document); if (expr) res = xmlXPathEvalExpression(BAD_CAST str, ctxt); else { /* res = xmlXPathEval(BAD_CAST str, ctxt); */ xmlXPathCompExprPtr comp; comp = xmlXPathCompile(BAD_CAST str); if (comp != NULL) { if (tree) xmlXPathDebugDumpCompExpr(stdout, comp, 0); res = xmlXPathCompiledEval(comp, ctxt); xmlXPathFreeCompExpr(comp); } else res = NULL; } #if defined(LIBXML_XPTR_ENABLED) } #endif xmlXPathDebugDumpObject(stdout, res, 0); xmlXPathFreeObject(res); xmlXPathFreeContext(ctxt); } static void testXPathFile(const char *filename) { FILE *input; char expression[5000]; int len; input = fopen(filename, "r"); if (input == NULL) { xmlGenericError(xmlGenericErrorContext, "Cannot open %s for reading\n", filename); return; } while (fgets(expression, 4500, input) != NULL) { len = strlen(expression); len--; while ((len >= 0) && ((expression[len] == '\n') || (expression[len] == '\t') || (expression[len] == '\r') || (expression[len] == ' '))) len--; expression[len + 1] = 0; if (len >= 0) { printf("\n========================\nExpression: %s\n", expression) ; testXPath(expression); } } fclose(input); } int main(int argc, char **argv) { int i; int strings = 0; int usefile = 0; char *filename = NULL; for (i = 1; i < argc ; i++) { #if defined(LIBXML_XPTR_ENABLED) if ((!strcmp(argv[i], "-xptr")) || (!strcmp(argv[i], "--xptr"))) xptr++; else #endif if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) debug++; else if ((!strcmp(argv[i], "-valid")) || (!strcmp(argv[i], "--valid"))) valid++; else if ((!strcmp(argv[i], "-expr")) || (!strcmp(argv[i], "--expr"))) expr++; else if ((!strcmp(argv[i], "-tree")) || (!strcmp(argv[i], "--tree"))) tree++; else if ((!strcmp(argv[i], "-nocdata")) || (!strcmp(argv[i], "--nocdata"))) nocdata++; else if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input"))) filename = argv[++i]; else if ((!strcmp(argv[i], "-f")) || (!strcmp(argv[i], "--file"))) usefile++; } if (valid != 0) xmlDoValidityCheckingDefaultValue = 1; xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS; xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS; xmlSubstituteEntitiesDefaultValue = 1; if (nocdata != 0) { xmlDefaultSAXHandlerInit(); xmlDefaultSAXHandler.cdataBlock = NULL; } if (document == NULL) { if (filename == NULL) document = xmlReadDoc(buffer,NULL,NULL,XML_PARSE_COMPACT); else document = xmlReadFile(filename,NULL,XML_PARSE_COMPACT); } for (i = 1; i < argc ; i++) { if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input"))) { i++; continue; } if (argv[i][0] != '-') { if (usefile) testXPathFile(argv[i]); else testXPath(argv[i]); strings ++; } } if (strings == 0) { printf("Usage : %s [--debug] [--copy] stringsorfiles ...\n", argv[0]); printf("\tParse the XPath strings and output the result of the parsing\n"); printf("\t--debug : dump a debug version of the result\n"); printf("\t--valid : switch on DTD support in the parser\n"); #if defined(LIBXML_XPTR_ENABLED) printf("\t--xptr : expressions are XPointer expressions\n"); #endif printf("\t--expr : debug XPath expressions only\n"); printf("\t--tree : show the compiled XPath tree\n"); printf("\t--nocdata : do not generate CDATA nodes\n"); printf("\t--input filename : or\n"); printf("\t-i filename : read the document from filename\n"); printf("\t--file : or\n"); printf("\t-f : read queries from files, args\n"); } if (document != NULL) xmlFreeDoc(document); xmlCleanupParser(); xmlMemoryDump(); return(0); } #else #include int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { printf("%s : XPath/Debug support not compiled in\n", argv[0]); return(0); } #endif /* LIBXML_XPATH_ENABLED */ 0707010002b1f9000081a40000000000000000000000014cb7d885000052ba000000b500010002ffffffffffffffff0000003b00000000root/usr/local/share/doc/libxml2-2.7.7/examples/testHTML.c/* * testHTML.c : a small tester program for HTML input. * * See Copyright for the status of this software. * * daniel@veillard.com */ #include "libxml.h" #ifdef LIBXML_HTML_ENABLED #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include #include #include #include #ifdef LIBXML_DEBUG_ENABLED static int debug = 0; #endif static int copy = 0; static int sax = 0; static int repeat = 0; static int noout = 0; #ifdef LIBXML_PUSH_ENABLED static int push = 0; #endif /* LIBXML_PUSH_ENABLED */ static char *encoding = NULL; static int options = 0; static xmlSAXHandler emptySAXHandlerStruct = { NULL, /* internalSubset */ NULL, /* isStandalone */ NULL, /* hasInternalSubset */ NULL, /* hasExternalSubset */ NULL, /* resolveEntity */ NULL, /* getEntity */ NULL, /* entityDecl */ NULL, /* notationDecl */ NULL, /* attributeDecl */ NULL, /* elementDecl */ NULL, /* unparsedEntityDecl */ NULL, /* setDocumentLocator */ NULL, /* startDocument */ NULL, /* endDocument */ NULL, /* startElement */ NULL, /* endElement */ NULL, /* reference */ NULL, /* characters */ NULL, /* ignorableWhitespace */ NULL, /* processingInstruction */ NULL, /* comment */ NULL, /* xmlParserWarning */ NULL, /* xmlParserError */ NULL, /* xmlParserError */ NULL, /* getParameterEntity */ NULL, /* cdataBlock */ NULL, /* externalSubset */ 1, /* initialized */ NULL, /* private */ NULL, /* startElementNsSAX2Func */ NULL, /* endElementNsSAX2Func */ NULL /* xmlStructuredErrorFunc */ }; static xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct; extern xmlSAXHandlerPtr debugSAXHandler; /************************************************************************ * * * Debug Handlers * * * ************************************************************************/ /** * isStandaloneDebug: * @ctxt: An XML parser context * * Is this document tagged standalone ? * * Returns 1 if true */ static int isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED) { fprintf(stdout, "SAX.isStandalone()\n"); return(0); } /** * hasInternalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an internal subset * * Returns 1 if true */ static int hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED) { fprintf(stdout, "SAX.hasInternalSubset()\n"); return(0); } /** * hasExternalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an external subset * * Returns 1 if true */ static int hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED) { fprintf(stdout, "SAX.hasExternalSubset()\n"); return(0); } /** * hasInternalSubsetDebug: * @ctxt: An XML parser context * * Does this document has an internal subset */ static void internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { fprintf(stdout, "SAX.internalSubset(%s,", name); if (ExternalID == NULL) fprintf(stdout, " ,"); else fprintf(stdout, " %s,", ExternalID); if (SystemID == NULL) fprintf(stdout, " )\n"); else fprintf(stdout, " %s)\n", SystemID); } /** * resolveEntityDebug: * @ctxt: An XML parser context * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * Special entity resolver, better left to the parser, it has * more context than the application layer. * The default behaviour is to NOT resolve the entities, in that case * the ENTITY_REF nodes are built in the structure (and the parameter * values). * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ static xmlParserInputPtr resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId) { /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ fprintf(stdout, "SAX.resolveEntity("); if (publicId != NULL) fprintf(stdout, "%s", (char *)publicId); else fprintf(stdout, " "); if (systemId != NULL) fprintf(stdout, ", %s)\n", (char *)systemId); else fprintf(stdout, ", )\n"); /********* if (systemId != NULL) { return(xmlNewInputFromFile(ctxt, (char *) systemId)); } *********/ return(NULL); } /** * getEntityDebug: * @ctxt: An XML parser context * @name: The entity name * * Get an entity by name * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ static xmlEntityPtr getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { fprintf(stdout, "SAX.getEntity(%s)\n", name); return(NULL); } /** * getParameterEntityDebug: * @ctxt: An XML parser context * @name: The entity name * * Get a parameter entity by name * * Returns the xmlParserInputPtr */ static xmlEntityPtr getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { fprintf(stdout, "SAX.getParameterEntity(%s)\n", name); return(NULL); } /** * entityDeclDebug: * @ctxt: An XML parser context * @name: the entity name * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). * * An entity definition has been parsed */ static void entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) { fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n", name, type, publicId, systemId, content); } /** * attributeDeclDebug: * @ctxt: An XML parser context * @name: the attribute name * @type: the attribute type * * An attribute definition has been parsed */ static void attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *elem, const xmlChar *name, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree ATTRIBUTE_UNUSED) { fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n", elem, name, type, def, defaultValue); } /** * elementDeclDebug: * @ctxt: An XML parser context * @name: the element name * @type: the element type * @content: the element value (without processing). * * An element definition has been parsed */ static void elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type, xmlElementContentPtr content ATTRIBUTE_UNUSED) { fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n", name, type); } /** * notationDeclDebug: * @ctxt: An XML parser context * @name: The name of the notation * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * What to do when a notation declaration has been parsed. */ static void notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) { fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n", (char *) name, (char *) publicId, (char *) systemId); } /** * unparsedEntityDeclDebug: * @ctxt: An XML parser context * @name: The name of the entity * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @notationName: the name of the notation * * What to do when an unparsed entity declaration is parsed */ static void unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) { fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n", (char *) name, (char *) publicId, (char *) systemId, (char *) notationName); } /** * setDocumentLocatorDebug: * @ctxt: An XML parser context * @loc: A SAX Locator * * Receive the document locator at startup, actually xmlDefaultSAXLocator * Everything is available on the context, so this is useless in our case. */ static void setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED) { fprintf(stdout, "SAX.setDocumentLocator()\n"); } /** * startDocumentDebug: * @ctxt: An XML parser context * * called when the document start being processed. */ static void startDocumentDebug(void *ctx ATTRIBUTE_UNUSED) { fprintf(stdout, "SAX.startDocument()\n"); } /** * endDocumentDebug: * @ctxt: An XML parser context * * called when the document end has been detected. */ static void endDocumentDebug(void *ctx ATTRIBUTE_UNUSED) { fprintf(stdout, "SAX.endDocument()\n"); } /** * startElementDebug: * @ctxt: An XML parser context * @name: The element name * * called when an opening tag has been processed. */ static void startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts) { int i; fprintf(stdout, "SAX.startElement(%s", (char *) name); if (atts != NULL) { for (i = 0;(atts[i] != NULL);i++) { fprintf(stdout, ", %s", atts[i++]); if (atts[i] != NULL) { unsigned char output[40]; const unsigned char *att = atts[i]; int outlen, attlen; fprintf(stdout, "='"); while ((attlen = strlen((char*)att)) > 0) { outlen = sizeof output - 1; htmlEncodeEntities(output, &outlen, att, &attlen, '\''); output[outlen] = 0; fprintf(stdout, "%s", (char *) output); att += attlen; } fprintf(stdout, "'"); } } } fprintf(stdout, ")\n"); } /** * endElementDebug: * @ctxt: An XML parser context * @name: The element name * * called when the end of an element has been detected. */ static void endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { fprintf(stdout, "SAX.endElement(%s)\n", (char *) name); } /** * charactersDebug: * @ctxt: An XML parser context * @ch: a xmlChar string * @len: the number of xmlChar * * receiving some chars from the parser. * Question: how much at a time ??? */ static void charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) { unsigned char output[40]; int inlen = len, outlen = 30; htmlEncodeEntities(output, &outlen, ch, &inlen, 0); output[outlen] = 0; fprintf(stdout, "SAX.characters(%s, %d)\n", output, len); } /** * cdataDebug: * @ctxt: An XML parser context * @ch: a xmlChar string * @len: the number of xmlChar * * receiving some cdata chars from the parser. * Question: how much at a time ??? */ static void cdataDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) { unsigned char output[40]; int inlen = len, outlen = 30; htmlEncodeEntities(output, &outlen, ch, &inlen, 0); output[outlen] = 0; fprintf(stdout, "SAX.cdata(%s, %d)\n", output, len); } /** * referenceDebug: * @ctxt: An XML parser context * @name: The entity name * * called when an entity reference is detected. */ static void referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { fprintf(stdout, "SAX.reference(%s)\n", name); } /** * ignorableWhitespaceDebug: * @ctxt: An XML parser context * @ch: a xmlChar string * @start: the first char in the string * @len: the number of xmlChar * * receiving some ignorable whitespaces from the parser. * Question: how much at a time ??? */ static void ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) { char output[40]; int i; for (i = 0;(i 0) { ctxt = htmlCreatePushParserCtxt(emptySAXHandler, NULL, chars, res, filename, XML_CHAR_ENCODING_NONE); while ((res = fread(chars, 1, size, f)) > 0) { htmlParseChunk(ctxt, chars, res, 0); } htmlParseChunk(ctxt, chars, 0, 1); doc = ctxt->myDoc; htmlFreeParserCtxt(ctxt); } if (doc != NULL) { fprintf(stdout, "htmlSAXParseFile returned non-NULL\n"); xmlFreeDoc(doc); } fclose(f); } if (!noout) { #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) f = fopen(filename, "rb"); #else f = fopen(filename, "r"); #endif if (f != NULL) { int res, size = 3; char chars[4096]; htmlParserCtxtPtr ctxt; /* if (repeat) */ size = 4096; res = fread(chars, 1, 4, f); if (res > 0) { ctxt = htmlCreatePushParserCtxt(debugSAXHandler, NULL, chars, res, filename, XML_CHAR_ENCODING_NONE); while ((res = fread(chars, 1, size, f)) > 0) { htmlParseChunk(ctxt, chars, res, 0); } htmlParseChunk(ctxt, chars, 0, 1); doc = ctxt->myDoc; htmlFreeParserCtxt(ctxt); } if (doc != NULL) { fprintf(stdout, "htmlSAXParseFile returned non-NULL\n"); xmlFreeDoc(doc); } fclose(f); } } } else { #endif /* LIBXML_PUSH_ENABLED */ doc = htmlSAXParseFile(filename, NULL, emptySAXHandler, NULL); if (doc != NULL) { fprintf(stdout, "htmlSAXParseFile returned non-NULL\n"); xmlFreeDoc(doc); } if (!noout) { /* * Debug callback */ doc = htmlSAXParseFile(filename, NULL, debugSAXHandler, NULL); if (doc != NULL) { fprintf(stdout, "htmlSAXParseFile returned non-NULL\n"); xmlFreeDoc(doc); } } #ifdef LIBXML_PUSH_ENABLED } #endif /* LIBXML_PUSH_ENABLED */ } static void parseAndPrintFile(char *filename) { htmlDocPtr doc = NULL; /* * build an HTML tree from a string; */ #ifdef LIBXML_PUSH_ENABLED if (push) { FILE *f; #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) f = fopen(filename, "rb"); #else f = fopen(filename, "r"); #endif if (f != NULL) { int res, size = 3; char chars[4096]; htmlParserCtxtPtr ctxt; /* if (repeat) */ size = 4096; res = fread(chars, 1, 4, f); if (res > 0) { ctxt = htmlCreatePushParserCtxt(NULL, NULL, chars, res, filename, XML_CHAR_ENCODING_NONE); while ((res = fread(chars, 1, size, f)) > 0) { htmlParseChunk(ctxt, chars, res, 0); } htmlParseChunk(ctxt, chars, 0, 1); doc = ctxt->myDoc; htmlFreeParserCtxt(ctxt); } fclose(f); } } else { doc = htmlReadFile(filename, NULL, options); } #else doc = htmlReadFile(filename,NULL,options); #endif if (doc == NULL) { xmlGenericError(xmlGenericErrorContext, "Could not parse %s\n", filename); } #ifdef LIBXML_TREE_ENABLED /* * test intermediate copy if needed. */ if (copy) { htmlDocPtr tmp; tmp = doc; doc = xmlCopyDoc(doc, 1); xmlFreeDoc(tmp); } #endif #ifdef LIBXML_OUTPUT_ENABLED /* * print it. */ if (!noout) { #ifdef LIBXML_DEBUG_ENABLED if (!debug) { if (encoding) htmlSaveFileEnc("-", doc, encoding); else htmlDocDump(stdout, doc); } else xmlDebugDumpDocument(stdout, doc); #else if (encoding) htmlSaveFileEnc("-", doc, encoding); else htmlDocDump(stdout, doc); #endif } #endif /* LIBXML_OUTPUT_ENABLED */ /* * free it. */ xmlFreeDoc(doc); } int main(int argc, char **argv) { int i, count; int files = 0; for (i = 1; i < argc ; i++) { #ifdef LIBXML_DEBUG_ENABLED if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) debug++; else #endif if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy"))) copy++; #ifdef LIBXML_PUSH_ENABLED else if ((!strcmp(argv[i], "-push")) || (!strcmp(argv[i], "--push"))) push++; #endif /* LIBXML_PUSH_ENABLED */ else if ((!strcmp(argv[i], "-sax")) || (!strcmp(argv[i], "--sax"))) sax++; else if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout"))) noout++; else if ((!strcmp(argv[i], "-repeat")) || (!strcmp(argv[i], "--repeat"))) repeat++; else if ((!strcmp(argv[i], "-encode")) || (!strcmp(argv[i], "--encode"))) { i++; encoding = argv[i]; } } for (i = 1; i < argc ; i++) { if ((!strcmp(argv[i], "-encode")) || (!strcmp(argv[i], "--encode"))) { i++; continue; } if (argv[i][0] != '-') { if (repeat) { for (count = 0;count < 100 * repeat;count++) { if (sax) parseSAXFile(argv[i]); else parseAndPrintFile(argv[i]); } } else { if (sax) parseSAXFile(argv[i]); else parseAndPrintFile(argv[i]); } files ++; } } if (files == 0) { printf("Usage : %s [--debug] [--copy] [--copy] HTMLfiles ...\n", argv[0]); printf("\tParse the HTML files and output the result of the parsing\n"); #ifdef LIBXML_DEBUG_ENABLED printf("\t--debug : dump a debug tree of the in-memory document\n"); #endif printf("\t--copy : used to test the internal copy implementation\n"); printf("\t--sax : debug the sequence of SAX callbacks\n"); printf("\t--repeat : parse the file 100 times, for timing\n"); printf("\t--noout : do not print the result\n"); #ifdef LIBXML_PUSH_ENABLED printf("\t--push : use the push mode parser\n"); #endif /* LIBXML_PUSH_ENABLED */ printf("\t--encode encoding : output in the given encoding\n"); } xmlCleanupParser(); xmlMemoryDump(); return(0); } #else /* !LIBXML_HTML_ENABLED */ #include int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { printf("%s : HTML support not compiled in\n", argv[0]); return(0); } #endif 0707010002b1f7000081a40000000000000000000000014cb7d885000005da000000b500010002ffffffffffffffff0000003100000000root/usr/local/share/doc/libxml2-2.7.7/CopyrightExcept where otherwise noted in the source code (e.g. the files hash.c, list.c and the trio files, which are covered by a similar licence but with different Copyright notices) all the files are: Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from him. 0707010002b1fd000041ed0000000000000000000000044cb7d88c00000000000000b500010002ffffffffffffffff0000002c00000000root/usr/local/share/doc/libxml2-2.7.7/html0707010002b254000081a40000000000000000000000014cb7d88500000079000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/tree1.resnode type: Element, name: doc node type: Element, name: src node type: Element, name: dest node type: Element, name: src 0707010002b24d000081a40000000000000000000000014cb7d88500000ad4000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/smallfootonly.gifGIF89a0<ç BBD††„¦¦¤ºº´ÊÊÄÖÖÔÞÞÜVVT62,ææäffd&&$êêì“’Œîîì~~|òòôööô›š”nnl²²¬JJLúúü¾´¦šŒ’†|zz|º®¤š’„ ¶ªœbVL>>4’ŽŒ""$¿¶¬>:4ÒÎÄ¥ž”––” vnd‚vlqjdÂÂÄŽ‚|Š‚tÚÖÔ‚ztb^XŽŽŒæâܶ®¬224’’”jb\&"¦–Œ²²´NNL²¦œ¦¢ ®¢œžŽ„ÊÊÌššœ’‚t‡zt*&$wjdª¦œjjd¢–ŒâÞÜJFD¿¶´zrlŽ‚tƾ¼ÖÒÔ–†|ŠŠŒ¾²¬ÖÒÌbZTFFDîêì:6,ÞÚÜ/*,VJD²®¬^ZTÆÂÄÞÚÔ^RL6.,F>4::<¾¾¼&"$ÎÆÄ$h^\ÖÎÌ¢¢¤ªª¬tplXNLކ„~rlž’Œ†vlæâä–Š„²ª¤êæäŠ~t ƺ´¦š”šŠ„VRL¶²´NFD~ndrf\j^T:2,nb\‚‚„^^\ªžœ¾º¼ââ䢖”І„–ŽŒª¢œ¶ª¤ÒÎÌ’‚|>64bZLºº¼º®¬®¦¤**,ª¦¤nbT624F><‚rlB><~vtŠ‚|jjl:64VRTÎÊÄjfdž’„®ž”¦žœ–’”²¢œžšœÊ¾¼ÚÒ̾¼!þCreated with The GIMP,0<þ[H° ÁÀÀ:0á Ã‡6ÈRD "jÜHP#z«Âq`·`Ç“ûÀÚÖà†ž0¬:dD©qÂm JHW@Á‘(ÈØ$(¢"'M‡ø ħOÎP*˜Zåå“,VØPÁ9êðÁz(ÖèêQ®aŸG¡bFIššØHàjI/@«Ü,a‡ÎF®~Üp$ŒÃ(X0I—`9¸v„ 1Ê mUò¹ØI4·£¢Òx`[ú*Èð±dœ% œÓ´(‡=aŠ$®Õ'CiôHˆò3¬„¢s.ô-˜+¿ÔH ÏoÛĸÀ×28ÀZ¨ë: †Ðe ðÒàpì¢ÊpÁÜ€Œh´BSþ @.†wä`€<ˆ<ÀÎHƒˆàœ ÓHŒpä©èÅ#œáŠt8á 0À«"'hB€Àÿ@‚0x Ò«úàŠp”«€ÅꈈsE$0 v :,£‡?OºG8¨ `˜Jã„pdÖpüb¨Á(Ôôá™à؇&º`½¨¡IøAP…xÁæðA$H€Š9`ãàèC?¸ašHA¸ Ž°£Uhâ*ú€zpG.°Ê/d8C±Œ5¬Á{˜9~¡ %4€PC²E´ñMpÀ/€@ FÔa:à$"±Q 5\Ð<Œà jõÁ}Ç&„`ŒEØ€ ¸{ü œ@z¼±oˆÃÜà/ÄÀ°0À61μuSÍþ…T ‘ À!—¸Ç""qoDB>ÈÆ–á"h/ÛðÁ @V²`„UòDÈâ¢ð±eø@ø0æ7:A„)nÁßí^p lPÀ[A šAp@kˆÄ24¡‰o¸!XFŒáG,b Ÿ F0 € €¡y€>¦ i ã:X„ŒaŒb-b  |pQD£s¸!N1†øj(Sƒ,.\ àÃ2ðí|° àƒ]Å-(@ˆÞ¹‹@¶hF8a +@ƒ’[„ÖPãeHÙ²ðY‘Ñ!€)ÑÅ#ÍPCJ@jX¡ ”B§Äñ dt!´ÚœâÁ„5¢äå‚% 0 3”€tê°‚Ì,‹qˆ0P„ ”B EPŸ×!qLãŠØ[ 0À‹ý&!x…æ‡<Ô {ë!P/_G x€$ðptð.ÕËDöêv6@'è@#1‡"h/hDñ¡^ï`‚ ð0 Œ U(¢³9 4àÛI‹H@;0707010002b23c000081a40000000000000000000000014cb7d88500000eae000000b500010002ffffffffffffffff0000003200000000root/usr/local/share/doc/libxml2-2.7.7/html/io1.c/** * section: InputOutput * synopsis: Example of custom Input/Output * purpose: Demonstrate the use of xmlRegisterInputCallbacks * to build a custom I/O layer, this is used in an * XInclude method context to show how dynamic document can * be built in a clean way. * usage: io1 * test: io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp * author: Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #include #include #include #include #ifdef LIBXML_XINCLUDE_ENABLED static const char *result = "ab"; static const char *cur = NULL; static int rlen; /** * sqlMatch: * @URI: an URI to test * * Check for an sql: query * * Returns 1 if yes and 0 if another Input module should be used */ static int sqlMatch(const char * URI) { if ((URI != NULL) && (!strncmp(URI, "sql:", 4))) return(1); return(0); } /** * sqlOpen: * @URI: an URI to test * * Return a pointer to the sql: query handler, in this example simply * the current pointer... * * Returns an Input context or NULL in case or error */ static void * sqlOpen(const char * URI) { if ((URI == NULL) || (strncmp(URI, "sql:", 4))) return(NULL); cur = result; rlen = strlen(result); return((void *) cur); } /** * sqlClose: * @context: the read context * * Close the sql: query handler * * Returns 0 or -1 in case of error */ static int sqlClose(void * context) { if (context == NULL) return(-1); cur = NULL; rlen = 0; return(0); } /** * sqlRead: * @context: the read context * @buffer: where to store data * @len: number of bytes to read * * Implement an sql: query read. * * Returns the number of bytes read or -1 in case of error */ static int sqlRead(void * context, char * buffer, int len) { const char *ptr = (const char *) context; if ((context == NULL) || (buffer == NULL) || (len < 0)) return(-1); if (len > rlen) len = rlen; memcpy(buffer, ptr, len); rlen -= len; return(len); } const char *include = "\n\ \n\

List of people:

\n\ \n\
\n"; int main(void) { xmlDocPtr doc; /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION /* * register the new I/O handlers */ if (xmlRegisterInputCallbacks(sqlMatch, sqlOpen, sqlRead, sqlClose) < 0) { fprintf(stderr, "failed to register SQL handler\n"); exit(1); } /* * parse include into a document */ doc = xmlReadMemory(include, strlen(include), "include.xml", NULL, 0); if (doc == NULL) { fprintf(stderr, "failed to parse the including file\n"); exit(1); } /* * apply the XInclude process, this should trigger the I/O just * registered. */ if (xmlXIncludeProcess(doc) <= 0) { fprintf(stderr, "XInclude processing failed\n"); exit(1); } #ifdef LIBXML_OUTPUT_ENABLED /* * save the output for checking to stdout */ xmlDocDump(stdout, doc); #endif /* * Free the document */ xmlFreeDoc(doc); /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } #else int main(void) { fprintf(stderr, "XInclude support not compiled in\n"); exit(1); } #endif 0707010002b290000081a40000000000000000000000014cb7d885000019e7000000b500010002ffffffffffffffff0000003500000000root/usr/local/share/doc/libxml2-2.7.7/html/xpath1.c/** * section: XPath * synopsis: Evaluate XPath expression and prints result node set. * purpose: Shows how to evaluate XPath expression and register * known namespaces in XPath context. * usage: xpath1 [] * test: ./xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp * author: Aleksey Sanin * copy: see Copyright for the status of this software. */ #include #include #include #include #include #include #include #include #if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_SAX1_ENABLED) static void usage(const char *name); int execute_xpath_expression(const char* filename, const xmlChar* xpathExpr, const xmlChar* nsList); int register_namespaces(xmlXPathContextPtr xpathCtx, const xmlChar* nsList); void print_xpath_nodes(xmlNodeSetPtr nodes, FILE* output); int main(int argc, char **argv) { /* Parse command line and process file */ if((argc < 3) || (argc > 4)) { fprintf(stderr, "Error: wrong number of arguments.\n"); usage(argv[0]); return(-1); } /* Init libxml */ xmlInitParser(); LIBXML_TEST_VERSION /* Do the main job */ if(execute_xpath_expression(argv[1], BAD_CAST argv[2], (argc > 3) ? BAD_CAST argv[3] : NULL) < 0) { usage(argv[0]); return(-1); } /* Shutdown libxml */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return 0; } /** * usage: * @name: the program name. * * Prints usage information. */ static void usage(const char *name) { assert(name); fprintf(stderr, "Usage: %s []\n", name); fprintf(stderr, "where is a list of known namespaces\n"); fprintf(stderr, "in \"= =href2> ...\" format\n"); } /** * execute_xpath_expression: * @filename: the input XML filename. * @xpathExpr: the xpath expression for evaluation. * @nsList: the optional list of known namespaces in * "= =href2> ..." format. * * Parses input XML file, evaluates XPath expression and prints results. * * Returns 0 on success and a negative value otherwise. */ int execute_xpath_expression(const char* filename, const xmlChar* xpathExpr, const xmlChar* nsList) { xmlDocPtr doc; xmlXPathContextPtr xpathCtx; xmlXPathObjectPtr xpathObj; assert(filename); assert(xpathExpr); /* Load XML document */ doc = xmlParseFile(filename); if (doc == NULL) { fprintf(stderr, "Error: unable to parse file \"%s\"\n", filename); return(-1); } /* Create xpath evaluation context */ xpathCtx = xmlXPathNewContext(doc); if(xpathCtx == NULL) { fprintf(stderr,"Error: unable to create new XPath context\n"); xmlFreeDoc(doc); return(-1); } /* Register namespaces from list (if any) */ if((nsList != NULL) && (register_namespaces(xpathCtx, nsList) < 0)) { fprintf(stderr,"Error: failed to register namespaces list \"%s\"\n", nsList); xmlXPathFreeContext(xpathCtx); xmlFreeDoc(doc); return(-1); } /* Evaluate xpath expression */ xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx); if(xpathObj == NULL) { fprintf(stderr,"Error: unable to evaluate xpath expression \"%s\"\n", xpathExpr); xmlXPathFreeContext(xpathCtx); xmlFreeDoc(doc); return(-1); } /* Print results */ print_xpath_nodes(xpathObj->nodesetval, stdout); /* Cleanup */ xmlXPathFreeObject(xpathObj); xmlXPathFreeContext(xpathCtx); xmlFreeDoc(doc); return(0); } /** * register_namespaces: * @xpathCtx: the pointer to an XPath context. * @nsList: the list of known namespaces in * "= =href2> ..." format. * * Registers namespaces from @nsList in @xpathCtx. * * Returns 0 on success and a negative value otherwise. */ int register_namespaces(xmlXPathContextPtr xpathCtx, const xmlChar* nsList) { xmlChar* nsListDup; xmlChar* prefix; xmlChar* href; xmlChar* next; assert(xpathCtx); assert(nsList); nsListDup = xmlStrdup(nsList); if(nsListDup == NULL) { fprintf(stderr, "Error: unable to strdup namespaces list\n"); return(-1); } next = nsListDup; while(next != NULL) { /* skip spaces */ while((*next) == ' ') next++; if((*next) == '\0') break; /* find prefix */ prefix = next; next = (xmlChar*)xmlStrchr(next, '='); if(next == NULL) { fprintf(stderr,"Error: invalid namespaces list format\n"); xmlFree(nsListDup); return(-1); } *(next++) = '\0'; /* find href */ href = next; next = (xmlChar*)xmlStrchr(next, ' '); if(next != NULL) { *(next++) = '\0'; } /* do register namespace */ if(xmlXPathRegisterNs(xpathCtx, prefix, href) != 0) { fprintf(stderr,"Error: unable to register NS with prefix=\"%s\" and href=\"%s\"\n", prefix, href); xmlFree(nsListDup); return(-1); } } xmlFree(nsListDup); return(0); } /** * print_xpath_nodes: * @nodes: the nodes set. * @output: the output file handle. * * Prints the @nodes content to @output. */ void print_xpath_nodes(xmlNodeSetPtr nodes, FILE* output) { xmlNodePtr cur; int size; int i; assert(output); size = (nodes) ? nodes->nodeNr : 0; fprintf(output, "Result (%d nodes):\n", size); for(i = 0; i < size; ++i) { assert(nodes->nodeTab[i]); if(nodes->nodeTab[i]->type == XML_NAMESPACE_DECL) { xmlNsPtr ns; ns = (xmlNsPtr)nodes->nodeTab[i]; cur = (xmlNodePtr)ns->next; if(cur->ns) { fprintf(output, "= namespace \"%s\"=\"%s\" for node %s:%s\n", ns->prefix, ns->href, cur->ns->href, cur->name); } else { fprintf(output, "= namespace \"%s\"=\"%s\" for node %s\n", ns->prefix, ns->href, cur->name); } } else if(nodes->nodeTab[i]->type == XML_ELEMENT_NODE) { cur = nodes->nodeTab[i]; if(cur->ns) { fprintf(output, "= element node \"%s:%s\"\n", cur->ns->href, cur->name); } else { fprintf(output, "= element node \"%s\"\n", cur->name); } } else { cur = nodes->nodeTab[i]; fprintf(output, "= node \"%s\": type %d\n", cur->name, cur->type); } } } #else int main(void) { fprintf(stderr, "XPath support not compiled in\n"); exit(1); } #endif 0707010002b291000081a40000000000000000000000014cb7d88500000072000000b500010002ffffffffffffffff0000003700000000root/usr/local/share/doc/libxml2-2.7.7/html/xpath1.resResult (4 nodes): = element node "child2" = element node "child2" = element node "child2" = element node "child2" 0707010002b242000081a40000000000000000000000014cb7d885000007af000000b500010002ffffffffffffffff0000003500000000root/usr/local/share/doc/libxml2-2.7.7/html/parse2.c/** * section: Parsing * synopsis: Parse and validate an XML file to a tree and free the result * purpose: Create a parser context for an XML file, then parse and validate * the file, creating a tree, check the validation result * and xmlFreeDoc() to free the resulting tree. * usage: parse2 test2.xml * test: parse2 test2.xml * author: Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #include /** * exampleFunc: * @filename: a filename or an URL * * Parse and validate the resource and free the resulting tree */ static void exampleFunc(const char *filename) { xmlParserCtxtPtr ctxt; /* the parser context */ xmlDocPtr doc; /* the resulting document tree */ /* create a parser context */ ctxt = xmlNewParserCtxt(); if (ctxt == NULL) { fprintf(stderr, "Failed to allocate parser context\n"); return; } /* parse the file, activating the DTD validation option */ doc = xmlCtxtReadFile(ctxt, filename, NULL, XML_PARSE_DTDVALID); /* check if parsing suceeded */ if (doc == NULL) { fprintf(stderr, "Failed to parse %s\n", filename); } else { /* check if validation suceeded */ if (ctxt->valid == 0) fprintf(stderr, "Failed to validate %s\n", filename); /* free up the resulting document */ xmlFreeDoc(doc); } /* free up the parser context */ xmlFreeParserCtxt(ctxt); } int main(int argc, char **argv) { if (argc != 2) return(1); /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION exampleFunc(argv[1]); /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } 0707010002b253000081a40000000000000000000000014cb7d885000008c9000000b500010002ffffffffffffffff0000003400000000root/usr/local/share/doc/libxml2-2.7.7/html/tree1.c/** * section: Tree * synopsis: Navigates a tree to print element names * purpose: Parse a file to a tree, use xmlDocGetRootElement() to * get the root element, then walk the document and print * all the element name in document order. * usage: tree1 filename_or_URL * test: tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp * author: Dodji Seketeli * copy: see Copyright for the status of this software. */ #include #include #include #ifdef LIBXML_TREE_ENABLED /* *To compile this file using gcc you can type *gcc `xml2-config --cflags --libs` -o xmlexample libxml2-example.c */ /** * print_element_names: * @a_node: the initial xml node to consider. * * Prints the names of the all the xml elements * that are siblings or children of a given xml node. */ static void print_element_names(xmlNode * a_node) { xmlNode *cur_node = NULL; for (cur_node = a_node; cur_node; cur_node = cur_node->next) { if (cur_node->type == XML_ELEMENT_NODE) { printf("node type: Element, name: %s\n", cur_node->name); } print_element_names(cur_node->children); } } /** * Simple example to parse a file called "file.xml", * walk down the DOM, and print the name of the * xml elements nodes. */ int main(int argc, char **argv) { xmlDoc *doc = NULL; xmlNode *root_element = NULL; if (argc != 2) return(1); /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION /*parse the file and get the DOM */ doc = xmlReadFile(argv[1], NULL, 0); if (doc == NULL) { printf("error: could not parse file %s\n", argv[1]); } /*Get the root element node */ root_element = xmlDocGetRootElement(doc); print_element_names(root_element); /*free the document */ xmlFreeDoc(doc); /* *Free the global variables that may *have been allocated by the parser. */ xmlCleanupParser(); return 0; } #else int main(void) { fprintf(stderr, "Tree support not compiled in\n"); exit(1); } #endif 0707010002b202000081a40000000000000000000000014cb7d88500004b84000000b500010002ffffffffffffffff0000003a00000000root/usr/local/share/doc/libxml2-2.7.7/html/encoding.html Encodings support
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

Encodings support

Main Menu
Related links

If you are not really familiar with Internationalization (usual shortcut is I18N) , Unicode, characters and glyphs, I suggest you read a presentation by Tim Bray on Unicode and why you should care about it.

If you don't understand why it does not make sense to have a string without knowing what encoding it uses, then as Joel Spolsky said please do not write another line of code until you finish reading that article.. It is a prerequisite to understand this page, and avoid a lot of problems with libxml2, XML or text processing in general.

Table of Content:

  1. What does internationalization support mean ?
  2. The internal encoding, how and why
  3. How is it implemented ?
  4. Default supported encodings
  5. How to extend the existing support

What does internationalization support mean ?

XML was designed from the start to allow the support of any character set by using Unicode. Any conformant XML parser has to support the UTF-8 and UTF-16 default encodings which can both express the full unicode ranges. UTF8 is a variable length encoding whose greatest points are to reuse the same encoding for ASCII and to save space for Western encodings, but it is a bit more complex to handle in practice. UTF-16 use 2 bytes per character (and sometimes combines two pairs), it makes implementation easier, but looks a bit overkill for Western languages encoding. Moreover the XML specification allows the document to be encoded in other encodings at the condition that they are clearly labeled as such. For example the following is a wellformed XML document encoded in ISO-8859-1 and using accentuated letters that we French like for both markup and content:

<?xml version="1.0" encoding="ISO-8859-1"?>
<très>là</très>

Having internationalization support in libxml2 means the following:

  • the document is properly parsed
  • information about it's encoding is saved
  • it can be modified
  • it can be saved in its original encoding
  • it can also be saved in another encoding supported by libxml2 (for example straight UTF8 or even an ASCII form)

Another very important point is that the whole libxml2 API, with the exception of a few routines to read with a specific encoding or save to a specific encoding, is completely agnostic about the original encoding of the document.

It should be noted too that the HTML parser embedded in libxml2 now obey the same rules too, the following document will be (as of 2.2.2) handled in an internationalized fashion by libxml2 too:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
                      "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="fr">
<head>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</head>
<body>
<p>W3C crée des standards pour le Web.</body>
</html>

The internal encoding, how and why

One of the core decisions was to force all documents to be converted to a default internal encoding, and that encoding to be UTF-8, here are the rationales for those choices:

  • keeping the native encoding in the internal form would force the libxml users (or the code associated) to be fully aware of the encoding of the original document, for examples when adding a text node to a document, the content would have to be provided in the document encoding, i.e. the client code would have to check it before hand, make sure it's conformant to the encoding, etc ... Very hard in practice, though in some specific cases this may make sense.
  • the second decision was which encoding. From the XML spec only UTF8 and UTF16 really makes sense as being the two only encodings for which there is mandatory support. UCS-4 (32 bits fixed size encoding) could be considered an intelligent choice too since it's a direct Unicode mapping support. I selected UTF-8 on the basis of efficiency and compatibility with surrounding software:
    • UTF-8 while a bit more complex to convert from/to (i.e. slightly more costly to import and export CPU wise) is also far more compact than UTF-16 (and UCS-4) for a majority of the documents I see it used for right now (RPM RDF catalogs, advogato data, various configuration file formats, etc.) and the key point for today's computer architecture is efficient uses of caches. If one nearly double the memory requirement to store the same amount of data, this will trash caches (main memory/external caches/internal caches) and my take is that this harms the system far more than the CPU requirements needed for the conversion to UTF-8
    • Most of libxml2 version 1 users were using it with straight ASCII most of the time, doing the conversion with an internal encoding requiring all their code to be rewritten was a serious show-stopper for using UTF-16 or UCS-4.
    • UTF-8 is being used as the de-facto internal encoding standard for related code like the pango upcoming Gnome text widget, and a lot of Unix code (yet another place where Unix programmer base takes a different approach from Microsoft - they are using UTF-16)

What does this mean in practice for the libxml2 user:

  • xmlChar, the libxml2 data type is a byte, those bytes must be assembled as UTF-8 valid strings. The proper way to terminate an xmlChar * string is simply to append 0 byte, as usual.
  • One just need to make sure that when using chars outside the ASCII set, the values has been properly converted to UTF-8

How is it implemented ?

Let's describe how all this works within libxml, basically the I18N (internationalization) support get triggered only during I/O operation, i.e. when reading a document or saving one. Let's look first at the reading sequence:

  1. when a document is processed, we usually don't know the encoding, a simple heuristic allows to detect UTF-16 and UCS-4 from encodings where the ASCII range (0-0x7F) maps with ASCII
  2. the xml declaration if available is parsed, including the encoding declaration. At that point, if the autodetected encoding is different from the one declared a call to xmlSwitchEncoding() is issued.
  3. If there is no encoding declaration, then the input has to be in either UTF-8 or UTF-16, if it is not then at some point when processing the input, the converter/checker of UTF-8 form will raise an encoding error. You may end-up with a garbled document, or no document at all ! Example:
    ~/XML -> ./xmllint err.xml 
    err.xml:1: error: Input is not proper UTF-8, indicate encoding !
    <très>là</très>
       ^
    err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C
    <très>là</très>
       ^
  4. xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and then search the default registered encoding converters for that encoding. If it's not within the default set and iconv() support has been compiled it, it will ask iconv for such an encoder. If this fails then the parser will report an error and stops processing:
    ~/XML -> ./xmllint err2.xml 
    err2.xml:1: error: Unsupported encoding UnsupportedEnc
    <?xml version="1.0" encoding="UnsupportedEnc"?>
                                                 ^
  5. From that point the encoder processes progressively the input (it is plugged as a front-end to the I/O module) for that entity. It captures and converts on-the-fly the document to be parsed to UTF-8. The parser itself just does UTF-8 checking of this input and process it transparently. The only difference is that the encoding information has been added to the parsing context (more precisely to the input corresponding to this entity).
  6. The result (when using DOM) is an internal form completely in UTF-8 with just an encoding information on the document node.

Ok then what happens when saving the document (assuming you collected/built an xmlDoc DOM like structure) ? It depends on the function called, xmlSaveFile() will just try to save in the original encoding, while xmlSaveFileTo() and xmlSaveFileEnc() can optionally save to a given encoding:

  1. if no encoding is given, libxml2 will look for an encoding value associated to the document and if it exists will try to save to that encoding,

    otherwise everything is written in the internal form, i.e. UTF-8

  2. so if an encoding was specified, either at the API level or on the document, libxml2 will again canonicalize the encoding name, lookup for a converter in the registered set or through iconv. If not found the function will return an error code
  3. the converter is placed before the I/O buffer layer, as another kind of buffer, then libxml2 will simply push the UTF-8 serialization to through that buffer, which will then progressively be converted and pushed onto the I/O layer.
  4. It is possible that the converter code fails on some input, for example trying to push an UTF-8 encoded Chinese character through the UTF-8 to ISO-8859-1 converter won't work. Since the encoders are progressive they will just report the error and the number of bytes converted, at that point libxml2 will decode the offending character, remove it from the buffer and replace it with the associated charRef encoding &#123; and resume the conversion. This guarantees that any document will be saved without losses (except for markup names where this is not legal, this is a problem in the current version, in practice avoid using non-ascii characters for tag or attribute names). A special "ascii" encoding name is used to save documents to a pure ascii form can be used when portability is really crucial

Here are a few examples based on the same test document:

~/XML -> ./xmllint isolat1 
<?xml version="1.0" encoding="ISO-8859-1"?>
<très>là</très>
~/XML -> ./xmllint --encode UTF-8 isolat1 
<?xml version="1.0" encoding="UTF-8"?>
<très>là  </très>
~/XML -> 

The same processing is applied (and reuse most of the code) for HTML I18N processing. Looking up and modifying the content encoding is a bit more difficult since it is located in a <meta> tag under the <head>, so a couple of functions htmlGetMetaEncoding() and htmlSetMetaEncoding() have been provided. The parser also attempts to switch encoding on the fly when detecting such a tag on input. Except for that the processing is the same (and again reuses the same code).

Default supported encodings

libxml2 has a set of default converters for the following encodings (located in encoding.c):

  1. UTF-8 is supported by default (null handlers)
  2. UTF-16, both little and big endian
  3. ISO-Latin-1 (ISO-8859-1) covering most western languages
  4. ASCII, useful mostly for saving
  5. HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML predefined entities like &copy; for the Copyright sign.

More over when compiled on an Unix platform with iconv support the full set of encodings supported by iconv can be instantly be used by libxml. On a linux machine with glibc-2.1 the list of supported encodings and aliases fill 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the various Japanese ones.

To convert from the UTF-8 values returned from the API to another encoding then it is possible to use the function provided from the encoding module like UTF8Toisolat1, or use the POSIX iconv() API directly.

Encoding aliases

From 2.2.3, libxml2 has support to register encoding names aliases. The goal is to be able to parse document whose encoding is supported but where the name differs (for example from the default set of names accepted by iconv). The following functions allow to register and handle new aliases for existing encodings. Once registered libxml2 will automatically lookup the aliases when handling a document:

  • int xmlAddEncodingAlias(const char *name, const char *alias);
  • int xmlDelEncodingAlias(const char *alias);
  • const char * xmlGetEncodingAlias(const char *alias);
  • void xmlCleanupEncodingAliases(void);

How to extend the existing support

Well adding support for new encoding, or overriding one of the encoders (assuming it is buggy) should not be hard, just write input and output conversion routines to/from UTF-8, and register them using xmlNewCharEncodingHandler(name, xxxToUTF8, UTF8Toxxx), and they will be called automatically if the parser(s) encounter such an encoding name (register it uppercase, this will help). The description of the encoders, their arguments and expected return values are described in the encoding.h header.

Daniel Veillard

0707010002b245000081a40000000000000000000000014cb7d885000009e8000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/reader1.c/** * section: xmlReader * synopsis: Parse an XML file with an xmlReader * purpose: Demonstrate the use of xmlReaderForFile() to parse an XML file * and dump the informations about the nodes found in the process. * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader1 * test: reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp * author: Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #ifdef LIBXML_READER_ENABLED /** * processNode: * @reader: the xmlReader * * Dump information about the current node */ static void processNode(xmlTextReaderPtr reader) { const xmlChar *name, *value; name = xmlTextReaderConstName(reader); if (name == NULL) name = BAD_CAST "--"; value = xmlTextReaderConstValue(reader); printf("%d %d %s %d %d", xmlTextReaderDepth(reader), xmlTextReaderNodeType(reader), name, xmlTextReaderIsEmptyElement(reader), xmlTextReaderHasValue(reader)); if (value == NULL) printf("\n"); else { if (xmlStrlen(value) > 40) printf(" %.40s...\n", value); else printf(" %s\n", value); } } /** * streamFile: * @filename: the file name to parse * * Parse and print information about an XML file. */ static void streamFile(const char *filename) { xmlTextReaderPtr reader; int ret; reader = xmlReaderForFile(filename, NULL, 0); if (reader != NULL) { ret = xmlTextReaderRead(reader); while (ret == 1) { processNode(reader); ret = xmlTextReaderRead(reader); } xmlFreeTextReader(reader); if (ret != 0) { fprintf(stderr, "%s : failed to parse\n", filename); } } else { fprintf(stderr, "Unable to open %s\n", filename); } } int main(int argc, char **argv) { if (argc != 2) return(1); /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION streamFile(argv[1]); /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } #else int main(void) { fprintf(stderr, "XInclude support not compiled in\n"); exit(1); } #endif 0707010002b24b000081a40000000000000000000000014cb7d88500000048000000b500010002ffffffffffffffff0000003800000000root/usr/local/share/doc/libxml2-2.7.7/html/reader4.restest1.xml: Processed ok test2.xml: Processed ok test3.xml: Processed ok 0707010002b249000081a40000000000000000000000014cb7d88500000168000000b500010002ffffffffffffffff0000003800000000root/usr/local/share/doc/libxml2-2.7.7/html/reader3.res content1 content2 too content3 content4 content5 content6 0707010002b243000081a40000000000000000000000014cb7d885000005e2000000b500010002ffffffffffffffff0000003500000000root/usr/local/share/doc/libxml2-2.7.7/html/parse3.c/** * section: Parsing * synopsis: Parse an XML document in memory to a tree and free it * purpose: Demonstrate the use of xmlReadMemory() to read an XML file * into a tree and and xmlFreeDoc() to free the resulting tree * usage: parse3 * test: parse3 * author: Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #include static const char *document = ""; /** * example3Func: * @content: the content of the document * @length: the length in bytes * * Parse the in memory document and free the resulting tree */ static void example3Func(const char *content, int length) { xmlDocPtr doc; /* the resulting document tree */ /* * The document being in memory, it have no base per RFC 2396, * and the "noname.xml" argument will serve as its base. */ doc = xmlReadMemory(content, length, "noname.xml", NULL, 0); if (doc == NULL) { fprintf(stderr, "Failed to parse document\n"); return; } xmlFreeDoc(doc); } int main(void) { /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION example3Func(document, 6); /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } 0707010002b250000081a40000000000000000000000014cb7d885000000e3000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/test2.xml ]> 0707010002b1fe000081a40000000000000000000000014cb7d88500000c5e000000b500010002ffffffffffffffff0000003400000000root/usr/local/share/doc/libxml2-2.7.7/html/DOM.gifGIF89a”ñðÿÿÿ!ù,”ñþŒ©Ëí£œ´Ú‹³Þ¼û†âH–扦êʶî ÇòL×öçúÎ÷þ ‡Ä¢ñˆL*—̦ó J§ÔªõŠÍj·Ü®÷ ‹Çä²ùŒN«×ì¶û ËçôºýŽÏGü>ø§'(Ðt8¨èUhä·(¹ÕØèc9™)UY‰à÷xøéøèx€™ ªÙÊäyúGKk‹:›*:šÈÀêJÚûSº&¬{Šª«lˆ¼Ìœ¼ð <;ÍsÌ¦Ê º›ú¼zk›\]m½7N3›Ö½.¯L¾\_Oýž<ùÝïß³bÞ ™;è€Ý¾œx!Ëʽ^ÒÄ%Ôg& EþRùÞCÈãBädÕšXÎ8ƒ¦v±SFãÀƒå•úæÈo7ñ™ W$¶ )/Ör\CaM:u©oÛN 2™á2gÑYQ–FA9µ]Ô~)sm- ’«/°Š,± £jÓasÅá·"\mcí;ÓnZ¼¶¬EÜ»£*Ê >«ç±ä¸H‹%}ÈÔ#Ô¤–[" šÈ×Ф߸-Ú˜§Ô¬ÓDn ;¶ìÙ´kÛ¾;·îݼ{ûþ <¸ðáÄ‹?Ž<9q¦Ì›;=ºôéÔ¥’©Ž=»öíÜ;÷xkú x7ãk”ç&^ÐùëÕ´¯ò õéõÄq?cý<ùþ[ô¿¾ÿ­0 !ÞQ` Æt  žð # Öa rqáj±abñá|ö‰H‚e¼`$N NHGˆtXM Ðåâ5,ÎQ#ÖÄÓŒÝ#1ô ¢YñD– Aú3"‘*È2£U+eÞr,™‹Ÿ5sËYf¶&[JDɈ™?e…ÁP„QùÙ˜ð™ É“qþu–Š!½iUžbêù B¢°&(hùÙ[Iú¹TXBñèEf%#¢:¾cä›õY’DmS“;œ–((“&¸YQ–ZÁŸT Ö%¦SšõN(Ú¦R¯yªT˜ê Ö‰%~…P«¾Jþ’¬ÈT‘«ÍHé’]EK ZùÕgœ:ÝÅž°"t¢±Ÿ8g³¬ÄšêŸ6E¤hªž9Ä‚²Ø:«jT%ø`¤å~a.Š­ ›ÙÎ Xµ|Bkí‘ «ób¾Þr8›s«•b\b+ð© k¶V8•ŒzÙD몊 ®¾<œE»÷Ãã*}¬®½…™œåÆu4ó¿€YR-=yˆ2ˆ•Îñ³¯ o7>®Ds®/¶1µ… ¶U¦NUí°“Ž‚™OÌîš8°;˜vMKÓû>©_'„1ÖŒu’–ÙQjÍ_ƒývœ.ÓòjʶÚo o«¥†±÷±y^K¯ßÈÚúAàÁ ÎàÁ^þ^oâT“™óå£ÝCOë²±£®öÀqC™(çWÈ\N²2¯p—ÌXår‹>h«ÝíÞ:~VÆá¸üðåBðJBžØã¹?ù;Æï!|—ñ<Õ?PÞõ AÈ*õ@c¨z÷g+þ Þ.Zø¸/ß8]Íß‹¾ú@R•>Öi×¥ÞYÿÉÐË «½ï"}Kûç?ý Åû·®ÀÀБ¤~0Ñ:¨«§Að€l“\0x­¶mnØë îÎuAý…Žâ 3¸§õ~`‰ Ù·½†oîP²ÞbÃñ ±„€#—ýø¡©Ðu ß sXA(¾ˆ†,Ÿþ”½~Ë…QLà¨;+ΰkatâ¢#)¦Ž€íQ¢÷`8<3Jo‚€Sc±èA1F®v’Òâ÷ÎhdzQã½ú’ùµÃ2–é‰^tÚ ˆ3CÊpf â/‰Æ:6òŽ6ëã!%´¬*ʇ›äÜ6Éž¯Äæ<‘¸¿ïpQ–=¬—#Ç©Ëašsö¬àxÖ©ÃnýŸ“¤™<þ JO9þœXŒf;õ¹Ð~Ò¢Ï!EoÉ¡î)³¢–„A7ÊP Æ~Ó´eDw‰Î{b¦¤28)KßùMì%‘‡ª,g=c QbRÁ¦U]™S¤W:­3¢Ò‘lé6ßv?žªt¥ýéDuZÕ¨îs«‡‰Y¥øPÌ4ѧÍX9 ©±–ÕÞœkC¡rU>1D"5ëZ)Vg’u•gíe]«IÕ_v…­0ýT:T¹–®…%M´³´Q I]ÚêÌc?»+ÐF¡¥)Fy9ËÁöÓ®©…g13‹:¬Âöu­-goK[åu­!,k;ú[Õv«Ïáí^GþXPI””­¬a+û̱7Y/ímr{jÝ‹6wµÎÝîa‹—æ÷“½.5—ËΤw½Ýý®¢J Òr¨ÊÍ.skÕ|N7±£Õ*y)Ç]þõU¦öM/] zN¥"¼M5¯KGi`Ã"xÂn]ðpÞ6X»øf‚3L]Ͱ!Fïi:‚¬ó£ÿÂ-G á«Wœ&±N«»á¯ZxÃ÷nSjãÅ^8»:Ö0_}»ÊKsÅKmq\J`GØ»JÖ(ˆo,b ™«R–ñç›(Ç<·›ÕË»f‹f]‘Y͹m³ƒ…ÙemÜ´aâ-âÏD«[1Ë–Íi.sŸgúþç=_® ./‡}ŒS*ϹÐ%rŽý`˹¨`vòŒsiáã Ê®K«¢5$Y بo’ ­ãÇæ2Ÿ Fò¨­|jJo™§šž§íO6Ë÷ÓÍœê‡cíkFc™ÁG~ó ¥Rç$HÅJþ§ÏëèbÓ׃۱^¨—ÜaR [ȵŽì­±KÌý&´¦‹®4°™}en[Ú /N'I¡3îüÉZÔßÕvº¹ÚmTßÛ¿Äj“7o*Ö˜6õ«õ=ë–öÛˆÿÖJ=ÌëKØØÈ6´ókÚézÝèŽx/'íŠ× ·IËMpwäùÞÄ€ƒ*i€;å–¸»³Läþ}+|Ó w²¸V÷Þœâ<·x¤ ìåš·7zÙ~öÑ[îâ—×7Î2ï¸wß]Õ²œãúöÅ¥ÝcŸù¹îÜú¹ŸÐî(ƒ}ÊÙ.Ö)ËoŸÝR÷Ú“ñ¬£|ÔN溎 øÀ×ýëû¹õpļѻ&UÉKírW×Ûí‰nzÜ›¼DSÝá{·¼))¿sÌãRówŸôÌÉþyö.~Ø“¯'é ÏvDcW?×#¡SÙø'’¢›çfç«G¿ˆÕBî=î[âãÞCÑ~¿Ë|Á9ßȰÇ{Û9F¹‡Yf“C³|Åt™í¸ôÀûñ©˜é†%,q^šÜî)KèŒþ—ßú²?ÿ± ®ög±?I½§zÞÖss,'ÄxÛÇešƒ035VWHÅG~ØwzôÇDø†€qÇ8nóHÛ‚~—'€G€ ÕG,‚H‚g¦kòWç±?ò' xp¾gPÓzãçQ=c3•±mmd1Õgz8¾¤W¸s80ºö{¨s]7€%è;t¶@ê—€í·(T÷ñ31öƒ@híÓ7ˤ‚…C…Cy5V§Ë6]h?ýEg C)E3†h~oå‚2Ø„ÛV<²)mˆBœÕ#Š.цwȆ†Ç_—vÂu¶&…1÷‚«ã„†Ve”{ÀBÆ`r™Xþt²‰KäCu#yÁ‰®ñ‰¸ŠrŠ©f¸µà¢1M’‡¤øˆGèO¨’q¹w<£ˆDx,s¨r'‰³Ø‹—’ƒü·(KÈ…Î³Šæã‹ 8‡)?ºX%¼¨‰ÆIwÑÊxicîñŒXãY\ó@ô6Œ0HáÈûÇ6ADHŒ×˜¥#9í¨bªø¦øŒÀh‹åˆmž˜ò±Èˆ1 FAQ
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

FAQ

Main Menu
Related links

Table of Contents:

License(s)

  1. Licensing Terms for libxml

    libxml2 is released under the MIT License; see the file Copyright in the distribution for the precise wording

  2. Can I embed libxml2 in a proprietary application ?

    Yes. The MIT License allows you to keep proprietary the changes you made to libxml, but it would be graceful to send-back bug fixes and improvements as patches for possible incorporation in the main development tree.

Installation

  1. Do Not Use libxml1, use libxml2
  2. Where can I get libxml ?

    The original distribution comes from xmlsoft.org or gnome.org

    Most Linux and BSD distributions include libxml, this is probably the safer way for end-users to use libxml.

    David Doolin provides precompiled Windows versions at http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/

  3. I see libxml and libxml2 releases, which one should I install ?
    • If you are not constrained by backward compatibility issues with existing applications, install libxml2 only
    • If you are not doing development, you can safely install both. Usually the packages libxml and libxml2 are compatible (this is not the case for development packages).
    • If you are a developer and your system provides separate packaging for shared libraries and the development components, it is possible to install libxml and libxml2, and also libxml-devel and libxml2-devel too for libxml2 >= 2.3.0
    • If you are developing a new application, please develop against libxml2(-devel)
  4. I can't install the libxml package, it conflicts with libxml0

    You probably have an old libxml0 package used to provide the shared library for libxml.so.0, you can probably safely remove it. The libxml packages provided on xmlsoft.org provide libxml.so.0

  5. I can't install the libxml(2) RPM package due to failed dependencies

    The most generic solution is to re-fetch the latest src.rpm , and rebuild it locally with

    rpm --rebuild libxml(2)-xxx.src.rpm.

    If everything goes well it will generate two binary rpm packages (one providing the shared libs and xmllint, and the other one, the -devel package, providing includes, static libraries and scripts needed to build applications with libxml(2)) that you can install locally.

Compilation

  1. What is the process to compile libxml2 ?

    As most UNIX libraries libxml2 follows the "standard":

    gunzip -c xxx.tar.gz | tar xvf -

    cd libxml-xxxx

    ./configure --help

    to see the options, then the compilation/installation proper

    ./configure [possible options]

    make

    make install

    At that point you may have to rerun ldconfig or a similar utility to update your list of installed shared libs.

  2. What other libraries are needed to compile/install libxml2 ?

    Libxml2 does not require any other library, the normal C ANSI API should be sufficient (please report any violation to this rule you may find).

    However if found at configuration time libxml2 will detect and use the following libs:

    • libz : a highly portable and available widely compression library.
    • iconv: a powerful character encoding conversion library. It is included by default in recent glibc libraries, so it doesn't need to be installed specifically on Linux. It now seems a part of the official UNIX specification. Here is one implementation of the library which source can be found here.
  3. Make check fails on some platforms

    Sometimes the regression tests' results don't completely match the value produced by the parser, and the makefile uses diff to print the delta. On some platforms the diff return breaks the compilation process; if the diff is small this is probably not a serious problem.

    Sometimes (especially on Solaris) make checks fail due to limitations in make. Try using GNU-make instead.

  4. I use the SVN version and there is no configure script

    The configure script (and other Makefiles) are generated. Use the autogen.sh script to regenerate the configure script and Makefiles, like:

    ./autogen.sh --prefix=/usr --disable-shared

  5. I have troubles when running make tests with gcc-3.0

    It seems the initial release of gcc-3.0 has a problem with the optimizer which miscompiles the URI module. Please use another compiler.

Developer corner

  1. Troubles compiling or linking programs using libxml2

    Usually the problem comes from the fact that the compiler doesn't get the right compilation or linking flags. There is a small shell script xml2-config which is installed as part of libxml2 usual install process which provides those flags. Use

    xml2-config --cflags

    to get the compilation flags and

    xml2-config --libs

    to get the linker flags. Usually this is done directly from the Makefile as:

    CFLAGS=`xml2-config --cflags`

    LIBS=`xml2-config --libs`

  2. I want to install my own copy of libxml2 in my home directory and link my programs against it, but it doesn't work

    There are many different ways to accomplish this. Here is one way to do this under Linux. Suppose your home directory is /home/user. Then:

    • Create a subdirectory, let's call it myxml
    • unpack the libxml2 distribution into that subdirectory
    • chdir into the unpacked distribution (/home/user/myxml/libxml2 )
    • configure the library using the "--prefix" switch, specifying an installation subdirectory in /home/user/myxml, e.g.

      ./configure --prefix /home/user/myxml/xmlinst {other configuration options}

    • now run make followed by make install
    • At this point, the installation subdirectory contains the complete "private" include files, library files and binary program files (e.g. xmllint), located in

      /home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include and /home/user/myxml/xmlinst/bin

      respectively.
    • In order to use this "private" library, you should first add it to the beginning of your default PATH (so that your own private program files such as xmllint will be used instead of the normal system ones). To do this, the Bash command would be

      export PATH=/home/user/myxml/xmlinst/bin:$PATH

    • Now suppose you have a program test1.c that you would like to compile with your "private" library. Simply compile it using the command

      gcc `xml2-config --cflags --libs` -o test test.c

      Note that, because your PATH has been set with /home/user/myxml/xmlinst/bin at the beginning, the xml2-config program which you just installed will be used instead of the system default one, and this will automatically get the correct libraries linked with your program.
  3. xmlDocDump() generates output on one line.

    Libxml2 will not invent spaces in the content of a document since all spaces in the content of a document are significant. If you build a tree from the API and want indentation:

    1. the correct way is to generate those yourself too.
    2. the dangerous way is to ask libxml2 to add those blanks to your content modifying the content of your document in the process. The result may not be what you expect. There is NO way to guarantee that such a modification won't affect other parts of the content of your document. See xmlKeepBlanksDefault () and xmlSaveFormatFile ()
  4. Extra nodes in the document:

    For an XML file as below:

    <?xml version="1.0"?>
    <PLAN xmlns="http://www.argus.ca/autotest/1.0/">
    <NODE CommFlag="0"/>
    <NODE CommFlag="1"/>
    </PLAN>

    after parsing it with the function pxmlDoc=xmlParseFile(...);

    I want to the get the content of the first node (node with the CommFlag="0")

    so I did it as following;

    xmlNodePtr pnode;
    pnode=pxmlDoc->children->children;

    but it does not work. If I change it to

    pnode=pxmlDoc->children->children->next;

    then it works. Can someone explain it to me.

    In XML all characters in the content of the document are significant including blanks and formatting line breaks.

    The extra nodes you are wondering about are just that, text nodes with the formatting spaces which are part of the document but that people tend to forget. There is a function xmlKeepBlanksDefault () to remove those at parse time, but that's an heuristic, and its use should be limited to cases where you are certain there is no mixed-content in the document.

  5. I get compilation errors of existing code like when accessing root or child fields of nodes.

    You are compiling code developed for libxml version 1 and using a libxml2 development environment. Either switch back to libxml v1 devel or even better fix the code to compile with libxml2 (or both) by following the instructions.

  6. I get compilation errors about non existing xmlRootNode or xmlChildrenNode fields.

    The source code you are using has been upgraded to be able to compile with both libxml and libxml2, but you need to install a more recent version: libxml(-devel) >= 1.8.8 or libxml2(-devel) >= 2.1.0

  7. Random crashes in threaded applications

    Read and follow all advices on the thread safety page, and make 100% sure you never call xmlCleanupParser() while the library or an XML document might still be in use by another thread.

  8. The example provided in the web page does not compile.

    It's hard to maintain the documentation in sync with the code <grin/> ...

    Check the previous points 1/ and 2/ raised before, and please send patches.

  9. Where can I get more examples and information than provided on the web page?

    Ideally a libxml2 book would be nice. I have no such plan ... But you can:

    • check more deeply the existing generated doc
    • have a look at the set of examples.
    • look for examples of use for libxml2 function using the Gnome code or by asking on Google.
    • Browse the libxml2 source , I try to write code as clean and documented as possible, so looking at it may be helpful. In particular the code of xmllint.c and of the various testXXX.c test programs should provide good examples of how to do things with the library.
  10. What about C++ ?

    libxml2 is written in pure C in order to allow easy reuse on a number of platforms, including embedded systems. I don't intend to convert to C++.

    There is however a C++ wrapper which may fulfill your needs:

  11. How to validate a document a posteriori ?

    It is possible to validate documents which had not been validated at initial parsing time or documents which have been built from scratch using the API. Use the xmlValidateDtd() function. It is also possible to simply add a DTD to an existing document:

    xmlDocPtr doc; /* your existing document */
    xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
    
            dtd->name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */
    
            doc->intSubset = dtd;
            if (doc->children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
            else xmlAddPrevSibling(doc->children, (xmlNodePtr)dtd);
              
  12. So what is this funky "xmlChar" used all the time?

    It is a null terminated sequence of utf-8 characters. And only utf-8! You need to convert strings encoded in different ways to utf-8 before passing them to the API. This can be accomplished with the iconv library for instance.

  13. etc ...

Daniel Veillard

0707010002b240000081a40000000000000000000000014cb7d88500001e0c000000b500010002ffffffffffffffff0000003700000000root/usr/local/share/doc/libxml2-2.7.7/html/libxml.gifGIF87a‘¢÷€Ìøøüø@.g:if'?Òý@Çð”@¼(óÛÒ@|ÈÙâÿ¿´=¡@Öf\ï@@:P(üØÒáÿ¿\O”((lÒҴǃ¡ð€@@´X¡Ùàì=äâÿÿ¿¿hÈ;×ï@Pض\p œ¬`^ äóâÿÿ¿@¿$@ J›,¨àÈ@0äÿ¿( œÒ@ÈÇ×ð¬@PL$ØÙâ\¥ãŽÿ¿p`œþÔÚn=°, €@Ô”J=ç,,ÿ@@¿+‚ ´TP¡ãåÿÿ@¿¿(FÏÒ½„ lfãÿ¿„€ä+ÿ¿Ÿ”x+çÿ ¿”½ç ÿ¿€H+âÿ¿ låã$ äïuÿ@¿@®Ôø=¶,I€Å+¦€@l $´åä¡ÿÿ¿¿@óx â ÿ@¿´läãa’(¸«Ò \ äuÿ@¿€+€­û¢€+€€O+ver€w+ritŸe+ ÿe¿x iö+st i¤€n+g fi+l Ú'Ã/u/EveilardXMLocÉÒ/ýli@b,‘¢þH° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ J´¨Ñ£H“*]Ê´©Ó§P£JJµªÕ«X³jÝʵ«×¯`ÊK¶¬Ù³hÓª]˶­Û·pãÊK·®Ý»xóêÝË·¯ß¿€ L¸°áÈ+^̸±ãÇ#KžL¹²å˘3kÞ̹³çÏ C‹Mº´éÓ¨S«^ͺµë×ÈžM»¶íÛ¸sëÞp·ïßÀƒó†M3€È“+_μ¹óçПè­tzñë”Gßν;wëÁþ½|cíÞÓ«ïNž`{¢ïÍË7Œ~½ýûÊã ДÿüÿՇ߀êéçßO¨`^èàvV·à„ ˜[´-7[r¢—!sºiHÝ@´4Û~²!t"Š)ª˜"x-B” …4ÂÕ lùi·aŽêXŽÍ)¤…#’£@1®èÞ‘Gšh]’3ºWã” ‚haf™AöÈ¡ˆ*¤$“M²¸¤‹RZ%•lšucƒ\‰œœVBçœEž‰¢“d’‰æFk¶)hXoF‡£…tr ]¢ùåyf{Ó1¹§‘.BÚg™$ªi[…~©!£twb訑ïE £ªz†§$’þOƪP ›ÖŠÕ›µyç‡^Zj„šhæž~ööj‹IÎjë²eu:§• ÎIg´£‚^¥ÂФ¶”.4¦¬ÛžÊì¸[9«k¨‹ÊIm¯AŠûb¶Ä‚Ë­·È‚‹i¦äæË•¹ ²{®´vJçn·ø;é¼ôÎ[¢²ú6|k[,­‡Ÿúûlµ†é$ªi\¬”äÕ[°·—\•¹C~ꣿ‰¶ü«£MŽÙñÁ4ÇK0”¯ŠiòÎQ!z[¨Óvôb¹kž Ãú.Œ¨ÆŠÛ~,®ZomólõR¥>¨uÆ×ær|´^-öMYo½5°8Å\õØl U¶Ù¢Mv²k·mwOoÃM þÜsç,ìÝ€ó”·Þøñ]TØ'nÒà„Ûg8|ŠG^ã(îPˆK®yG”WîÝã˜o.zK{þÝån®zJ¥›n(êý­.{IÂÕn{pÆÞ®ûîÀÍîûïÀ/üðÄoüñÈûÅûòÌ×¾dóÐG?œÒÒWo[òžµî:Üâi¿}ãݯuæØ#æ½ø†þúí’Èþ€ä—Oßûë«Oÿûöߟ^üòv¾þûsÙ—¿B¨šùŸè¾~¯€tÿX¡‚O€43È5 VF´Ö~BX¹ ’p‚T φÁr¯….ÄS ?ÃôÁ°†6l Q8ý€Ð…þ&Ä¡ãnÄfGˆ…#"‡¨ÃòЈxù•¨&64^Ið‡ŸS¢®\–¥ãtN!Ò[U¦#ŒI h*;#“µ)¢ëŒn¬úƘFE¥Ìb½ºã ›xÅuq‹Ü×X—²‰*hftÜø´xE-C‰t$$ÅÈÈGJÌŠXò£†ØCHȼM\×ç~HGˆ!²¾Ò`%߸I²’s(äþÎ É<;rÏP¼ä*'ÑÆN”w&e¨$ÙÊ`V®˜†|²(ǘÊaN³þWÇœåpõØÌvù²šç¬V,¯ÖÍSé²kôì9ÓùϦ²sµÛm¸,¬*Õþtˆu¦'äÑâÒç|B·%Oõm¿ôE•M+­›Æ|ÑY•V‹÷% HôüG)›T„l3æWFÓW;ÍÓBl^åQÌÀz~CMÔ„jÕ‹OG=ÎV?ÖAmq&ÝH<­ÕdÐiíÆû —ŽtÓdµÖÝX1-Ó]âtW}KY]±î¤UÔêD¾Â®~ù,x]ÖRåNÆ××ù&ЋâÑb™Õh]S†]•"-ÑuIZuR|E²±™Á^ýÍ8%Ö`„Ù‹­Ù°ÄÙˆåÙâÒQ<ÐZrJÝÎSm×—-ד­L]m²)ýÙé Ö1WU{}Ûv”Mn%Y¿ý9¬Ò‘× }o³Y3ÕUyþÛAÝz‚uÜ=Tf$MÒ-ÜTåQÝl-QóÜm؃MÙuí[‰§&E~ÔÞv…ز9×®æÓâý¯’ÙÛ‘Íz¸Tß³Ô½ÖË-ßM]ÏÍÞÄ$›$ë—¹Y~~mÔä”ÝÊ-ÚßlÒ±}Ö¾ØH¦ÝÖjMßç7âæw•]|ÃyH¹X‡M;;Ö„Ϥ˜.€˜Ò½â6LàèMTo…Ï”^BÏ:þâëjß[™àhä9ˆ¿ÜËJnâë½iO‡LÝý…H.å¼}ßK4åq#Z[.wÝŒ‚2„¼]æ\®x^.Õ'ŽÎx ÎæìÌnþæ'ÎrîæaÞÒÒüþyn£åŒ±YŽÎ}.Z¬,jsÞÚí8è#Ùæ‚þç¨åNÄëÌç‡Éuçc~èŠî[…•Nç‰Þé~÷é›]¢Ž¤îè ÑZQꦪêÉêYáêÅ ë)ëSé´n^§‘®üëÀì®b\ìÆ~ìÈžìʾìÌžmÃþìÐÎbÀí·G—Ÿ.ˆAkÌþxíz˜íƒ¸íÜ´)»èÙî➺{Xîæ^Ðã^“à¾îfÞîÚðîŽòþíô^ï9èí]þîú.å÷Þïùþïîöèï?²¿êENFfªÑXš· ¯îë¥þÓ»NîÒ¹ïëHÑ¿ñî¾þðMøñ·Ž2cã žÃ$Uϯ*?Ó„Íàªkò“ަJ±ëŠÑ’Kñ…ã³a9œâƒë1U¬<ß2bõòøôAßÛ|ÖºÕðßQèÖ4µNµÙÍM8Fo>;¯×‰MsR‹ó4*ÓR1_õñ-ò?ñ¿•7¢öÞ ö(ªÎÒ¯¯õs6uOU,M–mòÏܪIËõB¼æXhí¯P5.ÐL/ð[ï8ÏÜ_OITŸðU<î]Oâ›dïùÿ÷ã“ù¥=úGÞù¦Ÿh¿Ñ~÷œ_ø¯os±u=Üõ“÷·å¹ßÔ‡ŸÔ÷®ÿûÀù°oûÈÌÊþûÌßüpð)yüÒo‘Á_òÑýŸýó¾ýÜòÞßô¥þHý„QâDŠÀ˜QãFŽ=~RäÈ‘*žD™RåJ–-]¾„SæLš5mÞ¤x‘äNž=}þÔhçP¢EEšTéR¦M!êUêTžB^ÅšUëV®]½f…JUìØ±V¿žE›¶(¶mݾ…Wî\ºuíÞÅ›Wï^¾}ýþÜ–`X²… WU›Xñb—„?†YòdÊ>Í:®œyªYÆ=þNˆYóhÒ¥M—¾|ZõNΠ]¿^,zõlÚµmsL}[wkؽ}s•­[øpâs_Íû÷ræJƒ#‡]:ÈË­_Ç·ùvîHŸO¹òîåÍŸwú=²Û„Ù{lKš-ƹôëÛ|ûó÷çÿ/®þÞÒO$ÿÈ"=dp&õÖs ª÷ƒïÁ²ÂšÐ? u:°Ã íkOBG‘BOä>’&¤*Á_„1ƈ,4Î=CìˆEÉXäQÅñË(CüqH’HY£1$e„2J)›4¬G"¯ÄBÄLÈ ƒ´1Çàt<Ū¨üèI)×dSA4t/Ë2‹äþï½:(Ì¿ÓC ÁÜ2P1ÔGÖl3QE|ó nÄmÏ7 jRuÄCB]òÊ>©ëI2A-kQSOå®Q±>”3SKûÑËpÖBC|ÏÐ Œ”ÔHsMòÌRQ%¶X×TmQÓV%}ÔÈášóÑ^¿œ–Vj= ÕWku]Ù Ê.\qé2¶Üc“U4Wc’Òjß•SZx• s^y·UÛÍÀ¯05Íx+o¥êÐÚOMÉ{çÍ÷Ö…¯ÅvS‰†˜ÉaCëÑ€7Vkਠ~8Z„!ýLMó]W_йå1Û4].°§†S¨I; ž²9æÙ9t±þô’PhŽÏ݉EÆ—YŠ®ðè ŽWf~»mv3¥î9kUcO6`q½±ÓfŸõlP[¶ÒdÑV×Ö¯ë…:ا6Péë6mg­÷¾éêÍ*˹$¿á» ÍÀW¤›Ë»›V5¾gjðwt2É'·ìjÕk8W^MØÆ;åf rÓ½Ëø§¯qN]³Ã¯Yð—é,TlwoÏÓðÓw'êòálM¶uÊ^‡c¼·R¨çYCÕy‡Þ&ß…§¾zŸK…a}Ðæ‰o/zñešÞzóϧ{Æ››ÂNeUüoǧ¿¥òÑÇ_øÍ©:]ÚËÜÚžW?¦ä~ùC xþö';³¡ÈY”W„¢–¦V°"L`£³@Áµ‹W%Ðÿ<4:ùáÇ‚'œ‘U¸Bø¨O{~¢SØr7B?A«„&Da2.öЇ?b¯ãBáÔ‹`:Db£‡A«ÅìcJ„b÷ÆDœýinRÄbËEÅ*Þ7ZcÅÅ݈ьgŒ ‡F6¶ÑÅò}ò£%<õ™Cy SaŸçÚ°¶O‚¢±Ÿÿ`4Ùi2wÔ¡Z<¨Õ™°î!L—AyhF!Ê:Nm¯h3LQ8‰—O–ržÔÀ‘©yâ§IeŠÂTæm¦7=aM‡SžÖO§òéiPÅ÷ÓÑT¨Gã!¿ˆT¦ò¨®kjT³öÔÌUªWeP$µZ¬vÕ«_kXÅ:V²–Õ¬gEkZÕºV¶¶Õ­o…k\å:WºÖÕ®wÅk^õº W¾öÕ¯l`Ã;0707010002b23f000081a40000000000000000000000014cb7d8850000002b000000b500010002ffffffffffffffff0000003400000000root/usr/local/share/doc/libxml2-2.7.7/html/io2.res content 0707010002b28d000081a40000000000000000000000014cb7d885000007ec000000b500010002ffffffffffffffff0000003400000000root/usr/local/share/doc/libxml2-2.7.7/html/w3c.png‰PNG  IHDRH0=þ«¼gAMA± üa£IDATxœíZ}lSU?1{‹t3bí(°°n "a4iXÙøj²©8 ›ºŠ1Jg ¸8¶QØ3tQ—(h ö¡C’K ^·áˆR¹¹B²õMÛ&nCçnoïûhGX²_úǹï÷Þù½sî¹çžW€G=h&?h& ,±'´÷,Ë"a``Àd2™L¦GÁc,ËšL&$oذã8Žã`ìáGmmíØØX~~~(ÊÏÏGG!õë×Ûl64¼3Çøðp×o!¬´pNº"m*uå`ø÷[<4è•òO:}þ« !9íÉÍ3Œ¼¾èCeÀq\NN €V«eYÖf³iµZÀëØ`xáÇñ5õïå•ΣnÔÌÛ| [w¯’ç6­ðà?ðoò† oÈq\uuuKK Ã0EEEv»]£Ñ S<Ï †®®.8sæ ÇqÈW<ÏïÚµ«²²òN(ª•i3ÓSñÏuÜ>8[›‘š2›~쑱ÒëÞ¾=VB8ÎÜÜÜ––ˆD"‡ÎÊÊr:èl]]ÝåË—‘ŒÒ ˲,Ë644TVV*ŠXå±¥þ—ÍÝHNM™r³©Tø°MµÞ£ž’g¦§þòÍ+Rfm©¿ð…»û±¤W“¥ó§_·9ŽËÍÍÕloo×ëõ³fÍŠD"íííF£QT-–<ÌËfc9:2Új/ÏžåþPôF0,eè9Pš…ª^‹£a6›¥4ËÊÊjjj"‘\¿~]J-FÌ W’‘vøôU¡ö:‚<4KDã`¸»—ÇÃ+æ…ÛÊÉß×U+Hý£–œ]N§³¯¯u:ÝöíÛ­V«J¥€¾¾¾}ûöšx‰‰A¼CD_¹"mêÒùÓñÐÛ!î’ðØ?ðÉÛ‹)…­û/`95e ûÎòì°ÜØØØÕÕµcÇŽ½{÷vvv––Æ&HEE…B¡5(b¤Cº{yÑH›=# Ëm?õòáa¡Ix‘öi*‰ï̪¼¼ŸR(.— qc¦¢¢BŠ•1p~¢ù³í§^@™cÊ,òþüäÏx83=µêõ¸ÙuöìY$”––’¬0\.—N§“wPÄiSdÆ´…S¨#0%uš|qG¨¥É¶ÿ"y‡Oßyºœã8$Øív)£].—¼»@¸mÙX0ËèÅ“höÑ4„^%©ÎLOÍÖfÄ”ýA¼ZÀÒùÓÍyq1w‰­]»¯ÅBäääÈ» „ĨL½~¡úCQja ©R±½óÐ%rø•Í 4hhhdÒ]’ ‰ek3È„´’Jâ¤;ƒdb0dÇ^“«í×óWnáa‰Q«VÆò…ûOŒ²†tI’\ñâtüq:8ÒøððÇ.Ž|ÊQO`eE«h R©FZBˆ#㇌4’Àæâç°ÜÝË㤄XÖÉUñÈ髤'Î_¹•·ù”«íWê¸Z­qˆ£&4v™Ù7Ì-\œ‰‡ˆ3&c•|AFF¤,x÷3ÉMªö/Ä7šB£›|=8M/ÈT¨•iˆ¥R ©`Ð+·•èÑ\Qlû/bŸßw1òeŸ¿r‹“l¹^Ié g’.EäñРWV½ž‹~ŠZw¯"gitd´þÄU{b=F¾lhþ±‡ôFiÁ\ˆßÂEGF½þ ©C%zúþzåiÇjò.G4Í}á&NL­L#¦þÄÏxꧦLÁk.iýÖú dI±N°òRÈÖf”µxHn”&Ü7©”`Ž/š±LR KÓ»Yjb‰•µ•”5Ô.v<;AŸaöŒ¸öŽLæ¼H£:äêsI~‚‘HFíÞ ×WÚW¸8“Ú\QbÂK†¼È.%L›6Íáp$s!‚ÙlNªç!„ðÅ iP͈'ßäëyyû™%›Ü¢÷§x½Òh4VWW˘„áp8|>Ÿßï—Rë!£qIN­¹ë–Í&ËvL~É&7N•M¾ªRãÃÃT¥²pNzæSEYYYjµZtïŒÁq\MM ¤ö z÷¤‹–Kô}I’ü""7¼Åz©BþcG–Å(€5ÕjµX,¸1*Çqƒµßdê¯q3Kä:²!ÉX–ƒåèÈhÁûßî
00000535351010MüllerJörg
<Test>
10
<Test 2>
20
This is a text.
0707010002b23e000081a40000000000000000000000014cb7d885000004a3000000b500010002ffffffffffffffff0000003200000000root/usr/local/share/doc/libxml2-2.7.7/html/io2.c/** * section: InputOutput * synopsis: Output to char buffer * purpose: Demonstrate the use of xmlDocDumpMemory * to output document to a character buffer * usage: io2 * test: io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp * author: John Fleck * copy: see Copyright for the status of this software. */ #include #if defined(LIBXML_TREE_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) int main(void) { xmlNodePtr n; xmlDocPtr doc; xmlChar *xmlbuff; int buffersize; /* * Create the document. */ doc = xmlNewDoc(BAD_CAST "1.0"); n = xmlNewNode(NULL, BAD_CAST "root"); xmlNodeSetContent(n, BAD_CAST "content"); xmlDocSetRootElement(doc, n); /* * Dump the document to a buffer and print it * for demonstration purposes. */ xmlDocDumpFormatMemory(doc, &xmlbuff, &buffersize, 1); printf("%s", (char *) xmlbuff); /* * Free associated memory. */ xmlFree(xmlbuff); xmlFreeDoc(doc); return (0); } #else #include int main(void) { fprintf(stderr, "library not configured with tree and output support\n"); return (1); } #endif 0707010002b292000081a40000000000000000000000014cb7d885000014d7000000b500010002ffffffffffffffff0000003500000000root/usr/local/share/doc/libxml2-2.7.7/html/xpath2.c/** * section: XPath * synopsis: Load a document, locate subelements with XPath, modify * said elements and save the resulting document. * purpose: Shows how to make a full round-trip from a load/edit/save * usage: xpath2 * test: xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp * author: Aleksey Sanin and Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #include #include #include #include #include #include #if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_SAX1_ENABLED) && \ defined(LIBXML_OUTPUT_ENABLED) static void usage(const char *name); static int example4(const char *filename, const xmlChar * xpathExpr, const xmlChar * value); static void update_xpath_nodes(xmlNodeSetPtr nodes, const xmlChar * value); int main(int argc, char **argv) { /* Parse command line and process file */ if (argc != 4) { fprintf(stderr, "Error: wrong number of arguments.\n"); usage(argv[0]); return(-1); } /* Init libxml */ xmlInitParser(); LIBXML_TEST_VERSION /* Do the main job */ if (example4(argv[1], BAD_CAST argv[2], BAD_CAST argv[3])) { usage(argv[0]); return(-1); } /* Shutdown libxml */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return 0; } /** * usage: * @name: the program name. * * Prints usage information. */ static void usage(const char *name) { assert(name); fprintf(stderr, "Usage: %s \n", name); } /** * example4: * @filename: the input XML filename. * @xpathExpr: the xpath expression for evaluation. * @value: the new node content. * * Parses input XML file, evaluates XPath expression and update the nodes * then print the result. * * Returns 0 on success and a negative value otherwise. */ static int example4(const char* filename, const xmlChar* xpathExpr, const xmlChar* value) { xmlDocPtr doc; xmlXPathContextPtr xpathCtx; xmlXPathObjectPtr xpathObj; assert(filename); assert(xpathExpr); assert(value); /* Load XML document */ doc = xmlParseFile(filename); if (doc == NULL) { fprintf(stderr, "Error: unable to parse file \"%s\"\n", filename); return(-1); } /* Create xpath evaluation context */ xpathCtx = xmlXPathNewContext(doc); if(xpathCtx == NULL) { fprintf(stderr,"Error: unable to create new XPath context\n"); xmlFreeDoc(doc); return(-1); } /* Evaluate xpath expression */ xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx); if(xpathObj == NULL) { fprintf(stderr,"Error: unable to evaluate xpath expression \"%s\"\n", xpathExpr); xmlXPathFreeContext(xpathCtx); xmlFreeDoc(doc); return(-1); } /* update selected nodes */ update_xpath_nodes(xpathObj->nodesetval, value); /* Cleanup of XPath data */ xmlXPathFreeObject(xpathObj); xmlXPathFreeContext(xpathCtx); /* dump the resulting document */ xmlDocDump(stdout, doc); /* free the document */ xmlFreeDoc(doc); return(0); } /** * update_xpath_nodes: * @nodes: the nodes set. * @value: the new value for the node(s) * * Prints the @nodes content to @output. */ static void update_xpath_nodes(xmlNodeSetPtr nodes, const xmlChar* value) { int size; int i; assert(value); size = (nodes) ? nodes->nodeNr : 0; /* * NOTE: the nodes are processed in reverse order, i.e. reverse document * order because xmlNodeSetContent can actually free up descendant * of the node and such nodes may have been selected too ! Handling * in reverse order ensure that descendant are accessed first, before * they get removed. Mixing XPath and modifications on a tree must be * done carefully ! */ for(i = size - 1; i >= 0; i--) { assert(nodes->nodeTab[i]); xmlNodeSetContent(nodes->nodeTab[i], value); /* * All the elements returned by an XPath query are pointers to * elements from the tree *except* namespace nodes where the XPath * semantic is different from the implementation in libxml2 tree. * As a result when a returned node set is freed when * xmlXPathFreeObject() is called, that routine must check the * element type. But node from the returned set may have been removed * by xmlNodeSetContent() resulting in access to freed data. * This can be exercised by running * valgrind xpath2 test3.xml '//discarded' discarded * There is 2 ways around it: * - make a copy of the pointers to the nodes from the result set * then call xmlXPathFreeObject() and then modify the nodes * or * - remove the reference to the modified nodes from the node set * as they are processed, if they are not namespace nodes. */ if (nodes->nodeTab[i]->type != XML_NAMESPACE_DECL) nodes->nodeTab[i] = NULL; } } #else int main(void) { fprintf(stderr, "XPath support not compiled in\n"); exit(1); } #endif 0707010002b255000081a40000000000000000000000014cb7d88500000d93000000b500010002ffffffffffffffff0000003400000000root/usr/local/share/doc/libxml2-2.7.7/html/tree2.c/* * section: Tree * synopsis: Creates a tree * purpose: Shows how to create document, nodes and dump it to stdout or file. * usage: tree2 -Default output: stdout * test: tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp * author: Lucas Brasilino * copy: see Copyright for the status of this software */ #include #include #include #if defined(LIBXML_TREE_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) /* *To compile this file using gcc you can type *gcc `xml2-config --cflags --libs` -o tree2 tree2.c */ /* A simple example how to create DOM. Libxml2 automagically * allocates the necessary amount of memory to it. */ int main(int argc, char **argv) { xmlDocPtr doc = NULL; /* document pointer */ xmlNodePtr root_node = NULL, node = NULL, node1 = NULL;/* node pointers */ xmlDtdPtr dtd = NULL; /* DTD pointer */ char buff[256]; int i, j; LIBXML_TEST_VERSION; /* * Creates a new document, a node and set it as a root node */ doc = xmlNewDoc(BAD_CAST "1.0"); root_node = xmlNewNode(NULL, BAD_CAST "root"); xmlDocSetRootElement(doc, root_node); /* * Creates a DTD declaration. Isn't mandatory. */ dtd = xmlCreateIntSubset(doc, BAD_CAST "root", NULL, BAD_CAST "tree2.dtd"); /* * xmlNewChild() creates a new node, which is "attached" as child node * of root_node node. */ xmlNewChild(root_node, NULL, BAD_CAST "node1", BAD_CAST "content of node 1"); /* * The same as above, but the new child node doesn't have a content */ xmlNewChild(root_node, NULL, BAD_CAST "node2", NULL); /* * xmlNewProp() creates attributes, which is "attached" to an node. * It returns xmlAttrPtr, which isn't used here. */ node = xmlNewChild(root_node, NULL, BAD_CAST "node3", BAD_CAST "this node has attributes"); xmlNewProp(node, BAD_CAST "attribute", BAD_CAST "yes"); xmlNewProp(node, BAD_CAST "foo", BAD_CAST "bar"); /* * Here goes another way to create nodes. xmlNewNode() and xmlNewText * creates a node and a text node separately. They are "attached" * by xmlAddChild() */ node = xmlNewNode(NULL, BAD_CAST "node4"); node1 = xmlNewText(BAD_CAST "other way to create content (which is also a node)"); xmlAddChild(node, node1); xmlAddChild(root_node, node); /* * A simple loop that "automates" nodes creation */ for (i = 5; i < 7; i++) { sprintf(buff, "node%d", i); node = xmlNewChild(root_node, NULL, BAD_CAST buff, NULL); for (j = 1; j < 4; j++) { sprintf(buff, "node%d%d", i, j); node1 = xmlNewChild(node, NULL, BAD_CAST buff, NULL); xmlNewProp(node1, BAD_CAST "odd", BAD_CAST((j % 2) ? "no" : "yes")); } } /* * Dumping document to stdio or file */ xmlSaveFormatFileEnc(argc > 1 ? argv[1] : "-", doc, "UTF-8", 1); /*free the document */ xmlFreeDoc(doc); /* *Free the global variables that may *have been allocated by the parser. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } #else int main(void) { fprintf(stderr, "tree support not compiled in\n"); exit(1); } #endif 0707010002b241000081a40000000000000000000000014cb7d88500000514000000b500010002ffffffffffffffff0000003500000000root/usr/local/share/doc/libxml2-2.7.7/html/parse1.c/** * section: Parsing * synopsis: Parse an XML file to a tree and free it * purpose: Demonstrate the use of xmlReadFile() to read an XML file * into a tree and and xmlFreeDoc() to free the resulting tree * usage: parse1 test1.xml * test: parse1 test1.xml * author: Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #include /** * example1Func: * @filename: a filename or an URL * * Parse the resource and free the resulting tree */ static void example1Func(const char *filename) { xmlDocPtr doc; /* the resulting document tree */ doc = xmlReadFile(filename, NULL, 0); if (doc == NULL) { fprintf(stderr, "Failed to parse %s\n", filename); return; } xmlFreeDoc(doc); } int main(int argc, char **argv) { if (argc != 2) return(1); /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION example1Func(argv[1]); /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } 0707010002b248000081a40000000000000000000000014cb7d88500000b89000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/reader3.c/** * section: xmlReader * synopsis: Show how to extract subdocuments with xmlReader * purpose: Demonstrate the use of xmlTextReaderPreservePattern() * to parse an XML file with the xmlReader while collecting * only some subparts of the document. * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader3 * test: reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp * author: Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) /** * streamFile: * @filename: the file name to parse * * Parse and print information about an XML file. * * Returns the resulting doc with just the elements preserved. */ static xmlDocPtr extractFile(const char *filename, const xmlChar *pattern) { xmlDocPtr doc; xmlTextReaderPtr reader; int ret; /* * build an xmlReader for that file */ reader = xmlReaderForFile(filename, NULL, 0); if (reader != NULL) { /* * add the pattern to preserve */ if (xmlTextReaderPreservePattern(reader, pattern, NULL) < 0) { fprintf(stderr, "%s : failed add preserve pattern %s\n", filename, (const char *) pattern); } /* * Parse and traverse the tree, collecting the nodes in the process */ ret = xmlTextReaderRead(reader); while (ret == 1) { ret = xmlTextReaderRead(reader); } if (ret != 0) { fprintf(stderr, "%s : failed to parse\n", filename); xmlFreeTextReader(reader); return(NULL); } /* * get the resulting nodes */ doc = xmlTextReaderCurrentDoc(reader); /* * Free up the reader */ xmlFreeTextReader(reader); } else { fprintf(stderr, "Unable to open %s\n", filename); return(NULL); } return(doc); } int main(int argc, char **argv) { const char *filename = "test3.xml"; const char *pattern = "preserved"; xmlDocPtr doc; if (argc == 3) { filename = argv[1]; pattern = argv[2]; } /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION doc = extractFile(filename, (const xmlChar *) pattern); if (doc != NULL) { /* * ouptut the result. */ xmlDocDump(stdout, doc); /* * don't forget to free up the doc */ xmlFreeDoc(doc); } /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } #else int main(void) { fprintf(stderr, "Reader, Pattern or output support not compiled in\n"); exit(1); } #endif 0707010002b247000081a40000000000000000000000014cb7d88500000c43000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/reader2.c/** * section: xmlReader * synopsis: Parse and validate an XML file with an xmlReader * purpose: Demonstrate the use of xmlReaderForFile() to parse an XML file * validating the content in the process and activating options * like entities substitution, and DTD attributes defaulting. * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader2 * test: reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp * author: Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #ifdef LIBXML_READER_ENABLED /** * processNode: * @reader: the xmlReader * * Dump information about the current node */ static void processNode(xmlTextReaderPtr reader) { const xmlChar *name, *value; name = xmlTextReaderConstName(reader); if (name == NULL) name = BAD_CAST "--"; value = xmlTextReaderConstValue(reader); printf("%d %d %s %d %d", xmlTextReaderDepth(reader), xmlTextReaderNodeType(reader), name, xmlTextReaderIsEmptyElement(reader), xmlTextReaderHasValue(reader)); if (value == NULL) printf("\n"); else { if (xmlStrlen(value) > 40) printf(" %.40s...\n", value); else printf(" %s\n", value); } } /** * streamFile: * @filename: the file name to parse * * Parse, validate and print information about an XML file. */ static void streamFile(const char *filename) { xmlTextReaderPtr reader; int ret; /* * Pass some special parsing options to activate DTD attribute defaulting, * entities substitution and DTD validation */ reader = xmlReaderForFile(filename, NULL, XML_PARSE_DTDATTR | /* default DTD attributes */ XML_PARSE_NOENT | /* substitute entities */ XML_PARSE_DTDVALID); /* validate with the DTD */ if (reader != NULL) { ret = xmlTextReaderRead(reader); while (ret == 1) { processNode(reader); ret = xmlTextReaderRead(reader); } /* * Once the document has been fully parsed check the validation results */ if (xmlTextReaderIsValid(reader) != 1) { fprintf(stderr, "Document %s does not validate\n", filename); } xmlFreeTextReader(reader); if (ret != 0) { fprintf(stderr, "%s : failed to parse\n", filename); } } else { fprintf(stderr, "Unable to open %s\n", filename); } } int main(int argc, char **argv) { if (argc != 2) return(1); /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION streamFile(argv[1]); /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } #else int main(void) { fprintf(stderr, "XInclude support not compiled in\n"); exit(1); } #endif 0707010002b257000081a40000000000000000000000014cb7d8850000005b000000b500010002ffffffffffffffff0000003400000000root/usr/local/share/doc/libxml2-2.7.7/html/tst.xml hello goodbye 0707010002b251000081a40000000000000000000000014cb7d88500000341000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/test3.xml This text node must be discarded content1 content2 too content3 content4 content5 content6 This text node must be discarded This text node must be discarded This text node must be discarded This text node must be discarded This text node must be discarded 0707010002b24c000081a40000000000000000000000014cb7d885000002b9000000b500010002ffffffffffffffff0000003700000000root/usr/local/share/doc/libxml2-2.7.7/html/redhat.gifGIF89a,)ÕÌË ÿÿÿ™˜  f³3Y¿ÏÏÏs¦3 ïïï@Îßßß&¾Œ?f ¥ í¨¦¯¯¯¿¿¿Y õÒÑ€ML000pppòÃÂ&ŸŸŸÕ=7PPPüððè–“ßjeØLG²€€€|pp@@@r âyuµÅ† =00刄Ò.(!ù,,)ÿ@€pH,ȤrÉl:ŸÐ¨T¨Z¯Ø¬vk-rµ³‚¸`ùj½æ£¸ß›']Es!›·~ÿ˜›íY3{o ,zD[mn% B ze[€Vz“E%z\ yo –“¸{!ŸX&{ §n Fªzg¿V„ ¤F{ÌCXn˜ÇLÅoY€n DK{çÍjnE$n G *è¡·ÍJ0$J%(䯔 Å–]4H€wE¦%Š–d“X©(tI.%Ü,šX5))¬ìRo¤6xTkOfÈÖz߬0 Ç†K”ûY°Jˆ=4ˆR p¢BŒFH,|#‘fS{\|ø ‚ÑN¼9$AB{4rÅÂY¢ PÜðˆ (0`Pƒ‰¹°tØË¸ñ€„ºz¥{å‡ã½5<ˆ`@TŸ;˜R¾âãò]C€à‚3ZÚF_azoZÎæðõÕÊÚµ‰¢pM´C«zW~`ö¬ñ㽓Ã~öE FѱÈH¼Ã„4®´´€Áýî‹1¾Ó oFF :ˆáËÿ2¥¾ýûøóë¿;0707010002b258000041ed0000000000000000000000034cb7d88c00000000000000b500010002ffffffffffffffff0000003500000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial0707010002b25d000081a40000000000000000000000014cb7d88500000c18000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ape.htmlE. Code for Add Keyword Example

E. Code for Add Keyword Example

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>

void
parseStory (xmlDocPtr doc, xmlNodePtr cur, char *keyword) {

	xmlNewTextChild (cur, NULL, "keyword", keyword);
    return;
}

xmlDocPtr
parseDoc(char *docname, char *keyword) {

	xmlDocPtr doc;
	xmlNodePtr cur;

	doc = xmlParseFile(docname);
	
	if (doc == NULL ) {
		fprintf(stderr,"Document not parsed successfully. \n");
		return (NULL);
	}
	
	cur = xmlDocGetRootElement(doc);
	
	if (cur == NULL) {
		fprintf(stderr,"empty document\n");
		xmlFreeDoc(doc);
		return (NULL);
	}
	
	if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
		fprintf(stderr,"document of the wrong type, root node != story");
		xmlFreeDoc(doc);
		return (NULL);
	}
	
	cur = cur->xmlChildrenNode;
	while (cur != NULL) {
		if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){
			parseStory (doc, cur, keyword);
		}
		 
	cur = cur->next;
	}
	return(doc);
}

int
main(int argc, char **argv) {

	char *docname;
	char *keyword;
	xmlDocPtr doc;

	if (argc <= 2) {
		printf("Usage: %s docname, keyword\n", argv[0]);
		return(0);
	}

	docname = argv[1];
	keyword = argv[2];
	doc = parseDoc (docname, keyword);
	if (doc != NULL) {
		xmlSaveFormatFile (docname, doc, 0);
		xmlFreeDoc(doc);
	}
	
	return (1);
}

0707010002b269000081a40000000000000000000000014cb7d88500001db3000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s09.htmlEncoding Conversion

Encoding Conversion

Data encoding compatibility problems are one of the most common difficulties encountered by programmers new to XML in general and libxml in particular. Thinking through the design of your application in light of this issue will help avoid difficulties later. Internally, libxml stores and manipulates data in the UTF-8 format. Data used by your program in other formats, such as the commonly used ISO-8859-1 encoding, must be converted to UTF-8 before passing it to libxml functions. If you want your program's output in an encoding other than UTF-8, you also must convert it.

Libxml uses iconv if it is available to convert data. Without iconv, only UTF-8, UTF-16 and ISO-8859-1 can be used as external formats. With iconv, any format can be used provided iconv is able to convert it to and from UTF-8. Currently iconv supports about 150 different character formats with ability to convert from any to any. While the actual number of supported formats varies between implementations, every iconv implementation is almost guaranteed to support every format anyone has ever heard of.

[Warning]Warning

A common mistake is to use different formats for the internal data in different parts of one's code. The most common case is an application that assumes ISO-8859-1 to be the internal data format, combined with libxml, which assumes UTF-8 to be the internal data format. The result is an application that treats internal data differently, depending on which code section is executing. The one or the other part of code will then, naturally, misinterpret the data.

This example constructs a simple document, then adds content provided at the command line to the document's root element and outputs the results to stdout in the proper encoding. For this example, we use ISO-8859-1 encoding. The encoding of the string input at the command line is converted from ISO-8859-1 to UTF-8. Full code: Appendix H, Code for Encoding Conversion Example

The conversion, encapsulated in the example code in the convert function, uses libxml's xmlFindCharEncodingHandler function:

	1xmlCharEncodingHandlerPtr handler;
        2size = (int)strlen(in)+1; 
        out_size = size*2-1; 
        out = malloc((size_t)out_size); 

…
	3handler = xmlFindCharEncodingHandler(encoding);
…
	4handler->input(out, &out_size, in, &temp);
…	
	5xmlSaveFormatFileEnc("-", doc, encoding, 1);
      

1

handler is declared as a pointer to an xmlCharEncodingHandler function.

2

The xmlCharEncodingHandler function needs to be given the size of the input and output strings, which are calculated here for strings in and out.

3

xmlFindCharEncodingHandler takes as its argument the data's initial encoding and searches libxml's built-in set of conversion handlers, returning a pointer to the function or NULL if none is found.

4

The conversion function identified by handler requires as its arguments pointers to the input and output strings, along with the length of each. The lengths must be determined separately by the application.

5

To output in a specified encoding rather than UTF-8, we use xmlSaveFormatFileEnc, specifying the encoding.

0707010002b259000081a40000000000000000000000014cb7d88500000842000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/apa.htmlA. Compilation

A. Compilation

Libxml includes a script, xml2-config, that can be used to generate flags for compilation and linking of programs written with the library. For pre-processor and compiler flags, use xml2-config --cflags. For library linking flags, use xml2-config --libs. Other options are available using xml2-config --help.

0707010002b288000081a40000000000000000000000014cb7d88500000547000000b500010002ffffffffffffffff0000004600000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/includekeyword.c #include #include #include #include void parseStory (xmlDocPtr doc, xmlNodePtr cur) { xmlChar *key; cur = cur->xmlChildrenNode; while (cur != NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"keyword"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); printf("keyword: %s\n", key); xmlFree(key); } cur = cur->next; } return; } static void parseDoc(char *docname) { xmlDocPtr doc; xmlNodePtr cur; doc = xmlParseFile(docname); if (doc == NULL ) { fprintf(stderr,"Document not parsed successfully. \n"); return; } cur = xmlDocGetRootElement(doc); if (cur == NULL) { fprintf(stderr,"empty document\n"); xmlFreeDoc(doc); return; } if (xmlStrcmp(cur->name, (const xmlChar *) "story")) { fprintf(stderr,"document of the wrong type, root node != story"); xmlFreeDoc(doc); return; } cur = cur->xmlChildrenNode; while (cur != NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){ parseStory (doc, cur); } cur = cur->next; } xmlFreeDoc(doc); return; } int main(int argc, char **argv) { char *docname; if (argc <= 1) { printf("Usage: %s docname\n", argv[0]); return(0); } docname = argv[1]; parseDoc (docname); return (1); } ]]> 0707010002b285000081a40000000000000000000000014cb7d88500000528000000b500010002ffffffffffffffff0000004900000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeaddkeyword.c #include #include #include #include void parseStory (xmlDocPtr doc, xmlNodePtr cur, char *keyword) { xmlNewTextChild (cur, NULL, "keyword", keyword); return; } xmlDocPtr parseDoc(char *docname, char *keyword) { xmlDocPtr doc; xmlNodePtr cur; doc = xmlParseFile(docname); if (doc == NULL ) { fprintf(stderr,"Document not parsed successfully. \n"); return (NULL); } cur = xmlDocGetRootElement(doc); if (cur == NULL) { fprintf(stderr,"empty document\n"); xmlFreeDoc(doc); return (NULL); } if (xmlStrcmp(cur->name, (const xmlChar *) "story")) { fprintf(stderr,"document of the wrong type, root node != story"); xmlFreeDoc(doc); return (NULL); } cur = cur->xmlChildrenNode; while (cur != NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){ parseStory (doc, cur, keyword); } cur = cur->next; } return(doc); } int main(int argc, char **argv) { char *docname; char *keyword; xmlDocPtr doc; if (argc <= 2) { printf("Usage: %s docname, keyword\n", argv[0]); return(0); } docname = argv[1]; keyword = argv[2]; doc = parseDoc (docname, keyword); if (doc != NULL) { xmlSaveFormatFile (docname, doc, 0); xmlFreeDoc(doc); } return (1); } ]]> 0707010002b265000081a40000000000000000000000014cb7d88500001cfe000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s05.htmlUsing XPath to Retrieve Element Content

Using XPath to Retrieve Element Content

In addition to walking the document tree to find an element, Libxml2 includes support for use of XPath expressions to retrieve sets of nodes that match a specified criteria. Full documentation of the XPath API is here.

XPath allows searching through a document for nodes that match specified criteria. In the example below we search through a document for the contents of all keyword elements.

[Note]Note

A full discussion of XPath is beyond the scope of this document. For details on its use, see the XPath specification.

Full code for this example is at Appendix D, Code for XPath Example.

Using XPath requires setting up an xmlXPathContext and then supplying the XPath expression and the context to the xmlXPathEvalExpression function. The function returns an xmlXPathObjectPtr, which includes the set of nodes satisfying the XPath expression.

	xmlXPathObjectPtr
	getnodeset (xmlDocPtr doc, xmlChar *xpath){
	
	1xmlXPathContextPtr context;
	xmlXPathObjectPtr result;

	2context = xmlXPathNewContext(doc);
	3result = xmlXPathEvalExpression(xpath, context);
	4if(xmlXPathNodeSetIsEmpty(result->nodesetval)){
		xmlXPathFreeObject(result);
                printf("No result\n");
		return NULL;
      

1

First we declare our variables.

2

Initialize the context variable.

3

Apply the XPath expression.

4

Check the result and free the memory allocated to result if no result is found.

The xmlPathObjectPtr returned by the function contains a set of nodes and other information needed to iterate through the set and act on the results. For this example, our functions returns the xmlXPathObjectPtr. We use it to print the contents of keyword nodes in our document. The node set object includes the number of elements in the set (nodeNr) and an array of nodes (nodeTab):

	1for (i=0; i < nodeset->nodeNr; i++) {
	2keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode, 1);
		printf("keyword: %s\n", keyword);
	        xmlFree(keyword);
	}
      

1

The value of nodeset->Nr holds the number of elements in the node set. Here we use it to iterate through the array.

2

Here we print the contents of each of the nodes returned.

[Note]Note

Note that we are printing the child node of the node that is returned, because the contents of the keyword element are a child text node.

0707010002b26a000041ed0000000000000000000000034cb7d88c00000000000000b500010002ffffffffffffffff0000003c00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images0707010002b277000081a40000000000000000000000014cb7d885000004e2000000b500010002ffffffffffffffff0000004800000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/caution.png‰PNG  IHDRשÍÊPLTE!!11BBZZcckkss{{„„„„sŒŒŒŒsŒŒŒ””””s””{œœœœsœœ{œœ”œœœ¥¥¥¥c¥¥œ¥¥¥µµµµZµµcµµµ½½½½cÎÎÎÎÎÖÖÖÖÎÖÖÖÞÞÞÞ1ÞÞ9ÞÞBçççç1çç9çççïïïïï÷÷÷÷÷÷÷÷1÷÷÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ_§ä\bKGDˆHñIDATxÚu’ÛŽ‚@ †ñÀ®bÌ®ÊIc¹APÛ`bxÿ³sBEíU§_çïOh¿<Îô`Ó'€á1û§wpŽÜä õW–Èt:%suá&³w,ÀHêéȯøf Øþ“Èü‚—²59 ævÀ:€Ç\^ F;`çªHãJ'Ê8‰ƒ71€›íZJ²Æ+ïçb²2B‘¢8·ÀŸ›¤Q§$×wŠéRKÕ ´v)ÎnR˜Áp¯t¤ß} Ì²ŽÅîéŸVb¢Tšz·Dç ±·vã@Ïí=”rPºþ—§¥duõ—Ÿvz{Nël;—a*CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturec70387830aa4ecd5a4a32a852283b3d6øP¶tEXtPage24x24+0+0r[ 1IEND®B`‚0707010002b279000081a40000000000000000000000014cb7d88500000484000000b500010002ffffffffffffffff0000004500000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/home.png‰PNG  IHDR#Yi†&PLTEŒ!Œ!)”)1œ1BœBJ¥Jc­cs½s„½„ŒÆŒ”Δ¥Î¥µÞµÆÞÆÎçÎÖïÖçïçï÷ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿòî¤GbKGDˆH“IDATxÚ­QÑà l)œ xÿÿ±£Y¶,]Ò¾”„âå8uÁu,÷q¼£»Å™N!`’œîRN`Mè}‡™%,»ióímˆõ¡‹ )ûΪš +¹· šC²©<ÙóÍqU;pZÚ–ÔüzJky¯à ƒŒà4ãy|Ÿ¨50ܦyì³k»ù/.ã Ì×j*1ÝCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature154332ef94ba5222343b4126d6035f91ìïé€tEXtPage35x15+0+0~FòIEND®B`‚0707010002b282000081a40000000000000000000000014cb7d88500000457000000b500010002ffffffffffffffff0000004300000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/up.png‰PNG  IHDR#Yi†&PLTE„Œ!Œ!)”)1œ1BœBc­ckµk„½„ŒÆŒ”ΔµÞµÆÞÆÎçÎÖïÖçïçï÷ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²»™~bKGDˆHfIDATxÚ•KÀ mëAîÙÖI+¤oÁ†É@^P?á'#H];á°<ùR‘Í[æPeéâ0œ2&t<*§Ï¬‹7Sm¤Ô&Ji»Gš¾ ËËß=φKa1{Þäg´ ¦ưCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature2772383288e9cce11a512e2a8adf37b0k ´tEXtPage35x15+0+0~FòIEND®B`‚0707010002b27f000081a40000000000000000000000014cb7d8850000013e000000b500010002ffffffffffffffff0000004a00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-blank.png‰PNG  IHDR ¡kd0PLTE€€€€€€€€€ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿO&IbKGDˆHIDATxÚcøÿ¿ÿ?|`ø h  Ì”ÐBÒh±àCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturef7e388dabd4ef0097714b5643fdd3cfbb†œÒ tEXtPage15x9+0+07vð¸IEND®B`‚0707010002b281000081a40000000000000000000000014cb7d88500000108000000b500010002ffffffffffffffff0000004900000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-plus.png‰PNG  IHDR Èä)‹bKGDª#2#IDATxÚchÿ`À¥ÿ#óðò@ÈC"Ô£™j?RJl²d™:4CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignatureab17802e1ddae3211b1ce6bc3b08aec7{ú¦( tEXtPage15x9+0+07vð¸IEND®B`‚0707010002b27e000081a40000000000000000000000014cb7d885000001c1000000b500010002ffffffffffffffff0000004400000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/tip.png‰PNG  IHDR*Þ bKGDª#2ÛIDATxÚu’»à @!+xŒ¬’6¥K—¬àR+hJ·”–TaK >ßžþRh~j?ïg0qF@”Ÿøƒð!¢ÊòeH,î…0܆x˜”0‘&p „^—µªJéÄ5y»=ôJØ % P<†*ÄŸ{Œ®”¨…Š–×Âj÷ #û7±^ñóŸÍL~Ù!=™ ä&Ṳ; ‘&rgߊFâm‰¬Í©×Pý•¬Ö;Ùä óot6BöJäqC ìXduÀê³Ýi]}OLð4+|) -íCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignatureee9d877396ce267aeb0179d35f81b2ac3ú'tEXtPage25x24+0+0¾ñ ¯IEND®B`‚0707010002b27b000081a40000000000000000000000014cb7d8850000047e000000b500010002ffffffffffffffff0000004500000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/next.png‰PNG  IHDR#Yi†&PLTE„Œ!Œ!)”)1œ1BœBJ¥JR­Rc­ckµk„½„ŒÆŒ”Δ¥Î¥­Ö­µÞµÆÞÆÎçÎÖïÖçïçï÷ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ1£`ábKGDˆHIDATxÚ½‘á à „Uâ\³¶&†{ÿW]«ÝØŸ2!BrwA~Ÿp)#Õ€6î¯L£è2ó»²è”ÅD@•nöR²ÌŒ¥ÅQK%+÷uKe›hÜ݇ YA=õììqfn ŸWRÓ™±[Pßz¯ 2ëÑñ4æµ±˜¨y¯,Ǭ¿ü×:l&ÕXDzìCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturebcb022e8ade53bb4f94fb0f70d7c0a8cuœktEXtPage35x15+0+0~FòIEND®B`‚0707010002b27c000081a40000000000000000000000014cb7d885000001ea000000b500010002ffffffffffffffff0000004500000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/note.png‰PNG  IHDRÅb$bKGDª#2IDATxÚe’!’Ã0 E}¾……K C ÿtAQCACQAÁ+g“4m¥ÉŒãçoKß.ã Ÿqþ•c ¢üô D«Ô="¼ú²s ˆÇ%‚äd¼ÇœH ô1Ÿ›à²ÿy%ØM8ÓöfÈK ¢wª¬Öµ>i6g-NpÖ‹˜Y‡tL#÷ßŸÛ a–Žb;UÍ#2ÇØV} °Ô£rßVŠx¬]ÛzTîT÷1úºÜO HËè4Ý]o žíÕzÌÎ§Ïæ™gç"Ó’NþåHl¶ó§‹U÷‹Äuýœß¯–Ñä9¾<†t‘,×tÓß_‰)2Håž•÷d úkBCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature3bd747c5e45807006b090dd3e7a26c44Ó“útEXtPage24x24+0+0r[ 1IEND®B`‚0707010002b280000081a40000000000000000000000014cb7d88500000103000000b500010002ffffffffffffffff0000004a00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-minus.png‰PNG  IHDR Èä)‹bKGDª#2IDATxÚchÿ`À¥ÿÏg  I×j?}-p®ZóºECtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignatureecf413ef47524404f90c44d8c7d12a2e݈þš tEXtPage15x9+0+07vð¸IEND®B`‚0707010002b283000081a40000000000000000000000014cb7d885000004d9000000b500010002ffffffffffffffff0000004800000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/warning.png‰PNG  IHDRשÍÊPLTE!)1BJRZks{„Œ””{{œRRœZZœ{{¥¥99¥JJ¥„„¥””¥¥¥­­11­””µµ))µŒŒµœœµ¥¥µµµ½½­­½µµÆÆÆÆÆÆÎÎÎÎ))ÖÖ))ÖÖÖÞÞÞÞçç!!çççïïïïï÷÷÷÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿp;ã”bKGDˆHèIDATxÚm’}o‚0Æï”MÜæÄé¦5…%¼•%m ßÿs­ìzP“^ÿ ²¥UDÂýKnßk[;Ò»?0n!¿œqCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturec42b7d2d564aab588891979703f02b45Oß“tEXtPage24x24+0+0r[ 1IEND®B`‚0707010002b27a000081a40000000000000000000000014cb7d885000002d2000000b500010002ffffffffffffffff0000004a00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/important.png‰PNG  IHDRשÍÊäPLTE)))999BB1ZZ)ccBBBRRRkkBccRssRccckkk{{{ŒŒŒŒ9½½­­!­­9œœZŒŒ{œœcœœ{µµJµµR½½Z¥¥c­­k­­{ÞÞÖÖÞÞ!ÞÞ1ÞÞ9ççïïïïÿÿÿÿÿÿçç)çç1ïï1ÿÿ!ÆÆZÖÖRÎÎsÖÖcÖÖkïïBççcçç{„„„ŒŒŒ”””¥¥„­­Œ¥¥”¥¥œ½½„½½œ¥¥¥­­¥­­­µµµ½½½ÆÆÆÎÎÎÖÖÖÞÞÞçççïïï÷÷÷ÿÿÿ­ÒÃÞbKGDCgÐ bIDATxÚm’ SÂ0 Ç3Eñ1•¡ÀÔÉKÜPT”•‰F'µûþßÇ®Qïö¿ë]’_iÈK±B¥&ºF‚(å6àßñrúðcºŒ/‘Ñ´…\NÞÃh£°›* â2pã¹=…:©ôJí÷v•?°•¾ÿ 6Ôï| @}÷`ÿ^Û>ƒ¯µs P¿ÕvB¡É¨é@Ãd6"èo;g•`PsÎ+ÁÝÞÖs%˜Çǯ%@ÈS{4ñܾ•Už-µs"þ1чßÄ?øjª<`g ­ñeZÔ* Ô+½ƒÃ¦Ú2Ã_Yvì*ÿÁ¤è•lv¬~Œg Z¶[s“ôY[Ãa; =ùí/öoJĘ!¤f€þcl¯RmÌRCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturec3ecc1fc5135d1e959695e569d213122riðIEND®B`‚0707010002b26b000081a40000000000000000000000014cb7d88500000176000000b500010002ffffffffffffffff0000004600000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/blank.png‰PNG  IHDR€€L\öœgAMA± üa-IDATxœíÑA À0À¿çMF4 z×;3'ÎÓ¿kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À€5kÖ¬X°` À`fýHfIEND®B`‚0707010002b26c000041ed0000000000000000000000024cb7d88c00000000000000b500010002ffffffffffffffff0000004500000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts0707010002b270000081a40000000000000000000000014cb7d8850000015e000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/3.png‰PNG  IHDR s;bKGDª#2xIDATxÚ%N«Ã@ 4ô†^¥´0°+ ì »F``¨a ¡+§&–ÞÓU¹¹ª² qXÒ çqî K ࢵ‚Ð]pêÁ›qðËŸø3×&”=èÛ¿-#—ùõž™S:ºbÁmìRÎ&jçüQ¸5cüëLCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature80bbda2726ddace8ab8a01f59de2ebdbýutEXtPage12x12+0+0„m»}IEND®B`‚0707010002b271000081a40000000000000000000000014cb7d88500000159000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/4.png‰PNG  IHDR s;bKGDª#2sIDATxÚ!…0C#‘•Xdee¯P‰Ä"‘\£òËo+{%leåʰ!bç½ÙÌ$ûci 1 qá dCwC‚ôèmJVàÁ$‹Ë6ïhu•œTšj~<_­Â²ä¹|ËÀù™ó㣴 KªF¾ê6Ž[ê¼ÃCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature9f82fcac9e039cbdb72380a4591324f5€»øvtEXtPage12x12+0+0„m»}IEND®B`‚0707010002b272000081a40000000000000000000000014cb7d8850000015c000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/5.png‰PNG  IHDR s;bKGDª#2vIDATxÚŽ¡Ä0  †ª—ðõ†~+_Bh  áýIlgvö’—ÅÏM‚áÖZmÖÃmã†Àwb$|SÜq$Ìñ^€%Ô)%¤•°ÞÔèõYP3ö]2­QÙjµ%—›õ|ç#[7/B_ûCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturefe690463379eb25e562fcc8cc9b3c7e0ß²9žtEXtPage12x12+0+0„m»}IEND®B`‚0707010002b26f000081a40000000000000000000000014cb7d88500000161000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/2.png‰PNG  IHDR s;bKGDª#2{IDATxÚŽ¡Ã0 D?44,5,ô ]£°°Ð+†f„¬ÐK UÉG¤{º÷u¸ÛÖkí»¹ãSàÞ@¦cB»æïSCá¸hS‰øž¤{ë2y–4Cm¬s^ö¹% Ðû D¯§+O£ŽJ)}‹:TÙ5`Ÿ/£CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature80eae529c94a7f47deccfada28acb9dfåo± tEXtPage12x12+0+0„m»}IEND®B`‚0707010002b275000081a40000000000000000000000014cb7d88500000165000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/8.png‰PNG  IHDR s;bKGDª#2IDATxÚŽ¡Ã0  –†v…¬Ð¼‚a` × 544T¥ é?Ý»/TõÜ—¸W[Б!Dغ…õ¹[`TÈ3Ð(”fñ•põçï¹g¿ˆcµÁÙ3Á1–Ø¿.0µ”>Џú_ê³ +U­9Æäïü£Ÿ9ºFbíCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature57be19505c03f92f3847f535e9b114e9Ù4kCtEXtPage12x12+0+0„m»}IEND®B`‚0707010002b26d000081a40000000000000000000000014cb7d88500000149000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/1.png‰PNG  IHDR s;bKGDª#2cIDATxÚUޱ À0¿¤ô.)½Bf£té6#d¬Á”H¢(ð'¤ÿ‡»ÍÑÚXæW¨¬ 9c±A€M-!d>°0(Ï* ?ðœ/Èc}ÜÖ®5u„‰ÆŒ:Àx,ìÁT´CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature58a072e070da22f6135cbd3e414546f9hj!ítEXtPage12x12+0+0„m»}IEND®B`‚0707010002b273000081a40000000000000000000000014cb7d88500000163000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/6.png‰PNG  IHDR s;bKGDª#2}IDATxÚ!Ã0  š ú ýFa¾PXXj˜'”ú ¡†‚‚ªÌnçnöˆˆó©ºµ „oPêHÈÜl\BuNØ­«ð!‹«i`¥À°ÞûdÂÝÛ'äì× ¿ç,ÃË–eøÔ¸g¡NL©¤Lï< ÿV‘õðˆ?³s8ê ¸YCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignatured25d7176d67a038afc1c56558e3dfb1aýõµtEXtPage12x12+0+0„m»}IEND®B`‚0707010002b26e000081a40000000000000000000000014cb7d88500000169000000b500010002ffffffffffffffff0000004c00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/10.png‰PNG  IHDR s;bKGDª#2ƒIDATxÚ%Ž¡!C#‘H,‰œN^ [¶p‰\»%Œ¤${‰Ì;‹û/yI@ò’à¥l\â\òyˆSM³}ßi㎋ªŠs¢à×uœÈŒèºËÿaˆXÌ  ÷eøÚ­ÀÜvù¶G¶j…É!=£dçRµ;?Ý¢CbË kCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature386e83bb9bdfba3227f58bb897e2c8a5Ÿ+ tEXtPage12x12+0+0„m»}IEND®B`‚0707010002b274000081a40000000000000000000000014cb7d88500000158000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/7.png‰PNG  IHDR s;bKGDª#2rIDATxÚ%Ž­…0 „OV"Y!²²‰¬ìL•O¾•¬Á Hdä‘+‰H¾äò’£ší‡“ ×e _ÊÐpD—²ã„l½ðC›0T+ÈÊ«+¤® ’VA†jÝ“ ƒ{ŒO•9ølsLGÉIÉz¼ó>61¿GVSCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature298368142ac43cebd2586d8d1137c8df&9é™tEXtPage12x12+0+0„m»}IEND®B`‚0707010002b276000081a40000000000000000000000014cb7d88500000165000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/9.png‰PNG  IHDR s;bKGDª#2IDATxÚŽ!„0 GFVb‘ÈJ,²¹WX‰ä È^Y¹’kTb++#³©É{“?/ù˜YÙ—y/j†é!ÀÚRj»”Ç+“~ “àöEœ#y@„§·öà·‘š!âî¦s².Ôg±þ…E±‡íÒëOÍr /¯óŒP8bÙÒûCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature34623e5e4d48310e409b280afe247602Ô14$tEXtPage12x12+0+0„m»}IEND®B`‚0707010002b278000081a40000000000000000000000014cb7d8850000442e000000b500010002ffffffffffffffff0000004600000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/draft.png‰PNG  IHDRŒ¶K°ZJgAMA± üa IDATxœíÝÛvÛ¸–…a<ËNºG¿ÿ3öèŠmQ<¢/Ö·¶’€ øW®TB1rÌ©,ÚZ«ˆÏ4MY–m}[2[ߟ躮m۾﷾‘-å[ßïu]w¹\¦išçY)U–åÖw´ *i@\–„VJãx¹\[OSI"rÐbùâ€õ´¦q ‰ ½È󼪪ªªÂßÕ†¨¤Qø&¡•Rã8*¥´Ö‡ª§ iÀö¾Oh!ãÞÖÚãÔÓ„4`c·$´RJk-õ´Rê 9MH¶tcB/•Ó„4`3÷&´8NNÒ€mô}ÿ@B‹ƒä4! ØÀc5ôµ#ä4! mM }mÙç$Õœ&¤Aõ}ß¶íú„Vè÷fïn@8z1 Ã0 KZ§„„ã<¡•Ryžc’Úsœ„Vì8ðÚ BàØÿýßÿÍóìöšLhÅp7À­þù‡„v…8Ã<´[ wÜ`Ú9*i€$´„4`-ÚB° í! xb^Ñ8x5´oTÒ€GÐÒ€»‘ÐaÒ€û0 sÒ€;ø«¡ëº&¡ß!¤·b”;0†»7¡†üÌkBC}Ž÷ðb$ô÷xkßñ”ÐeY’Ð?âÝ|‰„Þoàs$ôæxŸ ¡cÀÛx„Žïà?ÐñàÍü Þ/À¿üù󇄎 {w”¢†Žï€:R¼qptþüÇÑí5Ih'xïàÐHè˜1' ÇÅæ¡•RÓ4EAB;Ä[ ÇòÏ?ÿøHh¥”ÖúõõÕÓʼn€ñ1}ÍZûòòBN»BHÀQø˜‡þˆœvˆ€Cð4ý)rÚBÒ2¡9í„¶Ön}|ÏCCkýëׯzA=í •4Äew ­®êi¯}dêxõ4! ùóçÏîZHNWUŸ·C„4Äb/óÐ_a~Ú9B¢°÷„ä´[„4l/„ä´C„4l,¥„ä´+„4l)½„ÁrúÏŸ? ç4ë¤`3©&ô‚õÓ+mÿ-€cŠóä ·8z%*iØ@ò5ô5©§»®›çÙë ¥WOÇõ€#xyy9NB«€ûœ¤7?Ý÷Ò6ϳóí3cNh¦Lkظw¤ßNH•1&Ïó¦i´Ö®.yB Öe=€9iØÀ4Mã8¶m»ršv/ ½ ßû.ûø¦@b²,Ëó¼®ë5ẻ„VÔÓw¢’€Í¬©§÷˜Ð êéíï[ Éx¸žŽm=ô½¨§oD% »·ž–º®kß çõôvù R"õôeñ2ʽ÷„Vìï}B¶·äô÷ë²v=ý©%§½þö»~šánˆÅ4MÃ0\.—OǽÓKèkmÛú÷¶Öþþý{_ãÞ„4Dä«ùédæ¡¿ §ÕÞæ§ü8Z¹9ɧýÞGHh¥TÓ4ô{¿C% μ¾¾Ê$ëʤ¹®§’Ð êék„4¸!§OºÊTÉé®ë²,;NB rzAH€×çC»Êéyž§iʲ,ÉN±ï‘Ó‚€µ®Z¸Êik­«Ã²v‡œV„4¬ô1¡ÅÑæ’} §7„}•ÐJ©yžeѳïŒIýÞ„4<蛄äôz’Ó¾gå£ÍiBñcB rz½¦iªª:æþÞÌIÀÝnLèóÓë…™Ÿ~~~.ËÒëKÜ…JîóòòrWB+êiÂÌO¿¾¾ö}ïõ%îBHÀž¼$§× 3?UNÒp«•íEäôz2? ,’œfNnâªXk]–%óÓkg~šJ~æ°õ×ZK=½Òqæ§ iøÁbß›çyÇqË|ØArš€ïøØæBkçyžç‡Ý—Û‰#ô‘1' _ò‘Ь™v«mÛ®ëæyöú*[ÍOSIÀçHè]³ÙVýÞ„4|‚„Þ‘óÓZëMršánx„Þ£$×eQIÀ ¡w*É~o*iø·{Oθ Rbõ4•4ü‹óõЊ„.±uYTÒ £ÜiI¦ž¦’_;–Ð[I¦ž¦’ptÔЩJ ž¦’phž:Ïszs ô{SI8.jè#Øu=M% à HèƒØõü4•4€#b=ôÑì´ž¦’p8¬‡> ÎOÒŽ…QîÃÚcNÒ„„>¸Ýå4! à(Hh¨½å4! àXEÓ4UUí"§ iéó´ëgžçMÓÐ{T×õ.rš8£Ü$ô®Õuÿ¸7! eþF¹IèÄ??MHH£ÜøQäóÓ„4€4ù;}’„NLÌóÓl Ažvý¤†NØåréº.¶}C©¤¤ÆÓ®Ÿ$tÚ⬧ iI¡S ‹0§ ié S +Å–Ó„4€D°NDµ~šÆ1)`”nEÒGF% `÷Hh8ɸ7! `ßHhxCNÒvŒ„†W›ÏOÒöŠ„FÛîïMã€]bO1„´U•4€ýñ±§ë¡ñ­æ§ i;ÃÉØÄ&9MHØ ŸÓ„4€Ý`O1l.XNË?uBÀ>°/7" §ó<·ÖZks¯®°Ú Q©ëZ)å©ß»(ŠªªŠ¢ÐZSIˆ yª§¯Z1Ü r$4¢å|?²w ­ØÌ@ÌHhÄÏÕ>'ZQIˆ ]p2îýiB+B@œHhìÈÊœþ*¡! B$ôÓ49÷ð£‡sú›„VJ± @\Hè5Æq†a†q›¦ÙúvŽåuYß'´"¤D…„^Cºm[¥Ô<ÏJ)r:°»rúÇ„V wˆ ½ÆuB+¥æyîºnùOsã¸÷- ­¨¤D‚„^ã]B ÉiE=œÔÓ}ßu ê ­i1 ¡×ø4¡Å<Ïrž9˜ä´RêcNߞЊ°9zoZLÓDNoâÓœ¾+¡! `[þº®kZLÓĸ÷&Þåô½ ­i¢†^ãÆ„Œ{oeÉi­õ½ ­Ø»ÀVHè5îJèE–eeY’Óáõ}/‡—ߕЊ° ¯£Üyžøác -Èé­XkïMhÅ:iá‘ÐkHBŸÏçÇþ¸ô‘±~:¼ZQIÌGBk­‹¢8NB¯XcLUUÔÓñ£’ ½Æ8Ž}ß?\C_“>2êéøÒ!¡×úr¹<6júãÞ»@H„^ÃÕ(÷;Ó4MÓôÕÖ•ˆ! À;O }¨N1%ožçEQ$ÿî! À/5tÓ4ÉÌÊ^îoäy^UUUUί ‡èîà£Ükx­¡Iè] ’à £ÜkPCCÒèÐi£’°™ä÷÷–õÐ>jhú ¨¤l,Õzzåvþ˜e”û8¨¤l,ÉùiNÒ¶—XN“Ðp……drš„†CÌIˆÈ<ÏmÛîw~š„†[„4€¸ì7§eµ ‡îcLÓ4»÷^NŸ$¡á! :»ËiO»~ZkIèƒ#¤ÄhÉéø÷9ñ·ëgQ$ôÁ1' ^ñÏOÓ)¯iQ “ÓÆ˜ß¿ß›Ó$4|c¸@ÔÂÌOÏó|ï¸7 i±‹°lésžÐY–‘ÐXÒvÀÏyY^χæl+\cNÀnë#{~~βìÓÿëu”»,˺®Ý^»F% `7‚{¿¾¾~ú9ÀSB[ke”›„Æ;TÒvFêé¾ï½>¾>ÖÓžv,QtŠákTÒvFêé²,ÔÓÓ4-ÿé)¡éÃ7¨¤ìRÈùi¥546AHØ«09­µ®ªªë::Å! `ÇÂÌOû@BãÌIرe~ÚëúiçHhÜ(ßú`Éi¥”ïqoWHhÜŽJÀî…Y?í »Äþn±‹œ&¡q¯xÿ5À]"ÏiˆñŸ2<&Úœ&¡ñ˜¸þÀJæ4 ‡Åò\‰*§Ih¬±ý¿`pnÉém×O“ÐX‰uÒÒ´ùúiëQIHÖ†õ4 'i)ÛdßP®Ò8§Ih8Äœ4€ô…œŸÎ󜄆+TÒ!غ¬¾ï§iòú8BÀQ„Ééyž_^^Èi8AH80ýÞä4\ÑÖڭç¹m[ßóÓÆ˜_¿~eYæï%<*i‡Ã¸7ö‚pDä4vánÇ5ÏóåréûžqoĉJÀqcêº.Ë’zq"¤Ú’Óô{#B wãÞˆ•40îHÒ 9(Ò@\Æqô}¾BN#6ÌIy}}íû¾,K9îP)åû4|f~Zkýû÷oæ§ñ=Bˆ…$ôòŸyžgYVU•1†¨Œ>2D‚¢ð.¡¯UU•繜 áu™®‘Óˆ! lVJYkµÖEQäy^UQ ãÞØ! lìû„’ÓBf¬}¶A=mÒÀ–nIèOÑ\ 9 ÒÀfNh¡µ6Æ”eYE–eÖþ0î­ÒÀ6V&ô5kmÓ4Y–IaMZû@Nc„4°‡ ½0ÆÈª-9+‚1pç÷Fx„4š„^H]×u–eEQ( k§ÈiFHA½½½u]æµd5càn‘Ó‰ ™Ð²jË£µ–šæ2WÈiCH„LèOITSX;AN# Baó„^ ë<Ïe/)²7¼¥½£ßÒ€w›'ô;²s™Öyž+ ëGQOÃ7Bð+¶„Ka-;—åyΖà!§á! xgB¿ó®°&ªï,§ŸŸŸeäÇAH¾ì"¡¯I[ÙÒ\†Û‘Óð„¼Çñíímš¦­oänƘ,˪ªÊ²Œæ²Û‘Óð¼°ÖÊÎb; 9­µDµ4„+šËn@NÃ9BðeÇ———½ÿˆÉ.(Ò_FsÙÈi¸EH¾LÓÔ¶m×u ›Œ{7M#ƒá üü!§á! xÔuÝÛÛÛcVk]E<o­•„–½Pèÿ9 WiÀ£išÎçó0 üYkm]×yž_.k­×Çý½¤§¬®kc ÍeŸ"§á! øÕ¶­¤ì½ÐZ›çùét2Æ ÃÐ÷ý4MñüÀZkeÜ[¢ZŽÅÄ5rëÒ€_ÖÚ?þ<¶K"°ª*­µµ¶ëºaÆq”ýœßêÃd \ZÁi.»&9= ƒ×ÅxZë_¿~‘ÓI"¤¿¬µRL?|…_¿~-uª„ôc¥¹WR÷Ks™ÖšÀXPOc BðnÇ?þ<üÇó<zzºÞ·Y¢ºëºiš",[—ƒ¶h.aêir:I„4àÓmÛ>–XRž–eiŒY~Qʲ¶m§iŠm\nFXË8'CÓx ! „Ð÷ýÛÛÛÃ?n‹ia­¦i†®ë¢jÿ^Èзl ~ðð`~ ¤¬µooo}ß?|…ªªžžž¾ú¿òèïº.¶ÅZêoa-càÒwØæ2r÷"¤¬µ}ߟÏç‡âŒ1MÓTUõÍKÌó<üõèúu}zÇ1ÇÀeÆi yž_^^Æq|¸ˆ,˲išï³ÍZ+diu„«w]·æ eY>???–²Ëø<Ïã8>|^ÉsIšÀ¥¡=áÂ:Ìü´"§÷‰‚’yâ———5•“Öút:•eùp5,·!MàÑFµÈó<ùæ2êi|…B“C¦W®*ËRN±|ø ÒD6Žã<ÏçóYýÝj4NÒ\&ýeI6—ÑïOÒÀú¾yyY™4·/ÇúÑ4M²a™4;¹¦×;—©äÆÀÉi|DHbzå¾`EQ4Mãêi+…µ4Ë”yÌcÌua½õí8Ãü4Þ!¤m¬\‹¥”ÒZ?==•eéê–„µvÇqû¾÷+i­¥ \Þ„4ÒšœÆ5BØÆ<ϯ¯¯+›¶Œ1¿ÿöN²FKvA‰v'ðE–eRXgY–@T‡Éé<Ïe-Ÿ¿—Àz|Œ6“çù0 +g¦û¾—ÎgWw%äÙ]×µ¬Ô’>p·/áÌ©_.—º®%°w}Жœ ._{Êé,Ë\54À+*i`3ã8¾¼¼¬ü,ŠâééÉw&MÓ4ϳÌXKõsíºÜߺ¬,ˤ›2:~„4°‰½óù¼2Hš¦Y /dëïišú¾—IëÈóÏS×µ´˜©¸?U|ÅǸ7 ½/ w›‘ÕׇÇ0 r:…“»úŠþ«( ‰ 9b+Úú²þ{9½CVmí+ª—qoWG™‘лC% lìíímÍ.¡J)kíóó³„P0RU/Mà‘?Id·2iÏó|_Qíªž&¡÷ˆ¶$‡^œÏç•u’œº~×LY]}¹\duuœGa.äÞ–-Á#¿ÛkësÚs:HèÝa¸Ø’ ÆfY¶2¤eqsø>)y9i/ŠBšÀ£ýè/7v¹\´Ö}ßËY[Zëøske¿75ô~QI“búõõuåuò<ÿýû·“[zØ<ÏÖZ9bKÒ:æRUâ¹,K™ÑünÕ£õ4 ½k„4°½q___§iÚE›÷¤›Lvïû^ÅÝ®e­½ŽêÈXß›Ó$ôÞÒ@.—‹EµÆú£±Ü’#¶Ú¶uÕœì•4ÛKs™“®{OnÏiÙ±DÖ‹‡¹78Çœ495yeûn×uEQnóþ†l -3îRXÇÕó<Ë(ýRX—eáøë²Hè4PI±p²KŠéðmÞß“çŒë7o CŽÅ”íP"ܹìûzš„N•4kmUUÃ0¬©5µÖq- 'gUåy.Û–E¾ºZú¤g^VmEÕ\öM¿·lµFB§Jˆ…ì%VkÄ63ýÑõ[ñw–)¥¬µÒUUIUÉ ¬§1MÓÐÉ ’b!Ûú–#¡b~F/GlÉøü0 2„Iò}¤µ–#Fdƺ®kYà¾õ}½¯§åN•4‘išÚ¶íºne\Õu}:\Ý•o2î-Û–y=AÙ!éÏó\šã¶ýx!õô4MeY’Љ!¤¸8Y‹eŒyzzŠ¡Ô»4W÷}ßu]ÌUµÉiY¬%…õ¶Íz²•ºô¸mxpŽán .eY.3µ“À‹§Ëé2×+{‹n}/?“7VJ—éê­VmI/zàE|S¸HM¦õªQ.kíù|–µ×ïÍ·qåøË}¶P7NÇQñ”íP¨há! ÄEk]–¥œ(µæ"J)©ðöxÃ0ÈÄêçàäM–¨^šËŒ1yžïî3¢Âœ4éº\.+¯SÅóóó.b× ý)kmñ—ŒgìâØPIÑYæWaã8v]W×µ»[óbY3½õ¸$ËH{_-{ƒo}_Ø*i F®Šé²,Ÿžžb®áÒ«¡?%­²D*Ë2ÆÀq#*i FNÚÇ”R}ß—e)ûqFHjèäZýÝdt iYµEs~D% DÊZûòò²~¸ªª¦i"̃ƒÔП’¡oÙœÂß ’âUUÕú †!Âiiç5´ìã±—‰íyžå”Y¯UU…5>E% Äkš¦××ו;eÊùZQÍL/bº,˺®§i’^-ÙËÅÉňgç2Ćâe­íûþõõue¾fYöüüÉÓ_zW\Z*Q9ë³ë:Y²ìêU|³ÖcŠ¢Èó¼,ËxÚ¶i jÃ0œÏçqW>²›¦YŽKÚï„^XkåÐ*‰êø7¿&çvÈ)a‘|´ÂVi vooo]×­¼Hžç§ÓiÛí}$tQß·ÅÉ6æmÛÊ4°«—@6,«ëšM¹Œï=;i[Ù%Ç!»º¥«¡?þ69LŽØ’ F\݃Wò©BN‰ÞÑ0Ü"¤Ø9Ù[vGÉó|“âeµ•« Þ˜Ð׿_k}:Æq”C»­µ‘#J+Yžç$ô‘Ò@ìŒ1MÓ¬ï…–ÃšŠ¢üÐw¾úÞ„ò·Îÿ’PRª:¹+·äˆŽ¢(X—up|ûݼW†œŒ÷†Ohçë¡Hèw²,“ÓG꺮ªJEvúE–eMÓÐP4Ž{ÑuÝúµXZë§§§`»„FRCO¦iêº.†ªZNHhB؇yžßÞÞÖ7^ÕuÝ4M€ÂÑߎ%>ÒK¦¨¥èßpuµÌC“ÐXÒÀ>H„´m»ò:Zëççç¢(œÜÕWö•Ð ‰j™«–mËBƒ“Ðøˆvcžç?þ¬\I¥µ–‰XI°Ó„¾&CôRX‡'¡ñ)þ5{"F®¹‚TŠþ Dç ­µœÐJ©,Ëdû—§§§Û‰Ðø •4°'ã8¾¼¼¬_‹u:ä8W7&¨¡ß‘C$e w>NB㬓öÄSUÕårYsIyžÝî F ýñ”RyžËª­yže ÜÕöm$4¾GH{bŒq’¬}ßEá0¤Ó«¡ß‘C$1ÏÏÏKgÙÊmËHhüˆv¦ªª¾ï×/†ÁUNoµ/wxRXËBó¢(–F¸Ô²ëglGD…vÆZ+Gn¬qÕZËŽë7_jè5¹mB/䓳Ÿ‹¢†AÎļ=­—„æ$J|/ÒŸ_‘qW'½K—Ëeåètò£Üß“ïEUUOOO§Ó©,Ë[Þ‡e_n?¢»ØYFõöö¶ò:Y–É!ÓEþÁú#YT-Uõ8ŽŸ¾«ìú‰»0Ü ìÖZŽIž¦iMI-ÝOí>FB”e™,°VJɦåïfHhÜ‹JØ«¶m×ïjŒyzzº7§Iè[,çvÌó,ÓÿMÓ0»PI»d­-ŠBÖ­¹ŽT{wx“Ð7Zή–ÕÕUUI©½õ}aOi`—¤e)˲õ;K·m+Ê·üfú^˸µ6Õ¿#üá_ °WZëõ‡NÊ¿1t}ì)VE ½6‚­ïûÃ?`ßœ:ÙuÝ¿ÇÓ®ŸMÓ^ÀWøÙ@ÔìÚúv¢“e™ì~µ’Lš~óHh`ÌI#"²¬ÈZ;ϳœA$[k-7ò…ÖZ~›¿SwA~X¹%§¼ÛÒüñÿú˜‡.Š‚„~DHcKKOÓ$t(¥–Ó%9ä u5«gŒ‘Þæ¥yJ]EøÑHSÒú}³»®Ë󼪪w¿NBb4¶!¬”êºN¶Ôx¬,–zZ‚JjJõ·ê8¬µ///+w϶ÖÖu]×õõÇØ•4‚’†A6yX¢Zbõp•¹êyž‡aM¸deꡤZkó<—ш‡/¢µîûþº’&¡ÍQI#™õìºNBÚk½[–å2x{„ÂzÇ———•?ÎÖÚ²,ŸžžŒ1$4B!H±+}ä à IDAT)øÂgñWòUµµör¹œÏç•ol–eOOOr5Ø! ï$˜Û¶Ýd•LZ7M³œ|ª¾ï___×’y}ˆ! ¿º®ëºneOÓzÒ\&ÛOn{'þXkÏçó-Û’„DBk¤\X`CÖZ9XW èÍg…­µrʯ¬Ýʲló[òAÖbI/^ d×Ox•4Ü“Ï}߯_¼ëƒÌRWU•^NÏóüúúºù¸… †Ö£’†cÖÚ¶mû¾§ž{Gz˧iJ/?Œ1UUÅÒ$4à??pFúÂ^__å”û­oç;óç/¡åŒ&é:^ÿ¬—1ð¾ïû¾†Á_xü×ý×~Ïœ–·è|>;ùyÿõë×~Ç€}a¸ŸõÐnÏZ›eYY–eYfYæêâ˘¹Ll;ÔýôUd˜w§¤ ]¸jëû^zÖ_ À÷ø1Ã{RC;O£º®O§Óétr˜Ð×ʲ¬ëÚÓ ´4¬ù¸r0r䆓Kãèä:~DHã?xÚSìt:UUU–¥úÛæƒÌsÿþýÛG‘7Ž£“é­H1ídÄ~š&W#ç¾GHãß|ÔÐZë_¿~•eéiÊw¤“ùùùÙÇGä^I7€“¿‚4د¿€ïÒøçb²½³4ž¿Ìóüׯ_n_ÔZÛuÝ®“ÉZ+õë/%ëßÖ_À÷i(åa”[¶w>Na 褞v˜ÓRšï:¤—}cÖ_J>²Ó€o„4ÜrËÜp]×Û®Yʲ¬i‡”…L»ñ6Æ8yOd8ÙnýÕ|…>:ç5tžçMÓlžÐêïAû½%™v]L«¿ÓN.u¹\8uˆ!}hÎkh Å<Ï#YD++³î¼!士«mÂá§ -‘‹âIŠM8ï‹-¡…/áêjËš®.¸‰¢(œäô<ÏÃ0ìýÝbÑÃ!9OhÙ+#¶„eY:áa¸jSJMÓ”ÀD+ºç)ð4gB ‡ËÀäèL'—ÚŠœ8éªÍ[N])EúH…?Î÷åŽs”ûš´JeYæd`VNÉ\mYk˲tòÏàr¹Ò€'‘>UáIòb_qX;¦±îH¶fsuµ½oóD+ê+Ü:H§ØWœœŒ¹\'œ–åì믣µ– SxO€ØìàÙ 'žÐJ)cŒ“L’¥Ò{Ÿ–V®ÛÇœŸm @ÒAB«¿›b®¿á”¢¨ª*'k±¤˜¦Ípn7OX<Œ„^8¹g é4†våÈ ';æyÇ1·ˆÇβ¸ ýÎúédkmÝÝB™v56Ð÷}2ï ‰]>gq#úÙÍÛÉu’ô–]hœTÀòñeïÛ¦QÙ壷8Ôžb7r2-Àf&ïdYæä³‹µör¹0â 8´×§-¾ç£†Ž|O±­ÏWiŠN)ŠŠ¢p¸½y×u)½9À¶öýÀŧåþ†1feNËf&)ÓÖZÙ‘ÍÉ¥dÍôúKP„tzHè­‰‰ç”Zýms5<0 C×uë¯@Ò‰!¡o±&bÝæY<´Öu]»ÚÛdÚ¼'Òyò‚„¾ÑÊ|Õ¹ºŸH¸j}WJÑã ¸’ÔÃ÷ÈHèÍó¼&?d¸;±2ZdYæd÷1¥”µ¶m[ŽÜÖKêù{X¬¶ºÝ<ÏkþR2ÜÞÛ"òˆ£m[ú.rÊäš+aüÖá§:È€•Ò|AÛ¶mÛ:¼`ò -eôš–3£R}„1¦( WŸEº®c-°FÊ›„‘ÐY?úº~òøIÛ ««õ}O›7𰔟ȩ:ŸÏ$ô¬µ+‡^Ýîq-Y0íêÃ0 ɬüIù¡œ$æ¡¶ò´ckmòoÑ¢,KWíc²fúsù€Gyè¤QoÓZWUuœ¢°( WÙišX3 <&ñGsJHè5¦iZ3!m­Í²,áÒïh­‹¢0Ƹ:rƒAoà1é?Ó@B¯1MÓúW‡#À» #g¦‡apr)àPÒ@'€„^cÙelM%W…«}­÷Âaû˜ÖzGΙþ3zïèå^IkÝuÝʾncŒ«cwÄá‘Zë¶mÙØ¸×!ÓûÅ®ŸëÏç•ûicš¦qu?;"3Ó? Ã@1 Üå(Oê=b”{½¾ï׃LE³ïÉaû˜µ¶ïûõ×å(ëÝiÛö|>; †&ô4MÃ0¬ßîª,ËŽu kmÓ4®þú+{ì:Êóz_¤†v˜Ð ŸýaÖGB]×Gk»&«Îž_éäcpzdï…QîTχþF×uçóyåEòlB;Yí##Nniïò첫Oi­ëº^ÿ©EkÝ4,¿vrc@Úø9Ù˜ìúé¶b³ÖÎó|¨JEþÊ®Î->N‡:KãFòÙeå$¡ù܈'Ñ–Ú¶u»ëç¢ë:©Tò4´Ö¾½½­¯¡­µRCú±ÉZ+¿.Çu\ ÿ\~q9Ôrù#ËûeŒ‘)€Ç> ‘ÐÀéÍt]çv=ô5kírñ䟉ó<¿¾¾®_Õc­Íóüã‘”ËÈÄ<ÏÒ’¶¼–µÖZ+gÊr?Y–É/j­1׺ò…ü¯ÝŶ,`wOx !½ y çyîoc‡ƒä´$´«·±,˲,Õß`VJõ}/Ù,9½‘ïêæå×åëŸ$¯3[¾)ò@~1þj[ί¼w;tx؃#WXÏZ;Žãår†Áß«¤ý|t›ÐUU5M#ß—e—é•QE~î$›•RÒå·Œ'ÇœÙÖÚ?þÜ5nq:RýøFHo)LN«DŸ’nZ)U×õ8ŽŸÖÁ¾-¹Ä³DµÔôKGØr˜Õù|¾åÑ!=áG>¡X‰áî-É㸮k¥”לNoÜÛyB+¥œ·Ùßny]c—O RÊËæá²1çõYÞêíÿŠÅ ’ÞžÔÓmÛz=x ¥qo ­e`|écÝÐä?·*²/—Ë÷‹ûSú÷lˆŽóÓ·;TB¿³t«ÉwPzÈó<—5cRd‡ ìaÎçó7óIΰá1Ü…0ãÞ ô{ÏóüòòrØ3”–ºYFÅ—þs¥”´‹/­gÛþ2»(Š<Ï?ýF¤ñYˆ•tD¨§¿wäúGï&ªË²”Ö3Y- ¸¶´×½¾¾¾Û@f¿ÿº€8QIG„zú$ô÷®X°Õß"ûz}—1ÆI뙿1fš¦å:$4à•tt‚ÕÓ;ZsðQî•®#YN ’ïþ²!šz4°‡axyy‘¯IhÀB:FŒ{_³Ö¾¼¼PC;±ÌRË0¸L]KëÙEö4MmÛö}¿—KÀîÒ‘bŸAB‡!%µDuQêoëø­grH xBHÇ‹zš„iYß%©,G>ËØø²ÉÇÀ–c¼—­È¸EHGíÈ9MBoèzT\)u]dËðø»“E"Ù²H!»cæô§8ÀŸwI,E¶tJßOX‚»®Ë’š„ŽÇ»õ]Ã0\Ÿ¶ ÀBz•ÓŒrGN¦¨eÜ…2ðÞ‡ƒä4 ¿ØfF€´ñAx7–œ–2žXkÏçó0 ›œ©LBGNvA!¡`¨¤÷$áó§7IhY<ϳ Û^·G-[RËt/+jh` „ôÎ$9[–É!Q2Ÿj­•ÕD×냗ÿœçÙþ%÷6Ž£ü§×ûŒ54!½?‰å´ï^nIb§UJÉ×êæâx‰d‰m9Rbš&In òq½ž ¹¹}íô¤„uÒ{•Æúiߣܲ+u]×ú¯õ×\JmùÙ‘´–…IJ)ù:±‚»iØ!½c{?/Ë_BË*Þ²,ó<Ïó@ÃEò£$sØó<Ã ß )ÁÃ܃sÔÐÀ¶é}ÛoNûKè,˪ª’z«ñçë‰m­õ0 ó{š¦Aˆ !y¦w]×÷½×z`Mާ„.ËRÚÄÒHèw$°µÖ2¾´ž-­¸ý[“Ð@léÔÄYO“ÐN\ï€f­íû^Šì¥ø^ó>Ð@„é…©§o¦“Ð>\·žÉ`ø²&ûjˆÛ‚&Hö •¯ýå´µör¹(¥¾²“О,ËÌäT´¥È¾^ßµÔÙêÛ"›„¢E%¬êizïf²…¶úÐ.NB1#¤S¶mN“БŸñ%ª¥]|Ù „bFH'n«>2:N×­gêïa$4-B:}áëiz"Ü‹À;4Ž¥/pYQçó™„Žï$?*é£VOk­ŸÌHB8&*é£VO;ÿØGB8,Bú@Âä´[$4€##¤e_9MB88Búpö’Ó$4ÒGN“РéÊ9§Ih„ôqÅ™Ó$4,éC‹-§Ih¸FHÝ’Ór¾á†wBBÀ;fëÀö$§ëº–“‰7ABÀGl Š ³oè§HhøÃÝø—­æ§Ihø ! ??MBÀ7˜“þÜrPÄõËáNÿo2–ùé²,}¿–1&Ïs¾B%­–¸•ÿœ¦ÉZ«µž¦iùõ71Zë,Ëä÷cŒ1J)­µ1FþàÞ#'ظ÷4Mó:Ü“qžgcL×uÓ4 à ±ÔÊ_UÀ˯ú®G¼­µ]×-ñ\E–eyž/Õ¶‡¿/Áêé¶måå²,ó÷*°G‡X‚%ð8ŽÖÚ¾ï§iZŠfÁ)oìRU—eiŒ‘¯½¾®[aÖei­eœœ€k‰‡´$±Íã8JNoò¢EQcªªZFÈÃßɽ‚­Ÿnš†œ€k)‡´”ËmÛÎó<Ž£ŠfÀ9Ë2©e{ëÛù9 ›H3¤¥t–ê9Ú¿ µ6Ïó¢(dê:òšœ€ð é®ë†aèºNES:Oê麮#ož ™ÓEQìbŒ¼J'¤eÝÔù|–%U[ßÎÝ´ÖEQ”eYE´Ÿ-Èi)‘‡à0 }ßã¸ì@²;Òy> CY–yžWUaxàuYŠõÓŽm÷O@i {{{KcH@VZã8 CÓ4²AÊÖ7õÈifßÃÝã8ö}¿ì†±õí8–e™ €G˜Raƽ­µ§Ó‰qo‡µã–„sXÓ†´Ö§Ó)ÏóØzÊÈiðm>™©=ŸÏÃ0ìwúvó<¿½½ÉyŽUUm};ÿloƽÖΞz²}ØårñÝ]Æ—‚uš¦ÓéOCYÈùiò!§ÊžyÖÚa.—‹lv4ó<_.—išd™V$ eÁršó²Ðnžwó<Ë.%ÇLhõ·¤†AÚ뺎d–š~oðd»yžÛ¶•|Úú^¶'{’Ïó|:Œ11 }/9-£þ^è|>7M£Èiǰƒînú+Ƙ¦iâiü–~ïËåâ»åžýÈDì!=MSÛ¶;Ýé3­uÓ4²¢zë{QŠœ§¢éiš^^^ˆçïÉPsUUeYn}/J\?-çe‘Ó¾‘L[k­µ1,¤3?­µ¦ß@ò"}ºÅ“ÐËHÃÇþ¬xÖ++¥Æq”Ié«Ú–ä´¾I¿7<,ÆGÛ0 oooÁZbXâV´Ð-k‘µÖÒS-_ÈŸšç9ªœV7ý¨ªjó®oÖeÀzÑ=×.—˲½TÆeYJ¨dYf­•„»oõ·n–Qe­õ<ÏÛã8Ê>hó’Hèät×uÆ­u ç”0î àÈœ=Hè`|ç´\<ÏóBZýݵF¾fÜÀ¡¸9Ž‚„LZÜýe‰µöõõ5Ì)×7*Š¢ª*ß“åmÛö}Õ_À‘9xʓЛXêéa|ì&ÍÞr>·ó‹?&@=͸7€¨¬} ‘Ð*ËRV¢{ªü¤‰¬ªªxeÜÀ¡¬z‘Лóº.ËZÛ÷½|ˆç1rÀq<^!‘Бùé,Ë|lÃ>MÓù|Ž'¡óÓâÁ*„ŽJY–ó<ûônÛ6†íB¯1? ੤IèÕuí/G‡að}²õ¤žö½‰©lAïõ°8øÊÝõg[Eët:i­}œÃ1Žã0 yžÇÓA&–zºë:×·Ö6M£µŽmÀÀAÜ÷Ìõw¶ íDÓ4žÞF¯g{¬QEY–žêé¦iʲd¬ÀVîxúxå–c—HhW꺞çÙÇè´œ‘abyª§ëº&¡lëÖóÐ{¡µ–²ÒyNOÓ4M“1&¶Aoå:§e”›„°¹›žAþZ–¹½ìÁ-'R8ï÷–=Èb8ÅòSsš„‰ŸK"¯ Ûž4HNû8!C–MGÛêìd~šQnñøáI䯗›„öJk-oï<Ïn¿}Ó4㸔­±YYO“Тò]%í¯—›„@rÚy1-˱Ü^Ó­‡ëi@l¾ i½Ü$t0Zë_¿~9Ïé¾ïËik- BŸ‡´×^n:°º®ÝöcÏóyvË<4bi&²²,Ýî™åã3œs·ä454€˜½iæ¡Ó“eYQn½çyîº.òbZÝÓÔÐbö!ͯÐâ—w]çi£G¹¦µ–³xãÑ4Í4MÏÞèû>˲ÜøTQr«{ù`ààŒ]?}ßûèÇÃdÅ‘ÃLóéodYFBØ óßÿýßþ®.E9­µ1¦( WÃnërÀ5£”úŸÿù/@NÇÆSU•ÃoÇ^ÖbÀîükØ“œ>”,ËN§“«oÇŽz¼`_þ=7 §½ÎãvZë,˶7;? Þí8æ;§‡a §#!ë†\JL;¹àÚû._êéãp¸lšJ|ød)Ž×œžç™z:Czz¼À¹Ï×Ë2î}²%œ«µX|7À¹/7µ §À“繓ïBß÷,Ä·¾ÛyŠùéä¹ÚØDkm­å[ ný°=$óÓiÓZçyîd-=ÞàÜÏ{8SO§-ÏscÌú÷ßþåä®ê–VÔÓ©+ËÒÉ‘Ó4ñM‡n}4ÓG–0Ièõoþ<ÏK ÝQ?‘Ó©’ö±õ×™ç™bºo“œN’1&˲•E°µvžgŠipèî™Hr:=ÖÚ¢(VNKË*,Å®&àÎ#Ïer:1ZkcŒ«ÕÒNn   iź¬eY¶þ Ÿ¦‰ánpåñNÖe¥DN˜^¾_àЪiHƽ“¡µ–Aï•×áÌJphíC™œNÆúJšÇÀ-ûL‘ÓiXßö%³Ñ|§À!­ÈéT¬,¦e©´«›¸ iENïŸ1ÆÉÞ|Àg!­Èéý[¹©§«õÖá2¤9½gë»»i·‡´"§wËZ+ ±Ö\„%XàûVìG¶[+Ka†»À-/!­ØlŸÖ¿Ÿ$48ä+¤õô­¯ƒ ipÈcH+êé]‘Ó ×¼™Nfµ ¿!­è#ÛkíÊ3¬ä”B\ñÒŠœÞ ©ƒW^ÄÃ7\ Ò*TN³'åã8®œw BZé#»\.”q‘Ùèõ•´“‹D¸Vô‘ELÞ½•ÉóÜÉîßú‘ʸw„\}¬Y¿±(àÚÔ9͸÷½ú¾Ÿ¦iÍ´Öyž»º€Ú$¤ýÞ‘Y¿øJ.’ç9ÒàÐfƒ“Œ{Ç£ïû•ÒÖZúºÀ¹-gÃô{“Óß›çyå@·ú;Ö]…“[ˆÛ|ô{“Óß›ç¹ïû•‘½Æ˜_·¶ïÅ¥žÞ$ôú7Gk]–%ÒàÖö!­ü×Óäô§¤ðÇq}ËÝàC!­Èé-h­»®Çqý¥ØÆ|ˆèÁJNÖ÷ýúÙh¥TQ´v€…´"§’µÑëûº•Ryž³ øWH+r:”qÛ¶]cLUUë¯ø(ºVä´ã8^.'—b—1ð'ÆVä´O²|ÜI¿˜Rªª*ZÆÀ“x¯ä´ÖZkm×uN6©ëš–1ð'ÞVä´Zëóùìä¯,SRF€?±?aÉi·Îçóʳ4EQÔuíäR€OÅÒŠœv§m[W eY]×lÖ ^í ¤9íÂ0 Ã08Y-Çicèë¯öÒŠœ^g†¾ï]utk­›¦a6|ÛÓs–œ~ŒüÕº®suÁ¦ihê€öÒŠœ~ˆÛ„.Ë’„€0vÒŠœ¾Óår9ŸÏ®Ûzz#ÍIDAT®¦µ.Š‚º Œý…´"§oæ6¡•RUU±S7³ËVäô ú¾w›ÐeY’ÐÒ^CZ‘Ó߆Áá<´RÊSÝÒ¾Ÿ¹äô§†a¸\.®\)¥Œ1eY–eÉÂhiß!­Èé–„v¸˜1¦iÛ}H+ÿ9ÝuÝ^rÚSB???“Ð^ !­<ç´µvõ´§„>N$4l"‘V‡÷–„†ÁaBk­åÄhB6‘NH«ç´óN1‘çyQì/[I*¤Õ!sÚÇ(·ú{\4 J-¤ÕÁrz†¶mÝ&´µVº‹¢puMÀ iu˜œ–zš&·5´Öút:‘а¹4CZ §=r+¥žžžØþb ?â£ò¿ÿû¿þ.®µ®ªª®ëð›e’ÐpÉVÒ"ÉõÓþºiš²,Ý^ð°ÄCZ÷nÛ6XNûK說Ø¢’~H+ÿ9--ÖrÚwB³à ¢rˆVIä´¿„–®hç€Ø$Þ8öŽ×>29q¹i}d¾kh"t”JZì´ž&¡à˜ŽÒj‡9MBÀa.¤Õ®rš„€#;Öœôµøç§—Ó'Þ˜ ¡`ŽXI‹ÈëiO§O*öã¸!­"ÎiF¹êÈÃÝ‹ØÆ½åˆCWÒ"ªzš„,i¥¢Éiæ¡×éÙ<§™‡¼ÃœôØj~Z"|š&° ’þ›ÔÓRC“Ѐwé÷ç4£Ü€¯0Üý¹0ãÞÓ4‘Ѐ¯Ò_òÓY–Ykéå|…þŽ×œ–w^kíö²$4$ƒþלvŽ„€”Ð8ö¯}dn‘ÐBúg»ÈiÒCHß$òœ&¡ I„ô­¢ÍiREHß!œ&¡ a„ô}¢ÊiÒFHß-’œ&¡ y„ô#6ÏiŽ€~І9MBÀAÒÛ$§Ih8Bz•À9MBÀ¡ÒkËé²,Ih8BÚ9]–eUU$4 §`9ãï¼,F¹à˜¨¤ñTO“ÐpX„´KÎsš„€##¤s˜ÓtŠÀÁÒî9Éi:Å„´+sš„(BÚŸ‡sš„BÚ£rš„,i¿îÊipöîÆœ&¡ïÒ!ü˜Ó$4à#B:orZ:Ïó÷ˆ!Χ9½$´Ö:ü-bFHõ.§IhÀ7éЖœ&¡ßã¨Êm¼¾¾’Ѐïý?`uüÐð«ÎIEND®B`‚0707010002b27d000081a40000000000000000000000014cb7d8850000046c000000b500010002ffffffffffffffff0000004500000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/images/prev.png‰PNG  IHDR#Yi†&PLTE„Œ!Œ!)”)1œ1BœBJ¥JR­Rkµks½s„½„ŒÆŒ”Δ¥Î¥­Ö­ÆÞÆÎçÎÖïÖçïçï÷ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼ìĪbKGDˆH{IDATxÚµ‘ÁÂ0 C»ÊV%2þÿo%eâÀĶ 8—Xz²§ð\å· #KSŸ›!Q±aĪ (9±Wv|ÉY­‹YÒŒ» d=âæ[¦é«‚’ù—NÇýìg£$Ü Üÿõ‹C=µô%Š ¹‹CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature0f87aaf0b04e24ba165f2a4bfa6bca57kИ•tEXtPage35x15+0+0~FòIEND®B`‚0707010002b261000081a40000000000000000000000014cb7d8850000076b000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/api.htmlI. Acknowledgements

I. Acknowledgements

A number of people have generously offered feedback, code and suggested improvements to this tutorial. In no particular order: Daniel Veillard, Marcus Labib Iskander, Christopher R. Harris, Igor Zlatkovic, Niraj Tolia, David Turover

0707010002b264000081a40000000000000000000000014cb7d8850000184f000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s04.htmlRetrieving Element Content

Retrieving Element Content

Retrieving the content of an element involves traversing the document tree until you find what you are looking for. In this case, we are looking for an element called "keyword" contained within element called "story". The process to find the node we are interested in involves tediously walking the tree. We assume you already have an xmlDocPtr called doc and an xmlNodPtr called cur.

	1cur = cur->xmlChildrenNode;
	2while (cur != NULL) {
		if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){
			parseStory (doc, cur);
		}
		 
	cur = cur->next;
	}
      

1

Get the first child node of cur. At this point, cur points at the document root, which is the element "story".

2

This loop iterates through the elements that are children of "story", looking for one called "storyinfo". That is the element that will contain the "keywords" we are looking for. It uses the libxml string comparison function, xmlStrcmp. If there is a match, it calls the function parseStory.

void
parseStory (xmlDocPtr doc, xmlNodePtr cur) {

	xmlChar *key;
	1 cur = cur->xmlChildrenNode;
	2 while (cur != NULL) {
	    if ((!xmlStrcmp(cur->name, (const xmlChar *)"keyword"))) {
	3	    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
		    printf("keyword: %s\n", key);
		    xmlFree(key);
 	    }
	cur = cur->next;
	}
    return;
}
      

1

Again we get the first child node.

2

Like the loop above, we then iterate through the nodes, looking for one that matches the element we're interested in, in this case "keyword".

3

When we find the "keyword" element, we need to print its contents. Remember that in XML, the text contained within an element is a child node of that element, so we turn to cur->xmlChildrenNode. To retrieve it, we use the function xmlNodeListGetString, which also takes the doc pointer as an argument. In this case, we just print it out.

[Note]Note

Because xmlNodeListGetString allocates memory for the string it returns, you must use xmlFree to free it.

0707010002b260000081a40000000000000000000000014cb7d88500000e10000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/aph.htmlH. Code for Encoding Conversion Example

H. Code for Encoding Conversion Example

#include <string.h>
#include <libxml/parser.h>


unsigned char*
convert (unsigned char *in, char *encoding)
{
	unsigned char *out;
        int ret,size,out_size,temp;
        xmlCharEncodingHandlerPtr handler;

        size = (int)strlen(in)+1; 
        out_size = size*2-1; 
        out = malloc((size_t)out_size); 

        if (out) {
                handler = xmlFindCharEncodingHandler(encoding);
                
                if (!handler) {
                        free(out);
                        out = NULL;
                }
        }
        if (out) {
                temp=size-1;
                ret = handler->input(out, &out_size, in, &temp);
                if (ret || temp-size+1) {
                        if (ret) {
                                printf("conversion wasn't successful.\n");
                        } else {
                                printf("conversion wasn't successful. converted: %i octets.\n",temp);
                        }
                        free(out);
                        out = NULL;
                } else {
                        out = realloc(out,out_size+1); 
                        out[out_size]=0; /*null terminating out*/
                        
                }
        } else {
                printf("no mem\n");
        }
        return (out);
}	


int
main(int argc, char **argv) {

	unsigned char *content, *out;
	xmlDocPtr doc;
	xmlNodePtr rootnode;
	char *encoding = "ISO-8859-1";
	
		
	if (argc <= 1) {
		printf("Usage: %s content\n", argv[0]);
		return(0);
	}

	content = argv[1];

	out = convert(content, encoding);

	doc = xmlNewDoc ("1.0");
	rootnode = xmlNewDocNode(doc, NULL, (const xmlChar*)"root", out);
	xmlDocSetRootElement(doc, rootnode);

	xmlSaveFormatFileEnc("-", doc, encoding, 1);
	return (1);
}

0707010002b25c000081a40000000000000000000000014cb7d88500000ca0000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/apd.htmlD. Code for XPath Example

D. Code for XPath Example

#include <libxml/parser.h>
#include <libxml/xpath.h>

xmlDocPtr
getdoc (char *docname) {
	xmlDocPtr doc;
	doc = xmlParseFile(docname);
	
	if (doc == NULL ) {
		fprintf(stderr,"Document not parsed successfully. \n");
		return NULL;
	}

	return doc;
}

xmlXPathObjectPtr
getnodeset (xmlDocPtr doc, xmlChar *xpath){
	
	xmlXPathContextPtr context;
	xmlXPathObjectPtr result;

	context = xmlXPathNewContext(doc);
	if (context == NULL) {
		printf("Error in xmlXPathNewContext\n");
		return NULL;
	}
	result = xmlXPathEvalExpression(xpath, context);
	xmlXPathFreeContext(context);
	if (result == NULL) {
		printf("Error in xmlXPathEvalExpression\n");
		return NULL;
	}
	if(xmlXPathNodeSetIsEmpty(result->nodesetval)){
		xmlXPathFreeObject(result);
                printf("No result\n");
		return NULL;
	}
	return result;
}
int
main(int argc, char **argv) {

	char *docname;
	xmlDocPtr doc;
	xmlChar *xpath = (xmlChar*) "//keyword";
	xmlNodeSetPtr nodeset;
	xmlXPathObjectPtr result;
	int i;
	xmlChar *keyword;
		
	if (argc <= 1) {
		printf("Usage: %s docname\n", argv[0]);
		return(0);
	}

	docname = argv[1];
	doc = getdoc(docname);
	result = getnodeset (doc, xpath);
	if (result) {
		nodeset = result->nodesetval;
		for (i=0; i < nodeset->nodeNr; i++) {
			keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode, 1);
		printf("keyword: %s\n", keyword);
		xmlFree(keyword);
		}
		xmlXPathFreeObject (result);
	}
	xmlFreeDoc(doc);
	xmlCleanupParser();
	return (1);
}

0707010002b268000081a40000000000000000000000014cb7d88500000f36000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s08.htmlRetrieving Attributes

Retrieving Attributes

Retrieving the value of an attribute is similar to the previous example in which we retrieved a node's text contents. In this case we'll extract the value of the URI we added in the previous section. Full code: Appendix G, Code for Retrieving Attribute Value Example.

The initial steps for this example are similar to the previous ones: parse the doc, find the element you are interested in, then enter a function to carry out the specific task required. In this case, we call getReference:

void
getReference (xmlDocPtr doc, xmlNodePtr cur) {

	xmlChar *uri;
	cur = cur->xmlChildrenNode;
	while (cur != NULL) {
	    if ((!xmlStrcmp(cur->name, (const xmlChar *)"reference"))) {
		   1 uri = xmlGetProp(cur, "uri");
		    printf("uri: %s\n", uri);
		    xmlFree(uri);
	    }
	    cur = cur->next;
	}
	return;
}
      

1

The key function is xmlGetProp, which returns an xmlChar containing the attribute's value. In this case, we just print it out.

[Note]Note

If you are using a DTD that declares a fixed or default value for the attribute, this function will retrieve it.

0707010002b289000081a40000000000000000000000014cb7d885000005d3000000b500010002ffffffffffffffff0000004400000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/includexpath.c #include xmlDocPtr getdoc (char *docname) { xmlDocPtr doc; doc = xmlParseFile(docname); if (doc == NULL ) { fprintf(stderr,"Document not parsed successfully. \n"); return NULL; } return doc; } xmlXPathObjectPtr getnodeset (xmlDocPtr doc, xmlChar *xpath){ xmlXPathContextPtr context; xmlXPathObjectPtr result; context = xmlXPathNewContext(doc); if (context == NULL) { printf("Error in xmlXPathNewContext\n"); return NULL; } result = xmlXPathEvalExpression(xpath, context); xmlXPathFreeContext(context); if (result == NULL) { printf("Error in xmlXPathEvalExpression\n"); return NULL; } if(xmlXPathNodeSetIsEmpty(result->nodesetval)){ xmlXPathFreeObject(result); printf("No result\n"); return NULL; } return result; } int main(int argc, char **argv) { char *docname; xmlDocPtr doc; xmlChar *xpath = (xmlChar*) "//keyword"; xmlNodeSetPtr nodeset; xmlXPathObjectPtr result; int i; xmlChar *keyword; if (argc <= 1) { printf("Usage: %s docname\n", argv[0]); return(0); } docname = argv[1]; doc = getdoc(docname); result = getnodeset (doc, xpath); if (result) { nodeset = result->nodesetval; for (i=0; i < nodeset->nodeNr; i++) { keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode, 1); printf("keyword: %s\n", keyword); xmlFree(keyword); } xmlXPathFreeObject (result); } xmlFreeDoc(doc); xmlCleanupParser(); return (1); } ]]>0707010002b286000081a40000000000000000000000014cb7d88500000710000000b500010002ffffffffffffffff0000004600000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeconvert.c #include unsigned char* convert (unsigned char *in, char *encoding) { unsigned char *out; int ret,size,out_size,temp; xmlCharEncodingHandlerPtr handler; size = (int)strlen(in)+1; out_size = size*2-1; out = malloc((size_t)out_size); if (out) { handler = xmlFindCharEncodingHandler(encoding); if (!handler) { free(out); out = NULL; } } if (out) { temp=size-1; ret = handler->input(out, &out_size, in, &temp); if (ret || temp-size+1) { if (ret) { printf("conversion wasn't successful.\n"); } else { printf("conversion wasn't successful. converted: %i octets.\n",temp); } free(out); out = NULL; } else { out = realloc(out,out_size+1); out[out_size]=0; /*null terminating out*/ } } else { printf("no mem\n"); } return (out); } int main(int argc, char **argv) { unsigned char *content, *out; xmlDocPtr doc; xmlNodePtr rootnode; char *encoding = "ISO-8859-1"; if (argc <= 1) { printf("Usage: %s content\n", argv[0]); return(0); } content = argv[1]; out = convert(content, encoding); doc = xmlNewDoc ("1.0"); rootnode = xmlNewDocNode(doc, NULL, (const xmlChar*)"root", out); xmlDocSetRootElement(doc, rootnode); xmlSaveFormatFileEnc("-", doc, encoding, 1); return (1); } ]]> 0707010002b266000081a40000000000000000000000014cb7d88500000f09000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s06.htmlWriting element content

Writing element content

Writing element content uses many of the same steps we used above — parsing the document and walking the tree. We parse the document, then traverse the tree to find the place we want to insert our element. For this example, we want to again find the "storyinfo" element and this time insert a keyword. Then we'll write the file to disk. Full code: Appendix E, Code for Add Keyword Example

The main difference in this example is in parseStory:

void
parseStory (xmlDocPtr doc, xmlNodePtr cur, char *keyword) {

	1 xmlNewTextChild (cur, NULL, "keyword", keyword);
    return;
}
      

1

The xmlNewTextChild function adds a new child element at the current node pointer's location in the tree, specified by cur.

Once the node has been added, we would like to write the document to file. Is you want the element to have a namespace, you can add it here as well. In our case, the namespace is NULL.

	xmlSaveFormatFile (docname, doc, 1);
      

The first parameter is the name of the file to be written. You'll notice it is the same as the file we just read. In this case, we just write over the old file. The second parameter is a pointer to the xmlDoc structure. Setting the third parameter equal to one ensures indenting on output.

0707010002b28b000081a40000000000000000000000014cb7d885000009f1000000b500010002ffffffffffffffff0000003f00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ix01.htmlIndex

Index

A

attribute
retrieving value, Retrieving Attributes
writing, Writing Attribute

C

compiler flags, Compilation

E

element
retrieving content, Retrieving Element Content
writing content, Writing element content
encoding, Parsing the file, Encoding Conversion

X

xmlChar, Data Types
xmlDoc, Data Types
xmlNodePtr, Data Types
0707010002b262000081a40000000000000000000000014cb7d88500000ce2000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s02.htmlData Types

Data Types

Libxml declares a number of data types we will encounter repeatedly, hiding the messy stuff so you do not have to deal with it unless you have some specific need.

xmlChar

A basic replacement for char, a byte in a UTF-8 encoded string. If your data uses another encoding, it must be converted to UTF-8 for use with libxml's functions. More information on encoding is available on the libxml encoding support web page.

xmlDoc

A structure containing the tree created by a parsed doc. xmlDocPtr is a pointer to the structure.

xmlNodePtr and xmlNode

A structure containing a single node. xmlNodePtr is a pointer to the structure, and is used in traversing the document tree.

0707010002b287000081a40000000000000000000000014cb7d88500000493000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/includegetattribute.c #include #include #include #include void getReference (xmlDocPtr doc, xmlNodePtr cur) { xmlChar *uri; cur = cur->xmlChildrenNode; while (cur != NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"reference"))) { uri = xmlGetProp(cur, "uri"); printf("uri: %s\n", uri); xmlFree(uri); } cur = cur->next; } return; } void parseDoc(char *docname) { xmlDocPtr doc; xmlNodePtr cur; doc = xmlParseFile(docname); if (doc == NULL ) { fprintf(stderr,"Document not parsed successfully. \n"); return; } cur = xmlDocGetRootElement(doc); if (cur == NULL) { fprintf(stderr,"empty document\n"); xmlFreeDoc(doc); return; } if (xmlStrcmp(cur->name, (const xmlChar *) "story")) { fprintf(stderr,"document of the wrong type, root node != story"); xmlFreeDoc(doc); return; } getReference (doc, cur); xmlFreeDoc(doc); return; } int main(int argc, char **argv) { char *docname; if (argc <= 1) { printf("Usage: %s docname\n", argv[0]); return(0); } docname = argv[1]; parseDoc (docname); return (1); } ]]> 0707010002b25e000081a40000000000000000000000014cb7d88500000b85000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/apf.htmlF. Code for Add Attribute Example

F. Code for Add Attribute Example

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>


xmlDocPtr
parseDoc(char *docname, char *uri) {

	xmlDocPtr doc;
	xmlNodePtr cur;
	xmlNodePtr newnode;
	xmlAttrPtr newattr;

	doc = xmlParseFile(docname);
	
	if (doc == NULL ) {
		fprintf(stderr,"Document not parsed successfully. \n");
		return (NULL);
	}
	
	cur = xmlDocGetRootElement(doc);
	
	if (cur == NULL) {
		fprintf(stderr,"empty document\n");
		xmlFreeDoc(doc);
		return (NULL);
	}
	
	if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
		fprintf(stderr,"document of the wrong type, root node != story");
		xmlFreeDoc(doc);
		return (NULL);
	}
	
	newnode = xmlNewTextChild (cur, NULL, "reference", NULL);
	newattr = xmlNewProp (newnode, "uri", uri);
	return(doc);
}

int
main(int argc, char **argv) {

	char *docname;
	char *uri;
	xmlDocPtr doc;

	if (argc <= 2) {
		printf("Usage: %s docname, uri\n", argv[0]);
		return(0);
	}

	docname = argv[1];
	uri = argv[2];
	doc = parseDoc (docname, uri);
	if (doc != NULL) {
		xmlSaveFormatFile (docname, doc, 1);
		xmlFreeDoc(doc);
	}
	return (1);
}

0707010002b25a000081a40000000000000000000000014cb7d885000007ea000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/apb.htmlB. Sample Document

B. Sample Document

<?xml version="1.0"?>
<story>
  <storyinfo>
    <author>John Fleck</author>
    <datewritten>June 2, 2002</datewritten>
    <keyword>example keyword</keyword>
  </storyinfo>
  <body>
    <headline>This is the headline</headline>
    <para>This is the body text.</para>
  </body>
</story>
0707010002b284000081a40000000000000000000000014cb7d88500000470000000b500010002ffffffffffffffff0000004b00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/includeaddattribute.c #include #include #include #include xmlDocPtr parseDoc(char *docname, char *uri) { xmlDocPtr doc; xmlNodePtr cur; xmlNodePtr newnode; xmlAttrPtr newattr; doc = xmlParseFile(docname); if (doc == NULL ) { fprintf(stderr,"Document not parsed successfully. \n"); return (NULL); } cur = xmlDocGetRootElement(doc); if (cur == NULL) { fprintf(stderr,"empty document\n"); xmlFreeDoc(doc); return (NULL); } if (xmlStrcmp(cur->name, (const xmlChar *) "story")) { fprintf(stderr,"document of the wrong type, root node != story"); xmlFreeDoc(doc); return (NULL); } newnode = xmlNewTextChild (cur, NULL, "reference", NULL); newattr = xmlNewProp (newnode, "uri", uri); return(doc); } int main(int argc, char **argv) { char *docname; char *uri; xmlDocPtr doc; if (argc <= 2) { printf("Usage: %s docname, uri\n", argv[0]); return(0); } docname = argv[1]; uri = argv[2]; doc = parseDoc (docname, uri); if (doc != NULL) { xmlSaveFormatFile (docname, doc, 1); xmlFreeDoc(doc); } return (1); } ]]> 0707010002b25f000081a40000000000000000000000014cb7d88500000bce000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/apg.htmlG. Code for Retrieving Attribute Value Example

G. Code for Retrieving Attribute Value Example

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>

void
getReference (xmlDocPtr doc, xmlNodePtr cur) {

	xmlChar *uri;
	cur = cur->xmlChildrenNode;
	while (cur != NULL) {
	    if ((!xmlStrcmp(cur->name, (const xmlChar *)"reference"))) {
		    uri = xmlGetProp(cur, "uri");
		    printf("uri: %s\n", uri);
		    xmlFree(uri);
	    }
	    cur = cur->next;
	}
	return;
}


void
parseDoc(char *docname) {

	xmlDocPtr doc;
	xmlNodePtr cur;

	doc = xmlParseFile(docname);
	
	if (doc == NULL ) {
		fprintf(stderr,"Document not parsed successfully. \n");
		return;
	}
	
	cur = xmlDocGetRootElement(doc);
	
	if (cur == NULL) {
		fprintf(stderr,"empty document\n");
		xmlFreeDoc(doc);
		return;
	}
	
	if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
		fprintf(stderr,"document of the wrong type, root node != story");
		xmlFreeDoc(doc);
		return;
	}
	
	getReference (doc, cur);
	xmlFreeDoc(doc);
	return;
}

int
main(int argc, char **argv) {

	char *docname;

	if (argc <= 1) {
		printf("Usage: %s docname\n", argv[0]);
		return(0);
	}

	docname = argv[1];
	parseDoc (docname);
	
	return (1);
}

0707010002b28c000081a40000000000000000000000014cb7d8850000c9fd000000b500010002ffffffffffffffff0000004500000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/xmltutorial.pdf%PDF-1.3 %ª«¬­ 4 0 obj << /Type /Info /Producer (FOP 0.20.5) >> endobj 5 0 obj << /Length 1748 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gb"/*>Edeu'RnB3cso,c'tRV<@2QG"Te1sI,sZ*n#KKlNVMQ<5BAq5!'k+!#c"8(NNgbpHe&;a;1aP(M@rJfk-$BS+$?JcRY,(_A6k,SUN`TO7efXhh3i=3:BXHM%E2OW]0H+sk$H[O\XG#u0mW@.r"s`W.g99!tcR*(\/("@>q@BW^Q2G*D>/#n3]_.il=X.o?OD#U^04dS]Ss+,a%^lQgnf/]&ceW@ko*%B0QokTBn:$jairCK+PLS%Cdch@t;kIOGu!8)fQ]DhR/U#>#9%l:;J>aO=nBdX8N?;VToPUM@?BfP;2DbSCG8.#;H:nr:@X[RoUP5#8V!2XYms3+,Pg+L(An4XOouF2iL@.s#m5[\'e,fq`PS,Y"o@$je=#b?gu9;/r=qMt:mb%%G5$FjcsdUbn".i6X#Km]hZSOE(i@A:'C!]#YQVN-&c&_nu&jGD2gg2I,X>Af/QL5%8n)7XSCb0W0Z8*)+\&9B^bTmkJ.5_$RWeH_2p2XZM9@ot$UX[_53q*&3VO&J)5%86Y$AZWkI@N:&FKcs%p6WMQCcUFbh8)(40P\*ZA"bb8R+Uti6J;Fdmlr'!#08-$\rUW.S*`0l$l7lOkfeCu3KUG37:dV;6?`SiLnX36m\Ar>kEqpnE4+,0ZZ3>mbtc]/Ye]ERO8`($8oE>X;g2g1^GaWe,."f\E*6Km3M;^8S1^,jb5M4kL$muHb\#!ZDs2A'bm;94ZWTnMuE=%!9!G)bJEiSMujhEeJoj\[m_?-@s8c*.C1268G+TV1+An"dq!66BOQ/uWk*6"Zr]hpdqsAYX6mH:4q,p%/mN/clgm6_*Vk"=D&P?A)R&GV[-;l5h5dH^[E8!6^O+q)a!Ngs^]Q]QTYaG>BGrFu endstream endobj 6 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 5 0 R /Annots 7 0 R >> endobj 7 0 obj [ 8 0 R 10 0 R 12 0 R 14 0 R 16 0 R 18 0 R 20 0 R 22 0 R 24 0 R 26 0 R 28 0 R 30 0 R 32 0 R 34 0 R 36 0 R 38 0 R 40 0 R 42 0 R ] endobj 8 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 336.111 193.44 326.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 9 0 R /H /I >> endobj 10 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 325.111 189.82 315.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 11 0 R /H /I >> endobj 12 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 314.111 204.55 304.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 13 0 R /H /I >> endobj 14 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 303.111 256.22 293.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 15 0 R /H /I >> endobj 16 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 292.111 312.05 282.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 17 0 R /H /I >> endobj 18 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 281.111 241.21 271.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 19 0 R /H /I >> endobj 20 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 270.111 213.72 260.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 21 0 R /H /I >> endobj 22 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 259.111 228.72 249.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 23 0 R /H /I >> endobj 24 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 248.111 230.94 238.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 25 0 R /H /I >> endobj 26 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 237.111 206.23 227.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 27 0 R /H /I >> endobj 28 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 226.111 229.83 216.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 29 0 R /H /I >> endobj 30 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 215.111 268.7 205.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 31 0 R /H /I >> endobj 32 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 204.111 257.04 194.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 33 0 R /H /I >> endobj 34 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 193.111 287.86 183.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 35 0 R /H /I >> endobj 36 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 182.111 286.21 172.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 37 0 R /H /I >> endobj 38 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 171.111 339.25 161.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 39 0 R /H /I >> endobj 40 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 160.111 318.98 150.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 41 0 R /H /I >> endobj 42 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 149.111 231.76 139.111 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 43 0 R /H /I >> endobj 44 0 obj << /Length 1970 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=,=c_>r%"@)@iO:/L`pnKL/_:&.,f(7`!X7:ABPbqR$=B([4oTk@OWIA+4)'QU(?B+bQUm"&pP5fY2lRStIc)5A=+PRF'mbH1$b\5c1meN1+6MFRp&93T.bTmCC[Xt;`dSL&60,^g0&&(*cX!K=g*;q:et62rBUCjRZ5n?05Ff\bT:/_4"`%09AcElf^08^P=?A?TFKJcGeUf"b7J5C3b<,X-$:\'NQXH>\Y#;"_As:Kf[l:Q."b%M*F!R*3AN'##69g9!fQc."g"2G@I+`7q@&5U'r$"^?k@\d^C1kkf4S(@Gq.OJSaUa\R=EctaF!:u9NfqLs,%M0\b<%#]H])4C,>^$F,<;gtL22]H)KKDnY251JPZj\_eqmgMQE@Du&XI!2GcuSro%=1]VO6g=97Burk(cB>ITR8R9JdtsHgE+k=Y'S]VNL4U<"+-#;V85td%%r\Xj6![NqhME,!+"t90\oA1k+o'>"$rlgTG:gRa:t%=mj>_$I7F/7j+`9b?+Xi^hU:Bh;,1@e9s4!-,?0#(UN<#4[8>'Q@NK56"R\7)dp;4j$:,H[&4!7)rI?Y68=RN#]qkrdkK@JH&pq:D`NOOr+d=Y[c]gWC-oViQH)!;CLs;hDhq)GuRnlk89ZK>+-C0.HtfRmQ5LA[Kn^hXV3ei2*!;C1nA4A`m2C'q29lVD77t>J8P9p3`RP`$hQgfWHkO#_dki3GO?PeZMhFM?]pW-r6Hc`op.:b4a0TfB(JojgKl7A\h!I&P;]dG4)u'c,+fp1G+Abf*8ZAaTcL,fGt;[+lkrH>\r;ljeq11PAF>FXedJZ;>Z&l)EkXRIf\Ha:#=XgB)1-Z]&q+"bP*.A&V'C_X"L7PlNNX?lVp91%H1n=Yn]oa#3@,Ib&J[LZUmFMg?jPEDa2sgp0db=,c^&1/*9LC9rV/n?;UW_\>iXRc"`1qPj8u)8'H'Dq?7ZQ\j`KtH<>V9O@M`ZPm(VaoFUW4Y&A;KK>o#o*Rsd0gnWrK?R;#r`((7;dH8YnLcA1=o[9G:t*4EBVooVn0Ia'=2/(T5?Q`5l'GhY endstream endobj 45 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 44 0 R /Annots 46 0 R >> endobj 46 0 obj [ 47 0 R 48 0 R 49 0 R 50 0 R 51 0 R 52 0 R 53 0 R 54 0 R 55 0 R 56 0 R 57 0 R ] endobj 47 0 obj << /Type /Annot /Subtype /Link /Rect [ 384.46 600.674 473.05 590.674 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.xmlsoft.org/) /S /URI >> /H /I >> endobj 48 0 obj << /Type /Annot /Subtype /Link /Rect [ 253.694 589.674 331.744 579.674 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-lib.html) /S /URI >> /H /I >> endobj 49 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 251.348 179.0 241.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLCHAR) /S /URI >> /H /I >> endobj 50 0 obj << /Type /Annot /Subtype /Link /Rect [ 352.782 207.348 469.722 197.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.xmlsoft.org/encoding.html) /S /URI >> /H /I >> endobj 51 0 obj << /Type /Annot /Subtype /Link /Rect [ 264.0 196.348 282.88 186.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.xmlsoft.org/encoding.html) /S /URI >> /H /I >> endobj 52 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 175.348 176.22 165.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLDOC) /S /URI >> /H /I >> endobj 53 0 obj << /Type /Annot /Subtype /Link /Rect [ 283.44 164.348 327.33 154.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLDOCPTR) /S /URI >> /H /I >> endobj 54 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 143.348 192.89 133.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR) /S /URI >> /H /I >> endobj 55 0 obj << /Type /Annot /Subtype /Link /Rect [ 212.33 143.348 231.22 133.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODE) /S /URI >> /H /I >> endobj 56 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 132.348 165.66 122.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODE) /S /URI >> /H /I >> endobj 57 0 obj << /Type /Annot /Subtype /Link /Rect [ 424.512 143.348 473.402 133.348 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR) /S /URI >> /H /I >> endobj 58 0 obj << /Length 2255 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat$:CN%rcn9]V)f)7lYMf=BOaGonl2NeL#u91a,^@K1brQZuE0=@IajGN?FZ4NajnBA_M>$dU!$+"`eJ1M:]Ojt7YKEu/OYS42f>`:;^:<_db'E9`C7D86c>iM!V?%pq(j]8(TmjVJ@/hO"p#j@3$Cj)4QYlBcgmo5=D]d<8.JRsJY8>L4/XA88AID>np@tONC8KI)bAGC3$m"!ol?'^:h?4-6L<"E#a5rAX2ShL+&_V,VqYEtn>0Fj43E%+&Ekf?Li<4)g$teS2lhk6>sg2KSjV/BMUnok;DSIBKIbUhDRqs.9s]Bp3=r"*W]mmU)T`L'&is2[VesK?nNlQW+Uahq#nVnFM-VB)JSoeo1rq&7<6]P/6JJ0/D,$3%QY<05[,$Bu^Ae]k+F4_O=l2g^<#2LmSAW:Dg?r!I#$;1'RT^-d;:$PNM0SfjJc!"cQZR?[dCCA/snB&hh'4#.+2d?roNc-)'@gK;cN$J7'="QakeCFunHn=1U3USH&9&$/,lqM)"Y'4*H3g)qD<)kXPS;]okLL`JWqWMRlE%3`n0@O6tXU$U;4<#MC&G$?d=.VcSME<\3sIPJl.7[CM!ZS1#ahHq'0`Oa78ENU_Er5@;9oP[b`k;X'n*oo_28P_AZ;d>63&TeE_^UH_:)bSM4b*=#7>H"2PAtLr:%D#t"8/uEm0)SGaq+.A4rZ_<:#;WB`mk28O`#XYBYHe(CXl;7[=Zmnf>CFp_Qk&EE2=-\/)BUG5CgE:$^ea!Vce4,h-eulDr1h9jd6+g2s43i!`Z.X^b9(aAqnjcQ@#)-c0&?Xo*d_B%7i[ujL\pI$,cZci6BNbt0l'I+Bi.ml?R'^Z`)<2DCRJKmENilV[D6AmL%9&fp=rSnhn:Er+E!o"Oe/%nf]X^Y]=[(V],=KW>)Qr9^.hEfHP[P0--L4i9JHYLN4q+nC%k"+67D6+u7]g3=L*SSkBV;5s=(V;;;%S/O/rCA\tC;K[g]Og43!D]U)&(IYu4,t5,Q"4p=_kW]Kf37`!Q/i=UI(]S\AY3NrUr9n?lPpei&m6CoL!F`f1+bJ$84s'f0tU@=jQIjTU("RUJle@h7c`d.fuADeA4tVEWS[5H-"W0_a^lq5DI(Z2_DWJIGhSjqc(nY"rdP.V*G7.LOF'0]?;ZgSME\LiNLcOJ+n?Na8g7&Y@WgLo39FL'PQ9aFr##"lo'oaIMH0MX/E.nHkg4Ja0!6:N$p!WhL5inlikLtQKUXVR8#9Lh=1YEJL(oo\t'U@@iK;.=#g=V3+>Aj=?H/_SNohk*67B;HjI&#_:l42+^]%"B)M<=5DK%T79CZ_=P(W3NMU6`#oPccelH<4)5@*IX4oI:AR5OYQ=li?mjlg"1":[Y00-:\@)_A>F8"AAX!RU?Ocn3'i?Sh%Z1?T8k[CjJ%Hk6[#]Abe7DpY5@:0R%J)<$X+,\`)9`~> endstream endobj 59 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 58 0 R /Annots 60 0 R >> endobj 60 0 obj [ 61 0 R 62 0 R ] endobj 61 0 obj << /Type /Annot /Subtype /Link /Rect [ 249.81 674.674 414.8 664.674 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 31 0 R /H /I >> endobj 62 0 obj << /Type /Annot /Subtype /Link /Rect [ 361.83 222.18 395.71 212.18 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.w3.org/TR/REC-xml#charencoding) /S /URI >> /H /I >> endobj 63 0 obj << /Length 2246 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau0ED/\/e&H88.i?T1`KZ:@;DYDi(6aa\!>qr$"?Y%npAuc0WfOT1=I4j@Nj)4aBQ+q3Pa3(aUU75?9EhY]l!(_GIo\i/[M"`c&W]oL@>WG])@66`>;!2H^Tuf2u+>EkCXSYS$Jd,P;E2f]]etge+?UA!d^F52EY@d6K^eU5Ao`BTU$H"J%tJ);S?DXeUbSelaNNpNBJ:qjS%,84V;iGk6&C/X=k"Ec0X*j/C,d`ch#rca=9PGr$LkQM(\i=)+LfKG,7,5mV3ukqfp2#4k[g+o[g^=T[UHJ0EXb!&7_2]id]cpVh;;n>n+oX=-TgO"HeIrM%V&aG9Ym?8^oG@Nk%=e4V_YOgd_#ac6BF,E@*'](*M^fsd4%&6;Ho*r8-JYbRJc!Rr?YK0@8i]-$F+&X!">e:>m3Q243PU53n6(SnKNAVS]:$7i93u=TieI'rtbdbTmc6Skbif(hQsKIh3RO-bUDoE'B:EbR#3YQp`RO"5j0%IfboC=\KHS'!Pks:fn&tHtHb&d[6ii,[f4aK-WW*YbPsnK`Suho`#&;[P_2iGNd@@W-FaZ(iMbV#?.=*)?XIU0Kbd_>Dh$$dfO'+X8CHRDEPulqFjCEAYaJV#F*BC4U[/%os/M]h`1EbRcUh;7g`\I;3`m.H.m1e(U]LN,P.<5>*P+>9]9/-&eb4'>g($8@JE,4OBmN$\u[*!=YS#46d`GNnr*CJK6<2jMm^m*B$8jq*qg5qR$LQ?#-q-foc\)T7G;Uo<`^Vdra4PYor"Nb/t3r*ki*!SV^2ZK$)$+&4@u&XOYemi9M?Aj3AuPS3;^gfV$47i(4oA-`?*'oFB!ogXt:2?o<-;^ckYV(R@!(pI\H^S+=*bkTe^Y31&$6j,=d7p.ffdV;nY"lp3Yb0UujM)F"[M+DKmK+2Ot^LO>)]O.5?Rm8?]gr^%Z;IDLZji1m;=uketLoR=IZQpk@B:]K@8(&(g$k?8KB7>E%K_AXend`36oJc5)8Do0cObfGJL;Md\*+:U;M%e5gK8VjQ4PaL;o]49r5f;Bfcs=I>R;I(u3bPc0]'j%aO$dLm"A4"se*j%-VW,kPmgToCI:i7pJ_F((hrse=HpsIi@ee1K[Br0lq!dSBrQ(8#g:+6N`R*\#939.tKt9rlACg=OC8VEc8jEVQ3f0aicZH-[4CpkX"l'pke7rA*TO?jHJ.#MFgW'`J!2Rk=a"k+@9:I`]'"7BMU;8/]l\"3aNSo%"bgW5lGYe)r0/(d?@=ZrXohAR73#)Y-6q.8-I0Of'7Z4lVE7sDnnK9Q&.&8FpPttORU@,_l?"4F2!]:RGLkj@1?YAcGB5*9[IcG_`i]cg7[hiI_1SBC/McQI/-s=8@5`p8@_-a=IcI$)hi$FI$&9dD8 endstream endobj 64 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 63 0 R /Annots 65 0 R >> endobj 65 0 obj [ 66 0 R 67 0 R ] endobj 66 0 obj << /Type /Annot /Subtype /Link /Rect [ 186.56 514.4 240.56 504.4 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-parser.html#XMLSTRCMP) /S /URI >> /H /I >> endobj 67 0 obj << /Type /Annot /Subtype /Link /Rect [ 262.18 229.78 382.18 219.78 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODELISTGETSTRING) /S /URI >> /H /I >> endobj 68 0 obj << /Length 2448 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat^W'uNY0_Xf9KZ+sN+]f\Y0XhlN`OXShJ0_co2^'JFQL?"Y%SXR1@]`YPL]N6qYe(mO2n-Z(TS>Q&1"=J?.2uMn!F9ISR)9h0'@QhZA2r5\uol7c6@ODf.H$"aZ^nd*TPs4n%.1-b\!IloaWu8OPh*54L,b>X$9YN+%PJ5))^OljfW,u+S$c9T(A[.3GZg.=O_J#<>O:H7=S]&cT)hTd=]/Jc1fE`g+`q^p$ReCb0I0aX9GV48Z&mj4JT=WFuC1C=Z'ad&aEstoX%'i'X,=8^f93::pC)9og[0ZJf+-+kWH-0'[nm7Cm-U>l+aLEu.5n6Gh9Y/L^Y!BO%f7D'VMp&d2+Etg#SN<[44`Del8(gVW"&f;/C0@N??3!7V3o??'8&33a/QAs)Qh4#Y[INpQ]=lcL3:$A'#?CoI.#2,UZ]G8SkCVa^7+N*q['QpWCjB3.oJp.=0C/`0o"'nP7F=P=Pp0Wo[7`L_t.0QVS+N1j(r0(cEKLH@i_qUtfgg]-*Jj@JiiDFZAs4NABV72_)m7lck-C;U*`&KpX!@8N)Til]s7C,FY%.BgeO>K^)N![Um]LY>9&)EFo7fPNR),'Q<9"Q[)U14`7fBj2RuG8J7AJ8\\EUIN1VlE2g44VcX6WG;bkEZW:Om=/(':s&[4Q>$g-c7A!Wh;nUtni\/\Wpdct?R*)+1eYYlFf.o6OG@63'I7/02kX'pG&@H1]ju\nT,eg=V!#;"2.*rb]h4^0dck22HQ7jY4YFIj(`#bd;?9cZ8`PWZPN0-\j8u`$dWHAtfHX;DNVX?aVkGPK(\MeFW8VRUe6r0oR?^Y3C-US'%*,4'Xol)QZ.6hiMOH/UJXW@or4nUJ8#`r>KbMr=V'Hb=+l:3IpI1[F:Q8MR6D_9n[2+Ws*CB`4.0NO8B6H*Rs">%I7+pp-l,)ZY34E39q@l]IV7M?Kj1"#+b]gpRV%%qatk)\!BNJ=Q(V*g<,Qp+MrS_l%0[)!EUc,Ilh)dAaW,Yk3tZ.[.J+d"E+Ah#=Gp:dnQBpW2[V>iC%LV"&sIFdF+e5Whj,;_T(-/IP_H`oBZP:3JKt$)r8YaT_rOs$gQpBA!SU<3RVE0e/;qN-\^KoBAajC]>'%VZD40K)Vo1qklK/c=edgY6chpU]L/C8:mr"H3qTFBi*mGorIE6OE4MAM=j1nN$]#US0'U*L[[i].Z!O;P+iX'l'eb9'A%t4G/D0Fe.c@?W8]uN7[HPWM\hHKo,@]Pd(l_oIP%.r;#R_'?lqV0&Hucn:)5f=%HZaVnY2b7^Z@mWnQI5p"9TGYGD(T1)-q_iZT15JQ9lo]dHcJ4`=^PX/9IH+UOH',T5Mb(^1WRa>3T&E\d:i~> endstream endobj 69 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 68 0 R /Annots 70 0 R >> endobj 70 0 obj [ 71 0 R 72 0 R 73 0 R ] endobj 71 0 obj << /Type /Annot /Subtype /Link /Rect [ 363.98 698.0 381.19 688.0 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-xpath.html) /S /URI >> /H /I >> endobj 72 0 obj << /Type /Annot /Subtype /Link /Rect [ 263.38 597.866 341.98 587.866 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.w3.org/TR/xpath) /S /URI >> /H /I >> endobj 73 0 obj << /Type /Annot /Subtype /Link /Rect [ 270.38 586.866 424.81 576.866 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 33 0 R /H /I >> endobj 74 0 obj << /Length 2451 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gasar99\,?&\cSp;#.ERe/0A(k2nMWXK.k63=fn@.i%6_Tcf72M9pjMjf)5YHU)b,h%2$\Q7i+ndHGI1q>n:chYltM[ZRg#2V\19Yk`;e2hCqLND)^_9T)6Y.,A]8Rt&-NW&s\Nk22Zq?`[54OTA!Y8S"4pI#0djP)3Z>\iZ,sTaU`q)@"KaDS!FT_?JWUl;/RH"<5$a+8,VfPX!C$Ui)#IWp5UnP;s`GAC=X"'IMXs`mid:Tkn'iC'LkXnGfe]Cu\MVY!/@-12l%/-Z=9P@Nu0klY+@3DjA"6hGd@;V`,'L;ehIl4Xg:O>'Y/4d)V2i!d1;JV%=*mSLMV9%_6p-OYlRi*'lXH$_uW[2a:RqG'l2*g1S!bfaj8"D]I3A/IDI7L5`e6gnLcXE1Q3gZ]aD>0)-p_X-tO'kMC9-H6tGIm(e60+9TNkhJR5/DOf_\;Hs)YVLn?eM?n(j/3il+Hc)2gjKQX.%3bpm'nDq.6ZG,\/[e8knrl#+tD.JIO[_bDO+DVb:-Xq0[>6.`9!bh@RI9,Dbqd)m4UJ&8q!HnoR'qq_\bIgs0q\HSit'dGa)5.I2_]o,A8;%H(7@C%GRgHi8hhFP,Ds^-#MXW'7KNBLPaZ8.72(3*Y0S5Ss+Ln[RpsRS@*pm)?UP')2']J'paRlLmd\I+Jmt.$F#J%g4!"B@ZA6DoDJ9IYo014=Z)BLiUh]+'i%MX2\FhPODTbr7QeZ8J.JE(F)omVj"DnB@V7o57L+u/YQ]2\K=l%T^OWN;$!H,l?]pe@Y.Q)dG0sF6i=:YI")%]FSrJJrmhrrg2M.0a:@uYpX'pWonJI)%OM#G#<^n9^F.lf-Z[fXZ+XZs%B1rH6oe$X`@sD#[%k5`,*8-C("llc/[TChY0apeTqX-Bfst6]3WSkOc?p`E5`>S(1'jud28EOYW)//EEi[:(n=UG/&3&Vpme`DH^4De?0.ia8p"Ms-L_R]1[.'=p8k9??Rlns*hV'D65GD+oPCXa%!aoWfE12-5V*t^W/.>`ItdY57BqZHjTC$KJ`oq="M1c3M5c>J!4)4Oj'7D:DZCrS,NNGh-ZRq"$MUos9IME-aU:7ktce_UEdpKYq![CX[G0D'lU#luaWj<+8+:>dT(%!n#YM/.KL[aaMT*5;N4WZ>HomM"=EuO4Ds[:3Uj",jK9d`hhK#jKo&l1HhFA"10jInOua:6kTBi*`m2H7[6el!edoBk,[2%mSpkZj)iZLg/cGQYYddK+G6(*gD`ct('-"@Z>J_@DU[tK"<\'^G<0#<2\H0V0q]L]=bo@4\)S/:Y*@,\+Q^aQA-6dM^*Y\T%H3+b_MKP6=GIror,rWc\urD!MCn*U@t)D=stWd*g;6#`\^>a;:M$Wl^*+6-\-(-8@u;kj-`jX$em[0fZmdsEc15Y03;]$*Y$ErD!"QAYF-gMgp`&C#fbEeB"9=Q\YLAZCH4#P_e&6DYRS-[Me1u#(f(^gLqVA"ShhLe#=!b.!XA9)O-@$"Lsmk#m7XQl@)Ilh,s(ArJWdWe7>@WQu#O/[KVH$+TOb.EGl@Wr.S2QeJl4%"48C9-^`lK`US@it7[TbFp05Si&l;.Dp70if4#V&HMgQ#Fr7dS)dH"LnU,O*&_8?-0(L!N'l:'9)$11?,[a;ShNt%e++a]:/s3A>]kOElQo=j]^-L#T$M0)''pj?#*a8*/[SZ:SlN8r^baQu;VGstii2\od]Wb-%"!(LdW6P>0mrr]ZFG+Ln;96\9Zp?hWb,fdrr_0@G\I~> endstream endobj 75 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 74 0 R /Annots 76 0 R >> endobj 76 0 obj [ 77 0 R 78 0 R 79 0 R 80 0 R ] endobj 77 0 obj << /Type /Annot /Subtype /Link /Rect [ 272.33 574.54 455.37 564.54 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 35 0 R /H /I >> endobj 78 0 obj << /Type /Annot /Subtype /Link /Rect [ 186.348 433.66 276.348 423.66 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNEWTEXTCHILD) /S /URI >> /H /I >> endobj 79 0 obj << /Type /Annot /Subtype /Link /Rect [ 324.744 220.754 470.014 210.754 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 37 0 R /H /I >> endobj 80 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 209.754 208.16 199.754 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 37 0 R /H /I >> endobj 81 0 obj << /Length 2156 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU4=`<(R&:XAW:]hF%()p9JiLg?p3H,S?BtEP%[h"@^o!4S#NC:_qMZ3>[77oAa9'ZJ2!J<2fI,pfffpA27+"pR9F_o+P'PEGKF66X9r4/,_HGGKtIhGqS46t5aLV*+\m+?YfYH2B!UL_Y#G$b:=q9&QWgAD"[i;bb9"b?^^4Zc=pct:T(_%1oTYg.%88>JX.+Jm+LE1+f=7TbGIDV/`eT=BEL/eCJs1#CiVP$Y'.mKf)?D4aoRC@\L/,VP:m-_KrmbAYK'K&AGjNu(4U[O+HU65kh1AdmH\#?J,l<[m'S8RNoHVpr$BP/MOVBS=`';1C`?3VQXq`q->?Eq\]fG!&9Ofm#eM)ig;(k/pqh)=4%VmS-BU!gI_qpR4EeJJ&+\8BQTP,L4jVl/NV)naGOGh5Uh0e2=d?<@P>0f^o>_RQ;o]C'6)"'nKr>,&PY#%.NYHeHMZ_MKR"-[5esp%eaN&2TGqTRHgC7e#0iOX;BHhE;CL*&B#l6`goi_Su:Z)k':'g7,IM[PjKgl`Pa>:q,KcEr@C]u3<3mhT$3!`h^VW)"2567"61``P%T_@Dhn^BdsD0U2u;CCgY@8\gbLf!]:BWGBPC!UBo#kb$LrtWCMa[JBZf7[#Q:gNZ2.t0NiHn;+C_98Rj-*Xn*?jmeg!6=n?;c&AV57Gejf[n#<339o!1R(gjSSSZm4]+Pk_&df#`VD#O8Vh=*L4B(b54n]6-7UBu-`p?9<6]o7/JiZWi]FtepGHIP*%g.]NX*@o%(b)rS2dY"GZb':M&O`aZdc$N2Ro;j+UhQs+kM'Tmf=Y?[)g"^qqOI^UXp3ljX26T,)]49t$+R'e!'Cpn-k1&_2IHq1('$Y,m?\!IJAQtHkj^>S+,[VN$XP31LjLiIK)BFO(SWQnZeRRSQ9W6_I3V?ldFKW[o!56g_&jI9"LR;[L:oe);Ek=`(P-FdVsg+6(CE?%d-RnK?<@qHt=Tc(2DZ@pUq(32)l#d\IE&:6r=$7;Y.'.I+1OXhp4>YI&UWSnGnS]KFSVFk;SV%h/colS3/ElIQ02bZd15,g!3(<'mZa4P+uA.-opVha"G\;[Ou_]^>mmQ3kj2TP99YHpI'&sEH!1LEGC*R('l&C*OG^&i4F7rq2l[$ZhM:j(V1r\>Y"Cm%Q`;k:FC&DgU8UXs-Xqc[I1aJfkIW'TY/uk"QB[MUS#lU5r7Lg_9a@.k.5cp5PqtnKiS_K\gBWAN8_E+[_:NunDoiZogef7OTY6/ZE0haWh..]2"Z,.GE_ZL]KQ9)me=>po=Mn@hm\3JIQ]_t<*a-lVOeW=]-?jqG,>1uY;A=oG[[?7#G"_R"Q)*K`ic>j,8"nCXSLhPDjaSBdrbNR`[)Ud#4P/P,ReX8e;(u9L5JoG4,F=JpqGF!X2TX*JeuFM*+=Y/er4G^"LPoFkS3o%pih1F%u(J+-2]7V6Pa.VK:*od36#ccZ,?$)!Gth@=%?@u(4-P(gEfJ*L;i)j/nJYr:rd21V-a)h@ajIMi")]=kt'84)S%&-9*-ro$:^7tm[FfJ09:DkXg"f17Ub?+ooe'C!qh2N)/DpTU5(8aYhhlg2J8ZT:ZG`Da6L]A$gItu*E^k9.aEK)Hat endstream endobj 82 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 81 0 R /Annots 83 0 R >> endobj 83 0 obj [ 84 0 R 85 0 R 86 0 R 87 0 R ] endobj 84 0 obj << /Type /Annot /Subtype /Link /Rect [ 204.89 545.98 279.89 535.98 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNEWTEXTCHILD) /S /URI >> /H /I >> endobj 85 0 obj << /Type /Annot /Subtype /Link /Rect [ 338.334 437.654 471.934 427.654 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 39 0 R /H /I >> endobj 86 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 426.654 242.88 416.654 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 39 0 R /H /I >> endobj 87 0 obj << /Type /Annot /Subtype /Link /Rect [ 246.998 175.034 306.998 165.034 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLGETPROP) /S /URI >> /H /I >> endobj 88 0 obj << /Length 3062 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=.D/\LD&cV3*Z,h^W?#-KeIn@ugaYcPj8C84+iX41(5k!--,$J\2;>.Q8^*I?i)9Q.;.IIS9a5h2O3#p4Wn%7u+n#s&l)Fme.DROa*n`Kfpfu3#[Z>%H0hGeJ1`EBP#*]O+Fs*_BBpStk*YdmB,.VbunX>]N3p>(?@7b)])2ZMWMs(k(=Rj9nMNBf-Ja`Bh6%ZnRZK[#*5UHV(N*g%ECLd-=Z>8jC4:"Xd`7RABsnA\mOqLo#gm\G])`CqZA2kJ\<&RI7G-%%caI9)@22KWDu$$Uck3MfXOrU#JD`]+4S@INT7rVGZ8NQkTJX/\s[h0Ar;@M=nh%.b)q%Z($8UC_Op0LGG8rH0%hN=H,QKG#;-.>$,KJ\l82YSCrRN6![?e>*'6s"R?HZBb!3>d=1,HNbjB-%otsYjL^8LX!)4]V.3OFF)#Mb`KMbAFS.pp/UY)g+EkEZ0S9>-(@\b^_%fg\BY1=%U1G[<^cIV9KQ:[=]ELb:Cecr8*_!!!9c68%"6&&Qdf#t;dpfQi&Ve7+ZR!jC@5'E.+%3U+RQ+FQ^,spj`cOR5ZsunQ+#b<)=sB2;c\t:5drmt$So8AUaMd"-86MVphQa=tA%"cf#h9:RRLo_$%:c7]&2m67)W4!#gKg&>!9!W;Qpc9KOVJ)HVG*fI>>('-\+n/5H$_Xk/0VIdb(06+?2U@NQr'$l1Knk@0CdAIjF(b/L(+4)V,R6OgC3]OI^PbT@nDimj=L=W,XkhqE^/c.rHN/(mPeT8D**'g0I$kG7]DZBm:PP`j6,r7l]@5j13Ya&kXCW7GjYU5fSZuoQsmj;2.,^>8cHFL_F[,E'b6oT+B'b2ICQ.&B=]@Zm"$qa'7^@`jtAh@6=t/?g'ZMNfai]3*2Oa.4]FVV1+XAhX*)@9Fr1>VKOl\k,L+_Yh`Z^ES2"pkbD^+*TKX.Mq1t[JF=j!%&RFLEl2nJ`G8'nXIMRH:ic90+f%bjM8"=gU*&pA,oX4XrCMlT:U%Tlk*Di!W[q5TR3&j/f(>D*l`N"luAPpDgS]ms?Y5:j;4jois'^e0d9>952;TVuH5KXi:L$!-i&P>\*8j%d#^/35S<4N2a:dKD,Zh8>^2!B>pr:@UHMSU@&/@/RN?5-e!^M>E\-T-13UJ'RG[tNIq]S8N\nl"prl^1"-pVeCPoe^!Q@rjDNCX^PFjk*!"35#R245@$\"'!SV>1rciW^2<_6qN/LVX4(QBHnP8:^n=?j<_U[l*I2XBShl's<#KqEBT%1rqf+u+*'WHGj^'OTu&RjP!;%M,NZUob'UC*pfqqYf?[S*?r0l66+56fQD:U?'hje?+T"&\CX<:Odcc!=ES(.FHTC2F^"C,5r.OQ")dK!tl/2<'D*f-)Bt3=j5E.R9%R^9T7og?#DbIO:OscXcI,0DE8\pTEe/jTAsm1mA-u?)\M6W.;[R`sKU&YjXUtU9=BE08?N^ZQYbiM0WX;iRpZ(aS=pVgN)E:RIW5YCDIDo8T#1@d,OFd_AA[R-K:XL;B<406j`gL*#=H#qH.:&a5o)M[=i5Nbn(OLN@D/>)J0je'%@=UZFHL]GJC\fhoi20IX?)aq?o#B>gDk>5)ZVOb+b[?[ekkPE%X3Yn1Wb9n?:dA/>&;9Ms@*KWQf!$e$cNaK4RP+F>%!'GP9HsFVuKJ'kf\<\7[D#=$6j+q6*fah]f@n.Mi&<"l'FWbId9J*>A=L,7A%L-.f0OIl+:,5IDS,I()"$SCKYNb,>U-Gce`PQR2IMr\h$X<>#&a9Q&:aHr8iLWp=&H;0YO_^M+X9AW/4$j1]ek.V3#tnZ#Q,:kc"geUJn4q?IqqfXg>0K?6-Uln#[Bn@RbNj`uF^k"R6SOCqJhcY$hC5Q!FQ3[_pr]ME,oWtLGihWT/B7QW-dB;;-WnE.VEW@liO[#F#?UuLAC%Q/g-c46u92`R&(3;CR!dJeNdhTW1G=Z^*A?<=n]NheBAT$2@'YM6lpTH.*`F>(jt4crCCj>Yr_N)LahT]P]ccBcE0RBlTf[T"TabbnR>Dm4qt0Rj$n4NMJrq;5D#0BAb;Le0H2%rKS_L"q%"%L:FX._].JPV[T'ps-5e1HGsII^`_,he%/1EYQ,m@s!3j0842/.%^)-WpHgr3QcR7$#._!)hQJ-=p7YBLO?2XZ\].Kkj]SW)Q0JdKK?7p]!K6hN!l$cI'?/NOFY3b7%WlFQ%QD"/E"T8ic:i;a~> endstream endobj 89 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 88 0 R /Annots 90 0 R >> endobj 90 0 obj [ 91 0 R ] endobj 91 0 obj << /Type /Annot /Subtype /Link /Rect [ 219.0 344.54 435.37 334.54 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 41 0 R /H /I >> endobj 92 0 obj << /Length 2048 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=,D/\/e&H88.Tk5.-$o'>kHJR!`l\c!i6+8$*Vg0?uM7/,\P"SYDK44e.-^#*6>B5=hBZiL-T&[NTkdSaAq''d^Md0o*5'*:>)0T9[K,kqd^l5LQE9&QocJlZ$F(Y-OfVH%Li)OdsJ9,j@)(AH^0jUVUOqmIpKXJcU@\BUu(2P&CK"(b2(*sccC0I;+VZIt2^/tKbJji9`0?*):f=X@qVK$HRsWF##YU>hDO#-X$ZQ>0mbt,f=_!Y6#1M:Q$=A@Lo".+lblXl(a1Pg/La0([KVlj-2".T]&;]U[V9r)c=Sp2@?_1n.`B3o#skAJZ!,J\Rr6$P!@TQMQ[Yi\`IEGG_b9oZs=Bf?ume::TV-V*R,^"a\9O7,_e27Ap?'klu7Zo%%&HRM3qhq=MRr%dT)_tR&c$$"qi.J.F"U:#T,28X6bJc$HZ?_M\VV?is-l3sQ-qQPE\(5jbok/+0+[\4$DhX6h8BU\8]WTeJ,,6pC>Up-4YcVNCQ"8-0J;/9,RHPlb&O[$Ip(F&o`[BFKc^l=H0a@aD57"%9g?oX]1M0t7ceY,P+5<=trle/De_)a^r=DeMSO3mjI?R;Rs>X_W(s5A=Vj:=2O,g)kXU68G1j;f]$HWG&e\na.cOVOBb"&(Qn7EN%Ld.])&:IoOBiYEKKkmS8:ZtZC2M24&YSiUihY#.d&7/\NonBR;rc)QRh&iN$>nSAY(,W3k`Q79jM?S2KPh@"-RU`lPaMGR&&)1;MaQR0dQTf6P<.^I_91nV(jK@5W>)[U6Shc7;Ra,te:;oUDN1:(m`Ul]`nV86mc@H=4),`%TO]uZ9e/b^V$nKAm$FC`I6XX,*OQ!Pm5^U7:h?+Sc`@g:N]3YNaSM:S_H@>%1eYla[rNU/Kq.r8)SdHbk4h"*H`UIF+YeVnK$hsd't*Gl4r`pLeLAfPSr;6B/Zc#B#eB#mu8oUFk*86\C%lYS70o.;-n&ebM."+6;pPqTG"GMK_^9=0*VES82q]4_"nHk'X+3pd4,Bje&61/sSfD2\hjUjY3ceu\m9lm7EHF)Ca\Q^*$>g)Q6LjoBsI#o?"Jpj#1HS+(CoMQ.Sac0*g)b8M$!AJD7f5:eRcU[@<)+bG_"UEnsH+q'"9H^U@k(@l5GB[qkf35n4#5U7r?AnQO:PNL3Ye+gE5c!E.eEsCZ"/V.s2;1eBlU"fH:'l-.q385kF%/\qWeRrE.36c$G2,S\9h>V"+f[7o2J8!Mh_7(q44IPeNqj.*,L#BX33kSWrkUS+FVc6JBZWGMr'8^1r/k1C/pfDLp1G'1Q7D;kY,/68llZ-?5IYkbq8-hrpON(?pB6oj<[r06)u&&/I]t>31<_imL/Bt^V)]Gm=(*W_@i]&@Go&>'UIC7^eE=O\Dcq9aGee`WWg endstream endobj 93 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 92 0 R >> endobj 94 0 obj << /Length 1148 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gatm:>AMtc&:XAW:f7XD8LJjlD/Tr%P/8B,SCWB\Pm>iG-N[Fk=)sd,c@8'jP&*^ueo%/aJp'1$Ml2.!baf&08=$@S283c\,$][Y?I@usVs9a8_62%o;Dn(@[0q>.ZI3,--WmC4:_>mj,Q2p![Q-HXD!1bQq]2WjAU6FL4cXDEl,H0;DPM9O^qZ(B3^;(U:4q?WW7U?ltd_o=j9+B7abk]1Mq%haO^fKf>kYQSEc)m!k0I,NbDhWs`BSsPeCG.CUTq?k#*##l$HT^Q?f!68O2Oo_I%f_'8b55'e9VH_0bLnD@[E[3b>GK%QK_RP!S2!k<&G2K3+ERl8)p5),ba,::YifpEg!=suk#kRT$MZgCh1KN>n!0hP$2[8`oq;-N(#A]l843_lYDgjGq.`[7!p$Cn/O:*_[9\;f4G/TpU;FA\2ad\ASc64amQ*j^-A'`jl`3tL.cUQ;MIK\emF&I8mehqH=98fbI^p\@2`%b%^Mq@+Yt_#RB#47Jr=61NMqmsM?Z+lo^3=Yo&2.+&=uLia[ endstream endobj 95 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 94 0 R >> endobj 96 0 obj << /Length 1343 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU3>ArLj'Ro4H=@e]"929(]2c$p9LYX:WX!g]MXAgXoK*)5A(2R`TCnds0^#KL70k6*@8-GD,d?/8*X,='P%2+#T7KH6lgY_+CT0*QA^?t[2r*[b`g/`Xh"\`>0*TD4Vhf-"e!0D)GFYZ:\0H2%'_H#i&^1g6`V?ZZ21Yu9oRG4T4VGfX'G[%@$SF.Nb;QKL<3>W6#t^5!h&eSVfnrhO_ZU6$%-7B%tG[6s8[Ds>%:Ed-+J*/N.Aq.n7]cmj[K>nTW[b+GK_;C0G$Xq:%k(lV?4-Ve5QV7_uuJ+$[_AVI$ThO[])kS7/:cQcpB35t@ZtrPk_OA`-UO=12q(.+I.TDj?dq]PX0HQiSp^in-e_(T5s%&-GtpmQcNs9p3GsR)(V\Cacr,N$hM+/Kq_4266XPRQ*(E1ldg)S-nJ)6>"D+DP$U%C1)npoLcne!o_WHTU5-=/mP:6'j0$+pFWg0(7gaq1k,%49>6DA.]u8$mpmO!S#QR/M3r8`e4ZVK+4DK!MTo^bQjb3L'[:KW4#!j)&0MLA<j.ee:9PcCH[r.&c"i7aGK9m7Pl*bL0!=hs2Z;JhDi?iu5=f.g@iA][rMeYf`Q<.:1$>Q3Hj_.Y\"om_S/X%HKVa0rA9h;Kt[Z_(4j3R]rppClG(AKEruL/4-X$BBk1AYPo(_5p!U91E/c?Q*ZG+IBCk&jV-92Gm7\rR@-UBKZ$A>O_2%kn7BV9L[49J_9U;QoN-=i0(7FlM`AZ"^M.aUrqV#)4&*CmWhP1<'PnQ`:cBSC\0X.^irY"6hJ7t,DV-bJ\&?@^D-C9.T6@`Mt(f`d\arVlo?Y'!\UmGT1;f_/l"*8rZi\U]`**dgJpLo9n6qrJ^I]N%:6`@"2?6uSRg8U(`f,U3;5W(hQCR5gmoA=X-iWp#>MK6>RY_Rp,]^$#MOE*LV?o-0L]GP/4G+$Y!p6<4/();o@?+7H-;K'&1?(12tnRA)N:LcN>O('5hphg'NN]0*F#0)$!X[Q>#;3O:6cA)_Gq3s#:/;j!ReMc@%X,c-r,?6BL>oQ;DHik91egU-`TsIJ(mr5cMJR#1Jap>EX=MpV1!Ja"GPlZH086n00?&'*M$\FrtUflpL7M%u&M^%@dic@,s"CYgB5\u<+tT:S"dm6s\mKp1u`Gg`-O\s%[=RQlHCKfC1cUP=BuWSU`i!='8K<%J/,>jm?#&9Sr)YIR\t!l;u]H9JH"'PZag`7AL\N$RetRk58[RCF!E0Xj^TR.2.&gWCBhjtk*Hd+^BYdZX endstream endobj 99 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 98 0 R >> endobj 100 0 obj << /Length 1188 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat=+?#S1_'Re<2n.r-jY2In&jmfR*Zp97s.`Cb0-ense32sO$@a5'@OD@g=p`[XINq4i9U>Ro4sr%\I_6_BC^8nYuq4l>&U:)Wg9BA^^Q\/\&W:(q%Pb4@nujEB=<:`O/d7?`tl#dkQ?3A>T5ACSCIe4';hr%XSseO#.T*!@3rLn8ahpHc2&cdQend>O-)Oj2:]ZfK*G*5_7LZ%`KFn5Yp'k@\QpW,q^QsiXG4,1a]1jCU5SmBlN/V^gr[M9o]nLU3Hd@2DSe^?:al2[,B\Ju$^ss,9`F*1E],l35de,NoA4&07JWt=76Er&Dn<:k+Y4ksY^'BNXB]j?g[+0to^_f'FjKYgl!cR+:cZ!9[)TFcSCoDG2FU4&abbtXncGOsI:,$Kh?Zj/.fT\O0<+u`gotb2Qa=P'OE,?RhPn-9+kdn6YkRc>sB^#U8A6Ln=lMI%C>),l<@hT8#I#r/d@.rsuo[2=dTMe[J@aO8MDT=+_J#r>'$S5GG``["PO;e^c"u6BV;+4>e'^KMGh1H:CN`DR/;Pq6H&&>a<*Tc-E%okku_T)hF\dE]*+EiaH-CEtc\GR`#bNj"M-Tij=`)e)'BO1HuIX5lDWUM6IX%&WIb'iaV*/ZO@0C]`_nU>RT[29^`GJ@)i,$^d]Z6Y+6GZu+5YFa7?Nmca7a!WME)MG/:K#4UV]8p(#Xm3XHSg+k(j#?b66&341W.b#[WGYD54@3=D-k[/lj85~> endstream endobj 101 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 100 0 R >> endobj 102 0 obj << /Length 1250 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%#>E@5m'RoMS#_Q/m&Y-*H4-!H/=pBkk)Bfk'04Z+jlZOI08_6[LB!p@m^*gDPK&$p:>/edtIQmbVl.a2XeIX)n,i-=r(?f+;YDWbAR@a'V3M0*8/o?6,m3rks<-u%4!(`bYj")W(u1O>B@5P7e`rRpj3aMDf1:Y,J#/Ks?/YBi(A:8Q6\\Lf'3dA4K4#jj[A?@:SL)u['@rG=b)YQSK90i?N*Tb@%ejQ>XBBRC"(!]d>,i[Qu43/#dY7C@e%J2G>(d91BU'c"E%\7#G@K**I]2S`Q%VuU0GUTbZh`Fc=2oj:/u4C)>+!J9$_@,UUtlS4`r.g)pW"QEOK?fF.1cV5;oo44mtLPn7-'m1NX%g>LHoIr587)DA8:bDgK-%Z-%4HkKo5r`W2;31^.0KRY\XFeEM=T6%6>R2?#V,VnA+dq=*7$s2V,DVX?Z$f,l0.82M:B]OLLDqLLR4[/`%PU2.U&+?mM[\GlJ>Q]<+7dhK?&b&sj^EX-K8'flDH'pTIZq@[6"nqo8'OQOp/qb"*d/.=hO5htJCat=u-ODViR?$pN/HbUclK\sC*A_4qZ)G&cdEP@,]Tn'MgrW33jcSj)A4*6#qH?o<=7(pgZ1Zm4GB-?%(W4Q<8f;:9uh!jtY[Xo2O,jG:O;W-g0,7;e95C\NT1k$-X^>tA*-CVUndP]rGm#FmCoV#~> endstream endobj 103 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 102 0 R >> endobj 104 0 obj << /Length 1203 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%"gMYb8&:N/3YV$8RXutPk05[/5,^+dT.+2.A$B7BK<\a]5<0sC"-cj&8QDDHq]Tc\=0M#r]B?jag/LHh9O[f]hDm>lFD_n(._*@54LuCiGs+f$,CqWWn"VKp1O#-.X9+HQ^m^9'0SW=m:362T`Df,m$+mcF*C-;bbVY!nhIhkIqPpqo$KB6bIL]C%Q"W4g1._sN;b=DVs,I"69Y'T:`XL]mO_GQ$hGgtHb/?cHZR-@.ZSOt"inu&1J^&UAW"hbTO,3_E#6i!e2a`c89G4F"BI6N1daNJ_[g%m)k%>nhqJ=BV(W=Ie$a4]2P4JarbA4">ddc_qkH+R,lZM,6Oc!O]b`:hun-SuADm@jR+g*,??&8;Nk,8Z1SF5YbsDlp<_s!uoFZQ/Fi^/sFd!f-S=^n@J\0b;>8aaaIns]bt?AUuFE6I".$">t2bfW/L;h69">g8FS;5)S*H#K[miPY_Y`?mK=R6^q5j*NH"Tr>]/%E^$8DT@,*S#$)c$q!6tHiE]Z`]mKXj=AW3NtXQEali1FO+k5g7`@?[.)S--H]MVaB'@3L_\k%7W,Z'XU:bEnD(pg>u4b1*-9:lIgdLnd[eH-JJj!"7'-E$R%bK_qP'S_9IK-eLhO?*4*N2!?2]3<8HVt(f@=`]lJXQAT+J$'LZqEtDbfdil$U*u#A%#@i+-/[^S7mdgng7ph867%GZ\+KR[<7T2+QK;Rth?sN=d[oifV(foA$G04ltNPo2V[[LWYM;Y5RK@(/he'3a9V-Z_*_4*7'^3R;.It4StQ7m9M:js0c!QK4Z7Q+uZuW7P]3lH0`QoP?6m=Q]INW"EKf#e-^bMKBf=B)L?&%n\1rA:T)C[m17McmW endstream endobj 105 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 104 0 R >> endobj 106 0 obj << /Length 1326 /Filter [ /ASCII85Decode /FlateDecode ] >> stream GatU3>Ar7S'Roe[cjX`s^%d6p8PrZX!G`XL*J3VjpF-FV9r;3)16kFO13D?%+)+Rg4/C>7#S>&kcZa9a\`i-qFM1lT`0_JK\LPW13i7%;N?>O^bF;T(WEh*/XPl*sVfIT/YaO'"Q.RBf58GD8+*PlICZc]Td-8b2h\ZF$6*#F7@[IUOs1eb\#j97cd3'_bahS!^Y=DX@j^qHVY>6Q[JoY3?@AMG?7iUF"r6eK]HKebRk#;:YfCj"lJV9B4ZdN'Su:f(>J]oc%)_)17(!)B"T^Lh-1QUq2^rV>j=ikEWI]oFK#[#bfmXKk1dif?YW^E".rmF"s5eU!QL*6YUFClC&5;+H@A>3(rnehj"M:]?u#rF$pQMq.S#g"0C,>bnd+X1^0!NdN_p@0XZdIrb]H@/)O9O[]b2BA/rh(hq'AIqa"a@a6*BV@/X*1gF;tD&$_^3d_65g3s19Y]1`;Llr82&MEUTiK@5;I!KKg8>QNf7mH],0BZ^@`LciSbR.\`T@,,!ZB$N[MnJ(I!fYT.F1'O+<[$(ji>]h-5U%*,8;,>XbapAe)bCVp'4#C(398,DZc5("li]i3dfW4aa<)Nr_7f"qFM>U:*`X%BTpVCC:?TlPX\#e>_6(l2tJ.S^-6Z==Y79g>6oigGnKlhkoCN7/a`\^WaYt;s)/Yep\tf6f"oGn8=BoYpdb3;D5=\W6JJ!C-FKA&A??7fg.VX1b"Tr)tDB@CD5Is7ncag)n/3u?P!qXn3d0QF*LtBU4,2;hs+djk?P,fR!OsgdQ_=5R#BL,+0!D5>qSWs2'5\B!)>7&e_'N#$B8*oDa!r6oMU0\Z0nBfY<56= endstream endobj 107 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 106 0 R >> endobj 108 0 obj << /Length 817 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%!?#uMY'RekG_.,6a&.hh->Os^H-ge8]Vpf@X&$1[A%4bZ\B_q1Ud3r*9VrNDM4Qfu;"YQ/+k2J9%(dS;QI"O\h_#W-n"&,Zt@h_0JKCf/XS\.,ik6)$O,(p#:;Ds<40Ku@TIs_t,W.^6!GrnA#;$s(f9)Y?njhchE&*?4F[QJmroANC3B!/e:.BB\)JOQ]!C$4[(gs)X_6\-S26U;)p&ieiOdM[QSYB]2mpjJ`JopoZP2JdO'V?T$KYciKiD*c47hETggnZGLA-'G\'#LoBWT!TojA.W9Q/SNQ]nJ`O]ANEHXS8j':ceoE+9cGii^Wf=[A1kBGCWM]!jkED&P^+_.>&bKm.5;3qTK?ppVcZ$AGm)GD=Q>Cg9$OE':kjQWVe.YT9E=O6,PD&>4CZYags^t'3erVnTh.?YQ\q9sZF44TY%64A7?c+qhj7TB`T'>Gd$])l4-[KR2YPVSJ_4/jW9$HYfU'(JV5&]0_?P<=eaf<-5s2DgkGad1Gs8n@;)91d-5CJ!F%[/#D(20lr6&ha,YfIo"9%b_Y4gXf9u5h@OGJ1VCRqSC_V!>M\+e+%H7@E>](t%:T`*,,0an'h\o2,oMu`\9j5r*;!sCH3#nAPNNG\AqDJ]ro_tDX%Ef>f@noBOGmLBeZcb0k0PLCUR)UIp~> endstream endobj 109 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 612 792 ] /Resources 3 0 R /Contents 108 0 R /Annots 110 0 R >> endobj 110 0 obj [ ] endobj 113 0 obj << /Title (\376\377\0\114\0\151\0\142\0\170\0\155\0\154\0\40\0\124\0\165\0\164\0\157\0\162\0\151\0\141\0\154) /Parent 111 0 R /Next 115 0 R /A 112 0 R >> endobj 115 0 obj << /Title (\376\377\0\124\0\141\0\142\0\154\0\145\0\40\0\157\0\146\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164\0\163) /Parent 111 0 R /Prev 113 0 R /Next 116 0 R /A 114 0 R >> endobj 116 0 obj << /Title (\376\377\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156) /Parent 111 0 R /Prev 115 0 R /Next 117 0 R /A 9 0 R >> endobj 117 0 obj << /Title (\376\377\0\104\0\141\0\164\0\141\0\40\0\124\0\171\0\160\0\145\0\163) /Parent 111 0 R /Prev 116 0 R /Next 118 0 R /A 11 0 R >> endobj 118 0 obj << /Title (\376\377\0\120\0\141\0\162\0\163\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\146\0\151\0\154\0\145) /Parent 111 0 R /Prev 117 0 R /Next 119 0 R /A 13 0 R >> endobj 119 0 obj << /Title (\376\377\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\105\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164) /Parent 111 0 R /Prev 118 0 R /Next 120 0 R /A 15 0 R >> endobj 120 0 obj << /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\130\0\120\0\141\0\164\0\150\0\40\0\164\0\157\0\40\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\145\0\40\0\105\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164) /Parent 111 0 R /Prev 119 0 R /Next 121 0 R /A 17 0 R >> endobj 121 0 obj << /Title (\376\377\0\127\0\162\0\151\0\164\0\151\0\156\0\147\0\40\0\145\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\143\0\157\0\156\0\164\0\145\0\156\0\164) /Parent 111 0 R /Prev 120 0 R /Next 122 0 R /A 19 0 R >> endobj 122 0 obj << /Title (\376\377\0\127\0\162\0\151\0\164\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145) /Parent 111 0 R /Prev 121 0 R /Next 123 0 R /A 21 0 R >> endobj 123 0 obj << /Title (\376\377\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\163) /Parent 111 0 R /Prev 122 0 R /Next 124 0 R /A 23 0 R >> endobj 124 0 obj << /Title (\376\377\0\105\0\156\0\143\0\157\0\144\0\151\0\156\0\147\0\40\0\103\0\157\0\156\0\166\0\145\0\162\0\163\0\151\0\157\0\156) /Parent 111 0 R /Prev 123 0 R /Next 125 0 R /A 25 0 R >> endobj 125 0 obj << /Title (\376\377\0\101\0\56\0\240\0\103\0\157\0\155\0\160\0\151\0\154\0\141\0\164\0\151\0\157\0\156) /Parent 111 0 R /Prev 124 0 R /Next 126 0 R /A 27 0 R >> endobj 126 0 obj << /Title (\376\377\0\102\0\56\0\240\0\123\0\141\0\155\0\160\0\154\0\145\0\40\0\104\0\157\0\143\0\165\0\155\0\145\0\156\0\164) /Parent 111 0 R /Prev 125 0 R /Next 127 0 R /A 29 0 R >> endobj 127 0 obj << /Title (\376\377\0\103\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\113\0\145\0\171\0\167\0\157\0\162\0\144\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) /Parent 111 0 R /Prev 126 0 R /Next 128 0 R /A 31 0 R >> endobj 128 0 obj << /Title (\376\377\0\104\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\130\0\120\0\141\0\164\0\150\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) /Parent 111 0 R /Prev 127 0 R /Next 129 0 R /A 33 0 R >> endobj 129 0 obj << /Title (\376\377\0\105\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\101\0\144\0\144\0\40\0\113\0\145\0\171\0\167\0\157\0\162\0\144\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) /Parent 111 0 R /Prev 128 0 R /Next 130 0 R /A 35 0 R >> endobj 130 0 obj << /Title (\376\377\0\106\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\101\0\144\0\144\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) /Parent 111 0 R /Prev 129 0 R /Next 131 0 R /A 37 0 R >> endobj 131 0 obj << /Title (\376\377\0\107\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\40\0\126\0\141\0\154\0\165\0\145\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) /Parent 111 0 R /Prev 130 0 R /Next 132 0 R /A 39 0 R >> endobj 132 0 obj << /Title (\376\377\0\110\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\105\0\156\0\143\0\157\0\144\0\151\0\156\0\147\0\40\0\103\0\157\0\156\0\166\0\145\0\162\0\163\0\151\0\157\0\156\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) /Parent 111 0 R /Prev 131 0 R /Next 133 0 R /A 41 0 R >> endobj 133 0 obj << /Title (\376\377\0\111\0\56\0\240\0\101\0\143\0\153\0\156\0\157\0\167\0\154\0\145\0\144\0\147\0\145\0\155\0\145\0\156\0\164\0\163) /Parent 111 0 R /Prev 132 0 R /Next 135 0 R /A 43 0 R >> endobj 135 0 obj << /Title (\376\377\0\111\0\156\0\144\0\145\0\170) /Parent 111 0 R /Prev 133 0 R /A 134 0 R >> endobj 136 0 obj << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj 137 0 obj << /Type /Font /Subtype /Type1 /Name /F14 /BaseFont /ZapfDingbats >> endobj 138 0 obj << /Type /Font /Subtype /Type1 /Name /F5 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding >> endobj 139 0 obj << /Type /Font /Subtype /Type1 /Name /F6 /BaseFont /Times-Italic /Encoding /WinAnsiEncoding >> endobj 140 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 141 0 obj << /Type /Font /Subtype /Type1 /Name /F9 /BaseFont /Courier /Encoding /WinAnsiEncoding >> endobj 142 0 obj << /Type /Font /Subtype /Type1 /Name /F7 /BaseFont /Times-Bold /Encoding /WinAnsiEncoding >> endobj 1 0 obj << /Type /Pages /Count 17 /Kids [6 0 R 45 0 R 59 0 R 64 0 R 69 0 R 75 0 R 82 0 R 89 0 R 93 0 R 95 0 R 97 0 R 99 0 R 101 0 R 103 0 R 105 0 R 107 0 R 109 0 R ] >> endobj 2 0 obj << /Type /Catalog /Pages 1 0 R /Outlines 111 0 R /PageMode /UseOutlines >> endobj 3 0 obj << /Font << /F3 136 0 R /F5 138 0 R /F14 137 0 R /F1 140 0 R /F6 139 0 R /F9 141 0 R /F7 142 0 R >> /ProcSet [ /PDF /ImageC /Text ] >> endobj 9 0 obj << /S /GoTo /D [45 0 R /XYZ 139.0 693.0 null] >> endobj 11 0 obj << /S /GoTo /D [45 0 R /XYZ 139.0 363.674 null] >> endobj 13 0 obj << /S /GoTo /D [59 0 R /XYZ 139.0 725.0 null] >> endobj 15 0 obj << /S /GoTo /D [59 0 R /XYZ 139.0 173.18 null] >> endobj 17 0 obj << /S /GoTo /D [64 0 R /XYZ 139.0 156.646 null] >> endobj 19 0 obj << /S /GoTo /D [75 0 R /XYZ 139.0 667.866 null] >> endobj 21 0 obj << /S /GoTo /D [75 0 R /XYZ 139.0 281.08 null] >> endobj 23 0 obj << /S /GoTo /D [82 0 R /XYZ 139.0 508.98 null] >> endobj 25 0 obj << /S /GoTo /D [89 0 R /XYZ 139.0 725.0 null] >> endobj 27 0 obj << /S /GoTo /D [93 0 R /XYZ 139.0 648.0 null] >> endobj 29 0 obj << /S /GoTo /D [93 0 R /XYZ 139.0 564.561 null] >> endobj 31 0 obj << /S /GoTo /D [93 0 R /XYZ 139.0 386.942 null] >> endobj 33 0 obj << /S /GoTo /D [95 0 R /XYZ 139.0 182.42 null] >> endobj 35 0 obj << /S /GoTo /D [99 0 R /XYZ 139.0 665.56 null] >> endobj 37 0 obj << /S /GoTo /D [101 0 R /XYZ 139.0 497.94 null] >> endobj 39 0 obj << /S /GoTo /D [103 0 R /XYZ 139.0 438.78 null] >> endobj 41 0 obj << /S /GoTo /D [105 0 R /XYZ 139.0 281.02 null] >> endobj 43 0 obj << /S /GoTo /D [107 0 R /XYZ 139.0 113.4 null] >> endobj 111 0 obj << /First 113 0 R /Last 135 0 R >> endobj 112 0 obj << /S /GoTo /D [6 0 R /XYZ 139.0 725.0 null] >> endobj 114 0 obj << /S /GoTo /D [6 0 R /XYZ 139.0 396.11 null] >> endobj 134 0 obj << /S /GoTo /D [109 0 R /XYZ 139.0 682.0 null] >> endobj xref 0 143 0000000000 65535 f 0000046903 00000 n 0000047079 00000 n 0000047172 00000 n 0000000015 00000 n 0000000071 00000 n 0000001911 00000 n 0000002031 00000 n 0000002175 00000 n 0000047325 00000 n 0000002309 00000 n 0000047389 00000 n 0000002445 00000 n 0000047456 00000 n 0000002581 00000 n 0000047521 00000 n 0000002717 00000 n 0000047587 00000 n 0000002853 00000 n 0000047654 00000 n 0000002989 00000 n 0000047721 00000 n 0000003125 00000 n 0000047787 00000 n 0000003261 00000 n 0000047853 00000 n 0000003397 00000 n 0000047918 00000 n 0000003533 00000 n 0000047983 00000 n 0000003669 00000 n 0000048050 00000 n 0000003804 00000 n 0000048117 00000 n 0000003940 00000 n 0000048183 00000 n 0000004076 00000 n 0000048249 00000 n 0000004212 00000 n 0000048316 00000 n 0000004348 00000 n 0000048383 00000 n 0000004484 00000 n 0000048450 00000 n 0000004620 00000 n 0000006683 00000 n 0000006806 00000 n 0000006903 00000 n 0000007078 00000 n 0000007271 00000 n 0000007469 00000 n 0000007659 00000 n 0000007846 00000 n 0000008044 00000 n 0000008246 00000 n 0000008448 00000 n 0000008648 00000 n 0000008847 00000 n 0000009052 00000 n 0000011400 00000 n 0000011523 00000 n 0000011557 00000 n 0000011693 00000 n 0000011884 00000 n 0000014223 00000 n 0000014346 00000 n 0000014380 00000 n 0000014580 00000 n 0000014791 00000 n 0000017332 00000 n 0000017455 00000 n 0000017496 00000 n 0000017685 00000 n 0000017863 00000 n 0000018000 00000 n 0000020544 00000 n 0000020667 00000 n 0000020715 00000 n 0000020850 00000 n 0000021058 00000 n 0000021197 00000 n 0000021333 00000 n 0000023582 00000 n 0000023705 00000 n 0000023753 00000 n 0000023959 00000 n 0000024098 00000 n 0000024234 00000 n 0000024439 00000 n 0000027594 00000 n 0000027717 00000 n 0000027744 00000 n 0000027878 00000 n 0000030019 00000 n 0000030127 00000 n 0000031368 00000 n 0000031476 00000 n 0000032912 00000 n 0000033020 00000 n 0000034353 00000 n 0000034461 00000 n 0000035743 00000 n 0000035853 00000 n 0000037197 00000 n 0000037307 00000 n 0000038604 00000 n 0000038714 00000 n 0000040134 00000 n 0000040244 00000 n 0000041154 00000 n 0000041280 00000 n 0000048516 00000 n 0000048570 00000 n 0000041301 00000 n 0000048635 00000 n 0000041476 00000 n 0000041677 00000 n 0000041848 00000 n 0000042007 00000 n 0000042201 00000 n 0000042455 00000 n 0000042784 00000 n 0000043020 00000 n 0000043221 00000 n 0000043446 00000 n 0000043659 00000 n 0000043842 00000 n 0000044048 00000 n 0000044306 00000 n 0000044552 00000 n 0000044833 00000 n 0000045126 00000 n 0000045496 00000 n 0000045825 00000 n 0000048701 00000 n 0000046038 00000 n 0000046154 00000 n 0000046268 00000 n 0000046354 00000 n 0000046465 00000 n 0000046577 00000 n 0000046686 00000 n 0000046793 00000 n trailer << /Size 143 /Root 2 0 R /Info 4 0 R >> startxref 48768 %%EOF 0707010002b25b000081a40000000000000000000000014cb7d88500000c16000000b500010002ffffffffffffffff0000003e00000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/apc.htmlC. Code for Keyword Example

C. Code for Keyword Example

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>

void
parseStory (xmlDocPtr doc, xmlNodePtr cur) {

	xmlChar *key;
	cur = cur->xmlChildrenNode;
	while (cur != NULL) {
	    if ((!xmlStrcmp(cur->name, (const xmlChar *)"keyword"))) {
		    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
		    printf("keyword: %s\n", key);
		    xmlFree(key);
 	    }
	cur = cur->next;
	}
    return;
}

static void
parseDoc(char *docname) {

	xmlDocPtr doc;
	xmlNodePtr cur;

	doc = xmlParseFile(docname);
	
	if (doc == NULL ) {
		fprintf(stderr,"Document not parsed successfully. \n");
		return;
	}
	
	cur = xmlDocGetRootElement(doc);
	
	if (cur == NULL) {
		fprintf(stderr,"empty document\n");
		xmlFreeDoc(doc);
		return;
	}
	
	if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
		fprintf(stderr,"document of the wrong type, root node != story");
		xmlFreeDoc(doc);
		return;
	}
	
	cur = cur->xmlChildrenNode;
	while (cur != NULL) {
		if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){
			parseStory (doc, cur);
		}
		 
	cur = cur->next;
	}
	
	xmlFreeDoc(doc);
	return;
}

int
main(int argc, char **argv) {

	char *docname;
		
	if (argc <= 1) {
		printf("Usage: %s docname\n", argv[0]);
		return(0);
	}

	docname = argv[1];
	parseDoc (docname);

	return (1);
}

0707010002b28a000081a40000000000000000000000014cb7d8850000172a000000b500010002ffffffffffffffff0000004000000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/index.htmlLibxml Tutorial

Libxml Tutorial

John Fleck

Revision History
Revision 1June 4, 2002
Initial draft
Revision 2June 12, 2002
retrieving attribute value added
Revision 3Aug. 31, 2002
freeing memory fix
Revision 4Nov. 10, 2002
encoding discussion added
Revision 5Dec. 15, 2002
more memory freeing changes
Revision 6Jan. 26. 2003
add index
Revision 7April 25, 2003
add compilation appendix
Revision 8July 24, 2003
add XPath example
Revision 9Feb. 14, 2004
Fix bug in XPath example
Revision 7Aug. 24, 2004
Fix another bug in XPath example

Abstract

Libxml is a freely licensed C language library for handling XML, portable across a large number of platforms. This tutorial provides examples of its basic functions.

Introduction

Libxml is a C language library implementing functions for reading, creating and manipulating XML data. This tutorial provides example code and explanations of its basic functionality.

Libxml and more details about its use are available on the project home page. Included there is complete API documentation. This tutorial is not meant to substitute for that complete documentation, but to illustrate the functions needed to use the library to perform basic operations.

The tutorial is based on a simple XML application I use for articles I write. The format includes metadata and the body of the article.

The example code in this tutorial demonstrates how to:

  • Parse the document.

  • Extract the text within a specified element.

  • Add an element and its content.

  • Add an attribute.

  • Extract the value of an attribute.

Full code for the examples is included in the appendices.

0707010002b267000081a40000000000000000000000014cb7d88500000f1a000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s07.htmlWriting Attribute

Writing Attribute

Writing an attribute is similar to writing text to a new element. In this case, we'll add a reference URI to our document. Full code:Appendix F, Code for Add Attribute Example.

A reference is a child of the story element, so finding the place to put our new element and attribute is simple. As soon as we do the error-checking test in our parseDoc, we are in the right spot to add our element. But before we do that, we need to make a declaration using a data type we have not seen yet:

	xmlAttrPtr newattr;
      

We also need an extra xmlNodePtr:

	xmlNodePtr newnode;
      

The rest of parseDoc is the same as before until we check to see if our root element is story. If it is, then we know we are at the right spot to add our element:

	1 newnode = xmlNewTextChild (cur, NULL, "reference", NULL);
	2 newattr = xmlNewProp (newnode, "uri", uri);	
      

1

First we add a new node at the location of the current node pointer, cur. using the xmlNewTextChild function.

Once the node is added, the file is written to disk just as in the previous example in which we added an element with text content.

0707010002b263000081a40000000000000000000000014cb7d88500001656000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s03.htmlParsing the file

Parsing the file

Parsing the file requires only the name of the file and a single function call, plus error checking. Full code: Appendix C, Code for Keyword Example

        1 xmlDocPtr doc;
	2 xmlNodePtr cur;

	3 doc = xmlParseFile(docname);
	
	4 if (doc == NULL ) {
		fprintf(stderr,"Document not parsed successfully. \n");
		return;
	}

	5 cur = xmlDocGetRootElement(doc);
	
	6 if (cur == NULL) {
		fprintf(stderr,"empty document\n");
		xmlFreeDoc(doc);
		return;
	}
	
	7 if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
		fprintf(stderr,"document of the wrong type, root node != story");
		xmlFreeDoc(doc);
		return;
	}

    

1

Declare the pointer that will point to your parsed document.

2

Declare a node pointer (you'll need this in order to interact with individual nodes).

4

Check to see that the document was successfully parsed. If it was not, libxml will at this point register an error and stop.

[Note]Note

One common example of an error at this point is improper handling of encoding. The XML standard requires documents stored with an encoding other than UTF-8 or UTF-16 to contain an explicit declaration of their encoding. If the declaration is there, libxml will automatically perform the necessary conversion to UTF-8 for you. More information on XML's encoding requirements is contained in the standard.

5

Retrieve the document's root element.

6

Check to make sure the document actually contains something.

7

In our case, we need to make sure the document is the right type. "story" is the root type of the documents used in this tutorial.

0707010002b204000081a40000000000000000000000014cb7d88500001c40000000b500010002ffffffffffffffff0000003900000000root/usr/local/share/doc/libxml2-2.7.7/html/examples.xsl ../ Examples Menu
  • line : Type from
  • line : Function from
  • line : Macro from
  • :

    Includes:

    Uses:

    Usage:

    Author:

  • :

    • :
  • The examples are stored per section depending on the main focus of the example:

    Getting the compilation options and libraries dependancies needed to generate binaries from the examples is best done on Linux/Unix by using the xml2-config script which should have been installed as part of make install step or when installing the libxml2 development package:

    gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`

    Examples

    Libxml2 set of examples

    Daniel Veillard

    0707010002b244000081a40000000000000000000000014cb7d88500000dd9000000b500010002ffffffffffffffff0000003500000000root/usr/local/share/doc/libxml2-2.7.7/html/parse4.c/** * section: Parsing * synopsis: Parse an XML document chunk by chunk to a tree and free it * purpose: Demonstrate the use of xmlCreatePushParserCtxt() and * xmlParseChunk() to read an XML file progressively * into a tree and and xmlFreeDoc() to free the resulting tree * usage: parse4 test3.xml * test: parse4 test3.xml * author: Daniel Veillard * copy: see Copyright for the status of this software. */ #include #include #include #ifdef LIBXML_PUSH_ENABLED static FILE *desc; /** * readPacket: * @mem: array to store the packet * @size: the packet size * * read at most @size bytes from the document and store it in @mem * * Returns the number of bytes read */ static int readPacket(char *mem, int size) { int res; res = fread(mem, 1, size, desc); return(res); } /** * example4Func: * @filename: a filename or an URL * * Parse the resource and free the resulting tree */ static void example4Func(const char *filename) { xmlParserCtxtPtr ctxt; char chars[4]; xmlDocPtr doc; /* the resulting document tree */ int res; /* * Read a few first byte to check the input used for the * encoding detection at the parser level. */ res = readPacket(chars, 4); if (res <= 0) { fprintf(stderr, "Failed to parse %s\n", filename); return; } /* * Create a progressive parsing context, the 2 first arguments * are not used since we want to build a tree and not use a SAX * parsing interface. We also pass the first bytes of the document * to allow encoding detection when creating the parser but this * is optional. */ ctxt = xmlCreatePushParserCtxt(NULL, NULL, chars, res, filename); if (ctxt == NULL) { fprintf(stderr, "Failed to create parser context !\n"); return; } /* * loop on the input getting the document data, of course 4 bytes * at a time is not realistic but allows to verify testing on small * documents. */ while ((res = readPacket(chars, 4)) > 0) { xmlParseChunk(ctxt, chars, res, 0); } /* * there is no more input, indicate the parsing is finished. */ xmlParseChunk(ctxt, chars, 0, 1); /* * collect the document back and if it was wellformed * and destroy the parser context. */ doc = ctxt->myDoc; res = ctxt->wellFormed; xmlFreeParserCtxt(ctxt); if (!res) { fprintf(stderr, "Failed to parse %s\n", filename); } /* * since we don't use the document, destroy it now. */ xmlFreeDoc(doc); } int main(int argc, char **argv) { if (argc != 2) return(1); /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION /* * simulate a progressive parsing using the input file. */ desc = fopen(argv[1], "rb"); if (desc != NULL) { example4Func(argv[1]); fclose(desc); } else { fprintf(stderr, "Failed to parse %s\n", argv[1]); } /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } #else /* ! LIBXML_PUSH_ENABLED */ int main(int argc, char **argv) { fprintf(stderr, "Library not compiled with push parser support\n"); return(1); } #endif 0707010002b246000081a40000000000000000000000014cb7d88500000095000000b500010002ffffffffffffffff0000003800000000root/usr/local/share/doc/libxml2-2.7.7/html/reader1.res0 10 doc 0 0 0 1 doc 0 0 1 14 #text 0 1 1 1 src 1 0 1 14 #text 0 1 1 1 dest 1 0 1 14 #text 0 1 1 1 src 1 0 1 14 #text 0 1 0 15 doc 0 0 0707010002b23d000081a40000000000000000000000014cb7d885000000a5000000b500010002ffffffffffffffff0000003400000000root/usr/local/share/doc/libxml2-2.7.7/html/io1.res

    List of people:

    ab
    0707010002b28f000081a40000000000000000000000014cb7d8850003cf0a000000b500010002ffffffffffffffff0000003500000000root/usr/local/share/doc/libxml2-2.7.7/html/xml.html The XML C parser and toolkit of Gnome

    The XML C parser and toolkit of Gnome

    Note: this is the flat content of the web site

    libxml, a.k.a. gnome-xml

    "Programming with libxml2 is like the thrilling embrace of an exotic stranger." Mark Pilgrim

    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), it is free software available under the MIT License. XML itself is a metalanguage to design markup languages, i.e. text language where semantic and structure are added to the content using extra "markup" information enclosed between angle brackets. HTML is the most well-known markup language. Though the library is written in C a variety of language bindings make it available in other environments.

    Libxml2 is known to be very portable, the library should build and work without serious troubles on a variety of systems (Linux, Unix, Windows, CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, VxWorks, ...)

    Libxml2 implements a number of existing standards related to markup languages:

    In most cases libxml2 tries to implement the specifications in a relatively strictly compliant way. As of release 2.4.16, libxml2 passed all 1800+ tests from the OASIS XML Tests Suite.

    To some extent libxml2 provides support for the following additional specifications but doesn't claim to implement them completely:

    • Document Object Model (DOM) http://www.w3.org/TR/DOM-Level-2-Core/ the document model, but it doesn't implement the API itself, gdome2 does this on top of libxml2
    • RFC 959 : libxml2 implements a basic FTP client code
    • RFC 1945 : HTTP/1.0, again a basic HTTP client code
    • SAX: a SAX2 like interface and a minimal SAX1 implementation compatible with early expat versions

    A partial implementation of XML Schemas Part 1: Structure is being worked on but it would be far too early to make any conformance statement about it at the moment.

    Separate documents:

    Hosting sponsored by Open Source CMS services from AOE media.

    Logo designed by Marc Liyanage.

    Introduction

    This document describes libxml, the XML C parser and toolkit developed for the Gnome project. XML is a standard for building tag-based structured documents/data.

    Here are some key points about libxml:

    • Libxml2 exports Push (progressive) and Pull (blocking) type parser interfaces for both XML and HTML.
    • Libxml2 can do DTD validation at parse time, using a parsed document instance, or with an arbitrary DTD.
    • Libxml2 includes complete XPath, XPointer and XInclude implementations.
    • It is written in plain C, making as few assumptions as possible, and sticking closely to ANSI C/POSIX for easy embedding. Works on Linux/Unix/Windows, ported to a number of other platforms.
    • Basic support for HTTP and FTP client allowing applications to fetch remote resources.
    • The design is modular, most of the extensions can be compiled out.
    • The internal document representation is as close as possible to the DOM interfaces.
    • Libxml2 also has a SAX like interface; the interface is designed to be compatible with Expat.
    • This library is released under the MIT License. See the Copyright file in the distribution for the precise wording.

    Warning: unless you are forced to because your application links with a Gnome-1.X library requiring it, Do Not Use libxml1, use libxml2

    FAQ

    Table of Contents:

    License(s)

    1. Licensing Terms for libxml

      libxml2 is released under the MIT License; see the file Copyright in the distribution for the precise wording

    2. Can I embed libxml2 in a proprietary application ?

      Yes. The MIT License allows you to keep proprietary the changes you made to libxml, but it would be graceful to send-back bug fixes and improvements as patches for possible incorporation in the main development tree.

    Installation

    1. Do Not Use libxml1, use libxml2
    2. Where can I get libxml ?

      The original distribution comes from xmlsoft.org or gnome.org

      Most Linux and BSD distributions include libxml, this is probably the safer way for end-users to use libxml.

      David Doolin provides precompiled Windows versions at http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/

    3. I see libxml and libxml2 releases, which one should I install ?
      • If you are not constrained by backward compatibility issues with existing applications, install libxml2 only
      • If you are not doing development, you can safely install both. Usually the packages libxml and libxml2 are compatible (this is not the case for development packages).
      • If you are a developer and your system provides separate packaging for shared libraries and the development components, it is possible to install libxml and libxml2, and also libxml-devel and libxml2-devel too for libxml2 >= 2.3.0
      • If you are developing a new application, please develop against libxml2(-devel)
    4. I can't install the libxml package, it conflicts with libxml0

      You probably have an old libxml0 package used to provide the shared library for libxml.so.0, you can probably safely remove it. The libxml packages provided on xmlsoft.org provide libxml.so.0

    5. I can't install the libxml(2) RPM package due to failed dependencies

      The most generic solution is to re-fetch the latest src.rpm , and rebuild it locally with

      rpm --rebuild libxml(2)-xxx.src.rpm.

      If everything goes well it will generate two binary rpm packages (one providing the shared libs and xmllint, and the other one, the -devel package, providing includes, static libraries and scripts needed to build applications with libxml(2)) that you can install locally.

    Compilation

    1. What is the process to compile libxml2 ?

      As most UNIX libraries libxml2 follows the "standard":

      gunzip -c xxx.tar.gz | tar xvf -

      cd libxml-xxxx

      ./configure --help

      to see the options, then the compilation/installation proper

      ./configure [possible options]

      make

      make install

      At that point you may have to rerun ldconfig or a similar utility to update your list of installed shared libs.

    2. What other libraries are needed to compile/install libxml2 ?

      Libxml2 does not require any other library, the normal C ANSI API should be sufficient (please report any violation to this rule you may find).

      However if found at configuration time libxml2 will detect and use the following libs:

      • libz : a highly portable and available widely compression library.
      • iconv: a powerful character encoding conversion library. It is included by default in recent glibc libraries, so it doesn't need to be installed specifically on Linux. It now seems a part of the official UNIX specification. Here is one implementation of the library which source can be found here.
    3. Make check fails on some platforms

      Sometimes the regression tests' results don't completely match the value produced by the parser, and the makefile uses diff to print the delta. On some platforms the diff return breaks the compilation process; if the diff is small this is probably not a serious problem.

      Sometimes (especially on Solaris) make checks fail due to limitations in make. Try using GNU-make instead.

    4. I use the SVN version and there is no configure script

      The configure script (and other Makefiles) are generated. Use the autogen.sh script to regenerate the configure script and Makefiles, like:

      ./autogen.sh --prefix=/usr --disable-shared

    5. I have troubles when running make tests with gcc-3.0

      It seems the initial release of gcc-3.0 has a problem with the optimizer which miscompiles the URI module. Please use another compiler.

    Developer corner

    1. Troubles compiling or linking programs using libxml2

      Usually the problem comes from the fact that the compiler doesn't get the right compilation or linking flags. There is a small shell script xml2-config which is installed as part of libxml2 usual install process which provides those flags. Use

      xml2-config --cflags

      to get the compilation flags and

      xml2-config --libs

      to get the linker flags. Usually this is done directly from the Makefile as:

      CFLAGS=`xml2-config --cflags`

      LIBS=`xml2-config --libs`

    2. I want to install my own copy of libxml2 in my home directory and link my programs against it, but it doesn't work

      There are many different ways to accomplish this. Here is one way to do this under Linux. Suppose your home directory is /home/user. Then:

      • Create a subdirectory, let's call it myxml
      • unpack the libxml2 distribution into that subdirectory
      • chdir into the unpacked distribution (/home/user/myxml/libxml2 )
      • configure the library using the "--prefix" switch, specifying an installation subdirectory in /home/user/myxml, e.g.

        ./configure --prefix /home/user/myxml/xmlinst {other configuration options}

      • now run make followed by make install
      • At this point, the installation subdirectory contains the complete "private" include files, library files and binary program files (e.g. xmllint), located in

        /home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include and /home/user/myxml/xmlinst/bin

        respectively.
      • In order to use this "private" library, you should first add it to the beginning of your default PATH (so that your own private program files such as xmllint will be used instead of the normal system ones). To do this, the Bash command would be

        export PATH=/home/user/myxml/xmlinst/bin:$PATH

      • Now suppose you have a program test1.c that you would like to compile with your "private" library. Simply compile it using the command

        gcc `xml2-config --cflags --libs` -o test test.c

        Note that, because your PATH has been set with /home/user/myxml/xmlinst/bin at the beginning, the xml2-config program which you just installed will be used instead of the system default one, and this will automatically get the correct libraries linked with your program.
    3. xmlDocDump() generates output on one line.

      Libxml2 will not invent spaces in the content of a document since all spaces in the content of a document are significant. If you build a tree from the API and want indentation:

      1. the correct way is to generate those yourself too.
      2. the dangerous way is to ask libxml2 to add those blanks to your content modifying the content of your document in the process. The result may not be what you expect. There is NO way to guarantee that such a modification won't affect other parts of the content of your document. See xmlKeepBlanksDefault () and xmlSaveFormatFile ()
    4. Extra nodes in the document:

      For an XML file as below:

      <?xml version="1.0"?>
      <PLAN xmlns="http://www.argus.ca/autotest/1.0/">
      <NODE CommFlag="0"/>
      <NODE CommFlag="1"/>
      </PLAN>

      after parsing it with the function pxmlDoc=xmlParseFile(...);

      I want to the get the content of the first node (node with the CommFlag="0")

      so I did it as following;

      xmlNodePtr pnode;
      pnode=pxmlDoc->children->children;

      but it does not work. If I change it to

      pnode=pxmlDoc->children->children->next;

      then it works. Can someone explain it to me.

      In XML all characters in the content of the document are significant including blanks and formatting line breaks.

      The extra nodes you are wondering about are just that, text nodes with the formatting spaces which are part of the document but that people tend to forget. There is a function xmlKeepBlanksDefault () to remove those at parse time, but that's an heuristic, and its use should be limited to cases where you are certain there is no mixed-content in the document.

    5. I get compilation errors of existing code like when accessing root or child fields of nodes.

      You are compiling code developed for libxml version 1 and using a libxml2 development environment. Either switch back to libxml v1 devel or even better fix the code to compile with libxml2 (or both) by following the instructions.

    6. I get compilation errors about non existing xmlRootNode or xmlChildrenNode fields.

      The source code you are using has been upgraded to be able to compile with both libxml and libxml2, but you need to install a more recent version: libxml(-devel) >= 1.8.8 or libxml2(-devel) >= 2.1.0

    7. Random crashes in threaded applications

      Read and follow all advices on the thread safety page, and make 100% sure you never call xmlCleanupParser() while the library or an XML document might still be in use by another thread.

    8. The example provided in the web page does not compile.

      It's hard to maintain the documentation in sync with the code <grin/> ...

      Check the previous points 1/ and 2/ raised before, and please send patches.

    9. Where can I get more examples and information than provided on the web page?

      Ideally a libxml2 book would be nice. I have no such plan ... But you can:

      • check more deeply the existing generated doc
      • have a look at the set of examples.
      • look for examples of use for libxml2 function using the Gnome code or by asking on Google.
      • Browse the libxml2 source , I try to write code as clean and documented as possible, so looking at it may be helpful. In particular the code of xmllint.c and of the various testXXX.c test programs should provide good examples of how to do things with the library.
    10. What about C++ ?

      libxml2 is written in pure C in order to allow easy reuse on a number of platforms, including embedded systems. I don't intend to convert to C++.

      There is however a C++ wrapper which may fulfill your needs:

    11. How to validate a document a posteriori ?

      It is possible to validate documents which had not been validated at initial parsing time or documents which have been built from scratch using the API. Use the xmlValidateDtd() function. It is also possible to simply add a DTD to an existing document:

      xmlDocPtr doc; /* your existing document */
      xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
      
              dtd->name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */
      
              doc->intSubset = dtd;
              if (doc->children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
              else xmlAddPrevSibling(doc->children, (xmlNodePtr)dtd);
                
    12. So what is this funky "xmlChar" used all the time?

      It is a null terminated sequence of utf-8 characters. And only utf-8! You need to convert strings encoded in different ways to utf-8 before passing them to the API. This can be accomplished with the iconv library for instance.

    13. etc ...

    Developer Menu

    There are several on-line resources related to using libxml:

    1. Use the search engine to look up information.
    2. Check the FAQ.
    3. Check the extensive documentation automatically extracted from code comments.
    4. Look at the documentation about libxml internationalization support.
    5. This page provides a global overview and some examples on how to use libxml.
    6. Code examples
    7. John Fleck's libxml2 tutorial: html or pdf.
    8. If you need to parse large files, check the xmlReader API tutorial
    9. James Henstridge wrote some nice documentation explaining how to use the libxml SAX interface.
    10. George Lebl wrote an article for IBM developerWorks about using libxml.
    11. Check the TODO file.
    12. Read the 1.x to 2.x upgrade path description. If you are starting a new project using libxml you should really use the 2.x version.
    13. And don't forget to look at the mailing-list archive.

    Reporting bugs and getting help

    Well, bugs or missing features are always possible, and I will make a point of fixing them in a timely fashion. The best way to report a bug is to use the Gnome bug tracking database (make sure to use the "libxml2" module name). I look at reports there regularly and it's good to have a reminder when a bug is still open. Be sure to specify that the bug is for the package libxml2.

    For small problems you can try to get help on IRC, the #xml channel on irc.gnome.org (port 6667) usually have a few person subscribed which may help (but there is no guarantee and if a real issue is raised it should go on the mailing-list for archival).

    There is also a mailing-list xml@gnome.org for libxml, with an on-line archive (old). To subscribe to this list, please visit the associated Web page and follow the instructions. Do not send code, I won't debug it (but patches are really appreciated!).

    Please note that with the current amount of virus and SPAM, sending mail to the list without being subscribed won't work. There is *far too many bounces* (in the order of a thousand a day !) I cannot approve them manually anymore. If your mail to the list bounced waiting for administrator approval, it is LOST ! Repost it and fix the problem triggering the error. Also please note that emails with a legal warning asking to not copy or redistribute freely the information they contain are NOT acceptable for the mailing-list, such mail will as much as possible be discarded automatically, and are less likely to be answered if they made it to the list, DO NOT post to the list from an email address where such legal requirements are automatically added, get private paying support if you can't share information.

    Check the following before posting:

    • Read the FAQ and use the search engine to get information related to your problem.
    • Make sure you are using a recent version, and that the problem still shows up in a recent version.
    • Check the list archives to see if the problem was reported already. In this case there is probably a fix available, similarly check the registered open bugs.
    • Make sure you can reproduce the bug with xmllint or one of the test programs found in source in the distribution.
    • Please send the command showing the error as well as the input (as an attachment)

    Then send the bug with associated information to reproduce it to the xml@gnome.org list; if it's really libxml related I will approve it. Please do not send mail to me directly, it makes things really hard to track and in some cases I am not the best person to answer a given question, ask on the list.

    To be really clear about support:

    • Support or help requests MUST be sent to the list or on bugzilla in case of problems, so that the Question and Answers can be shared publicly. Failing to do so carries the implicit message "I want free support but I don't want to share the benefits with others" and is not welcome. I will automatically Carbon-Copy the xml@gnome.org mailing list for any technical reply made about libxml2 or libxslt.
    • There is no guarantee of support. If your question remains unanswered after a week, repost it, making sure you gave all the detail needed and the information requested.
    • Failing to provide information as requested or double checking first for prior feedback also carries the implicit message "the time of the library maintainers is less valuable than my time" and might not be welcome.

    Of course, bugs reported with a suggested patch for fixing them will probably be processed faster than those without.

    If you're looking for help, a quick look at the list archive may actually provide the answer. I usually send source samples when answering libxml2 usage questions. The auto-generated documentation is not as polished as I would like (i need to learn more about DocBook), but it's a good starting point.

    How to help

    You can help the project in various ways, the best thing to do first is to subscribe to the mailing-list as explained before, check the archives and the Gnome bug database:

    1. Provide patches when you find problems.
    2. Provide the diffs when you port libxml2 to a new platform. They may not be integrated in all cases but help pinpointing portability problems and
    3. Provide documentation fixes (either as patches to the code comments or as HTML diffs).
    4. Provide new documentations pieces (translations, examples, etc ...).
    5. Check the TODO file and try to close one of the items.
    6. Take one of the points raised in the archive or the bug database and provide a fix. Get in touch with me before to avoid synchronization problems and check that the suggested fix will fit in nicely :-)

    Downloads

    The latest versions of libxml2 can be found on the xmlsoft.org server ( FTP and rsync are available), there are also mirrors (France and Antonin Sprinzl also provide a mirror in Austria). (NOTE that you need both the libxml(2) and libxml(2)-devel packages installed to compile applications using libxml if using RPMs.)

    You can find all the history of libxml(2) and libxslt releases in the old directory. The precompiled Windows binaries made by Igor Zlatovic are available in the win32 directory.

    Binary ports:

    If you know other supported binary ports, please contact me.

    Snapshot:

    Contributions:

    I do accept external contributions, especially if compiling on another platform, get in touch with the list to upload the package, wrappers for various languages have been provided, and can be found in the bindings section

    Libxml2 is also available from GIT:

    • See libxml2 Git web. To checkout a local tree use:

      git clone git://git.gnome.org/libxml2
    • The libxslt module is also present there

    Releases

    Items not finished and worked on, get in touch with the list if you want to help those

    The change log describes the recents commits to the SVN code base.

    Here is the list of public releases:

    2.7.6: Oct 6 2009

    • Bug Fixes: Restore thread support in default configuration (Andrew W. Nosenko), URI with no path parsing problem (Daniel Veillard), Minor patch for conditional defines in threads.c (Eric Zurcher)

    2.7.5: Sep 24 2009

    • Bug Fixes: Restore behavior of --with-threads without argument (Andrew W. Nosenko), Fix memory leak when doc is NULL (Rob Richards), 595792 fixing a RelaxNG bug introduced in 2.7.4 (Daniel Veillard), Fix a Relaxng bug raised by libvirt test suite (Daniel Veillard), Fix a parsing problem with little data at startup (Daniel Veillard), link python module with python library (Frederic Crozat), 594874 Forgot an fclose in xmllint (Daniel Veillard)
    • Cleanup: Adding symbols.xml to EXTRA_DIST (Daniel Veillard)

    2.7.4: Sep 10 2009

    • Improvements: Switch to GIT (GNOME), Add symbol versioning to libxml2 shared libs (Daniel Veillard)
    • Portability: 593857 try to work around thread pbm MinGW 4.4 (Daniel Veillard), 594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes (Daniel Veillard), Fix Windows build * relaxng.c: fix windows build (Rob Richards), Fix the globals.h to use XMLPUBFUN (Paul Smith), Problem with extern extern in header (Daniel Veillard), Add -lnetwork for compiling on Haiku (Scott McCreary), Runtest portability patch for Solaris (Tim Rice), Small patch to accomodate the Haiku OS (Scott McCreary), 584605 package VxWorks folder in the distribution (Daniel Veillard), 574017 Realloc too expensive on most platform (Daniel Veillard), Fix windows build (Rob Richards), 545579 doesn't compile without schema support (Daniel Veillard), xmllint use xmlGetNodePath when not compiled in (Daniel Veillard), Try to avoid __imp__xmlFree link trouble on msys (Daniel Veillard), Allow to select the threading system on Windows (LRN), Fix Solaris binary links, cleanups (Daniel Veillard), Bug 571059 – MSVC doesn't work with the bakefile (Intron), fix ATTRIBUTE_PRINTF header clash (Belgabor and Mike Hommey), fixes for Borland/CodeGear/Embarcadero compilers (Eric Zurcher)
    • Documentation: 544910 typo: "renciliateNs" (Leonid Evdokimov), Add VxWorks to list of OSes (Daniel Veillard), Regenerate the documentation and update for git (Daniel Veillard), 560524 ¿ xmlTextReaderLocalName description (Daniel Veillard), Added sponsoring by AOE media for the server (Daniel Veillard), updated URLs for GNOME (Vincent Lefevre), more warnings about xmlCleanupThreads and xmlCleanupParser (Daniel Veillard)
    • Bug fixes: 594514 memory leaks - duplicate initialization (MOD), Wrong block opening in htmlNodeDumpOutputInternal (Daniel Veillard), 492317 Fix Relax-NG validation problems (Daniel Veillard), 558452 fight with reg test and error report (Daniel Veillard), 558452 RNG compilation of optional multiple child (Daniel Veillard), 579746 XSD validation not correct / nilable groups (Daniel Veillard), 502960 provide namespace stack when parsing entity (Daniel Veillard), 566012 part 2 fix regresion tests and push mode (Daniel Veillard), 566012 autodetected encoding and encoding conflict (Daniel Veillard), 584220 xpointer(/) and xinclude problems (Daniel Veillard), 587663 Incorrect Attribute-Value Normalization (Daniel Veillard), 444994 HTML chunked failure for attribute with <> (Daniel Veillard), Fix end of buffer char being split in XML parser (Daniel Veillard), Non ASCII character may be split at buffer end (Adiel Mittmann), 440226 Add xmlXIncludeProcessTreeFlagsData API (Stefan Behnel), 572129 speed up parsing of large HTML text nodes (Markus Kull), Fix HTML parsing with 0 character in CDATA (Daniel Veillard), Fix SetGenericErrorFunc and SetStructured clash (Wang Lam), 566012 Incomplete EBCDIC parsing support (Martin Kogler), 541335 HTML avoid creating 2 head or 2 body element (Daniel Veillard), 541237 error correcting missing end tags in HTML (Daniel Veillard), 583439 missing line numbers in push mode (Daniel Veillard), 587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard), 559501 avoid select and use poll for nanohttp (Raphael Prevost), 559410 - Regexp bug on (...)? constructs (Daniel Veillard), Fix a small problem on previous HTML parser patch (Daniel Veillard), 592430 - HTML parser runs into endless loop (Daniel Veillard), 447899 potential double free in xmlFreeTextReader (Daniel Veillard), 446613 small validation bug mixed content with NS (Daniel Veillard), Fix the problem of revalidating a doc with RNG (Daniel Veillard), Fix xmlKeepBlanksDefault to not break indent (Nick Wellnhofer), 512131 refs from externalRef part need to be added (Daniel Veillard), 512131 crash in xmlRelaxNGValidateFullElement (Daniel Veillard), 588441 allow '.' in HTML Names even if invalid (Daniel Veillard), 582913 Fix htmlSetMetaEncoding() to be nicer (Daniel Veillard), 579317 Try to find the HTML encoding information (Daniel Veillard), 575875 don't output charset=html (Daniel Veillard), 571271 fix semantic of xsd:all with minOccurs=0 (Daniel Veillard), 570702 fix a bug in regexp determinism checking (Daniel Veillard), 567619 xmlValidateNotationUse missing param test (Daniel Veillard), 574393 ¿ utf-8 filename magic for compressed files (Hans Breuer), Fix a couple of problems in the parser (Daniel Veillard), 585505 ¿ Document ids and refs populated by XSD (Wayne Jensen), 582906 XSD validating multiple imports of the same schema (Jason Childs), Bug 582887 ¿ problems validating complex schemas (Jason Childs), Bug 579729 ¿ fix XSD schemas parsing crash (Miroslav Bajtos), 576368 ¿ htmlChunkParser with special attributes (Jiri Netolicky), Bug 565747 ¿ relax anyURI data character checking (Vincent Lefevre), Preserve attributes of include start on tree copy (Petr Pajas), Skip silently unrecognized XPointer schemes (Jakub Wilk), Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard), potential NULL dereference on non-glibc (Jim Meyering), Fix an XSD validation crash (Daniel Veillard), Fix a regression in streaming entities support (Daniel Veillard), Fix a couple of ABI issues with C14N 1.1 (Aleksey Sanin), Aleksey Sanin support for c14n 1.1 (Aleksey Sanin), reader bug fix with entities (Daniel Veillard), use options from current parser ctxt for external entities (Rob Richards), 581612 use %s to printf strings (Christian Persch), 584605 change the threading initialization sequence (Igor Novoseltsev), 580705 keep line numbers in HTML parser (Aaron Patterson), 581803 broken HTML table attributes init (Roland Steiner), do not set error code in xmlNsWarn (Rob Richards), 564217 fix structured error handling problems, reuse options from current parser for entities (Rob Richards), xmlXPathRegisterNs should not allow enpty prefixes (Daniel Veillard), add a missing check in xmlAddSibling (Kris Breuker), avoid leaks on errors (Jinmei Tatuya)
    • Cleanup: Chasing dead assignments reported by clang-scan (Daniel Veillard), A few more safety cleanup raised by scan (Daniel Veillard), Fixing assorted potential problems raised by scan (Daniel Veillard), Potential uninitialized arguments raised by scan (Daniel Veillard), Fix a bunch of scan 'dead increments' and cleanup (Daniel Veillard), Remove a pedantic warning (Daniel Veillard), 555833 always use rm -f in uninstall-local (Daniel Veillard), 542394 xmlRegisterOutputCallbacks MAX_INPUT_CALLBACK (Daniel Veillard), Autoregenerate libxml2.syms automated checkings (Daniel Veillard), Make xmlRecoverDoc const (Martin Trappel) (Daniel Veillard), Both args of xmlStrcasestr are const (Daniel Veillard), hide the nbParse* variables used for debugging (Mike Hommey), 570806 changed include of config.h (William M. Brack), cleanups and error reports when xmlTextWriterVSprintf fails (Jinmei Tatuya)

    2.7.3: Jan 18 2009

    • Build fix: fix build when HTML support is not included.
    • Bug fixes: avoid memory overflow in gigantic text nodes, indentation problem on the writed (Rob Richards), xmlAddChildList pointer problem (Rob Richards and Kevin Milburn), xmlAddChild problem with attribute (Rob Richards and Kris Breuker), avoid a memory leak in an edge case (Daniel Zimmermann), deallocate some pthread data (Alex Ott).
    • Improvements: configure option to avoid rebuilding docs (Adrian Bunk), limit text nodes to 10MB max by default, add element traversal APIs, add a parser option to enable pre 2.7 SAX behavior (Rob Richards), add gcc malloc checking (Marcus Meissner), add gcc printf like functions parameters checking (Marcus Meissner).

    2.7.2: Oct 3 2008

    • Portability fix: fix solaris compilation problem, fix compilation if XPath is not configured in
    • Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour when saving an HTML doc with an xml dump function, HTML UTF-8 parsing bug, fix reader custom error handlers (Riccardo Scussat)
    • Improvement: xmlSave options for more flexibility to save as XML/HTML/XHTML, handle leading BOM in HTML documents

    2.7.1: Sep 1 2008

    • Portability fix: Borland C fix (Moritz Both)
    • Bug fixes: python serialization wrappers, XPath QName corner case handking and leaks (Martin)
    • Improvement: extend the xmlSave to handle HTML documents and trees
    • Cleanup: python serialization wrappers

    2.7.0: Aug 30 2008

    • Documentation: switch ChangeLog to UTF-8, improve mutithreads and xmlParserCleanup docs
    • Portability fixes: Older Win32 platforms (Rob Richards), MSVC porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg), non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
    • Bug fixes: various realloc problems (Ashwin), potential double-free (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob Richards), pattern fix when streaming (William Brack), various XML parsing and validation fixes based on the W3C regression tests, reader tree skipping function fix (Ashwin), Schemas regexps escaping fix (Volker Grabsch), handling of entity push errors (Ashwin), fix a slowdown when encoder cant serialize characters on output
    • Code cleanup: compilation fix without the reader, without the output (Robert Schwebel), python whitespace (Martin), many space/tabs cleanups, serious cleanup of the entity handling code
    • Improvement: switch parser to XML-1.0 5th edition, add parsing flags for old versions, switch URI parsing to RFC 3986, add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer), new hashing functions for dictionnaries (based on Stefan Behnel work), improve handling of misplaced html/head/body in HTML parser, better regression test tools and code coverage display, better algorithms to detect various versions of the billion laughts attacks, make arbitrary parser limits avoidable as a parser option

    2.6.32: Apr 8 2008

    • Documentation: returning heap memory to kernel (Wolfram Sang), trying to clarify xmlCleanupParser() use, xmlXPathContext improvement (Jack Jansen), improve the *Recover* functions documentation, XmlNodeType doc link fix (Martijn Arts)
    • Bug fixes: internal subset memory leak (Ashwin), avoid problem with paths starting with // (Petr Sumbera), streaming XSD validation callback patches (Ashwin), fix redirection on port other than 80 (William Brack), SAX2 leak (Ashwin), XInclude fragment of own document (Chris Ryan), regexp bug with '.' (Andrew Tosh), flush the writer at the end of the document (Alfred Mickautsch), output I/O bug fix (William Brack), writer CDATA output after a text node (Alex Khesin), UTF-16 encoding detection (William Brack), fix handling of empty CDATA nodes for Safari team, python binding problem with namespace nodes, improve HTML parsing (Arnold Hendriks), regexp automata build bug, memory leak fix (Vasily Chekalkin), XSD test crash, weird system parameter entity parsing problem, allow save to file:///X:/ windows paths, various attribute normalisation problems, externalSubsetSplit fix (Ashwin), attribute redefinition in the DTD (Ashwin), fix in char ref parsing check (Alex Khesin), many out of memory handling fixes (Ashwin), XPath out of memory handling fixes (Alvaro Herrera), various realloc problems (Ashwin), UCS4 encoding conversion buffer size (Christian Fruth), problems with EatName functions on memory errors, BOM handling in external parsed entities (Mark Rowe)
    • Code cleanup: fix build under VS 2008 (David Wimsey), remove useless mutex in xmlDict (Florent Guilian), Mingw32 compilation fix (Carlo Bramini), Win and MacOS EOL cleanups (Florent Guiliani), iconv need a const detection (Roumen Petrov), simplify xmlSetProp (Julien Charbon), cross compilation fixes for Mingw (Roumen Petrov), SCO Openserver build fix (Florent Guiliani), iconv uses const on Win32 (Rob Richards), duplicate code removal (Ashwin), missing malloc test and error reports (Ashwin), VMS makefile fix (Tycho Hilhorst)
    • improvements: better plug of schematron in the normal error handling (Tobias Minich)

    2.6.31: Jan 11 2008

    • Security fix: missing of checks in UTF-8 parsing
    • Bug fixes: regexp bug, dump attribute from XHTML document, fix xmlFree(NULL) to not crash in debug mode, Schematron parsing crash (Rob Richards), global lock free on Windows (Marc-Antoine Ruel), XSD crash due to double free (Rob Richards), indentation fix in xmlTextWriterFullEndElement (Felipe Pena), error in attribute type parsing if attribute redeclared, avoid crash in hash list scanner if deleting elements, column counter bug fix (Christian Schmidt), HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib output from xml2-config (Fred Crozat), avoid an xmllint crash (Stefan Kost), don't stop HTML parsing on out of range chars.
    • Code cleanup: fix open() call third argument, regexp cut'n paste copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder), some make distcheck realted fixes (John Carr)
    • Improvements: HTTP Header: includes port number (William Brack), testURI --debug option,

    2.6.30: Aug 23 2007

    • Portability: Solaris crash on error handling, windows path fixes (Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)
    • Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when reusing a writer for a new document (Dodji Seketeli), Schemas xsi:nil handling patch (Frank Gross), relative URI build problem (Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment detection bug, fix disparity with xmlSAXUserParseMemory, automata generation for complex regexp counts problems, Schemas IDC import problems (Frank Gross), xpath predicate evailation error handling (William Brack)

    2.6.29: Jun 12 2007

    • Portability: patches from Andreas Stricke for WinCEi, fix compilation warnings (William Brack), avoid warnings on Apple OS/X (Wendy Doyle and Mark Rowe), Windows compilation and threading improvements (Rob Richards), compilation against old Python versions, new GNU tar changes (Ryan Hill)
    • Documentation: xmlURIUnescapeString comment,
    • Bugfixes: xmlBufferAdd problem (Richard Jones), 'make valgrind' flag fix (Richard Jones), regexp interpretation of \, htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in typo (Bjorn Reese), entity content failure, xmlListAppend() fix (Georges-André Silber), XPath number serialization (William Brack), nanohttp gzipped stream fix (William Brack and Alex Cornejo), xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon), XPath string value of PI nodes (William Brack), XPath node set sorting bugs (William Brack), avoid outputting namespace decl dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding error handling, recustion on next in catalogs, fix a Relax-NG crash, workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes, invalid character in attribute detection bug, big comments before internal subset streaming bug, HTML parsing of attributes with : in the name, IDness of name in HTML (Dagfinn I. MannsÃ¥ker)
    • Improvement: keep URI query parts in raw form (Richard Jones), embed tag support in HTML (Michael Day)

    2.6.28: Apr 17 2007

    • Documentation: comment fixes (Markus Keim), xpath comments fixes too (James Dennett)
    • Bug fixes: XPath bug (William Brack), HTML parser autoclose stack usage (Usamah Malik), various regexp bug fixes (DV and William), path conversion on Windows (Igor Zlatkovic), htmlCtxtReset fix (Michael Day), XPath principal node of axis bug, HTML serialization of some codepoint (Steven Rainwater), user data propagation in XInclude (Michael Day), standalone and XML decl detection (Michael Day), Python id ouptut for some id, fix the big python string memory leak, URI parsing fixes (Stéphane Bidoul and William), long comments parsing bug (William), concurrent threads initialization (Ted Phelps), invalid char in text XInclude (William), XPath memory leak (William), tab in python problems (Andreas Hanke), XPath node comparison error (Oleg Paraschenko), cleanup patch for reader (Julien Reichel), XML Schemas attribute group (William), HTML parsing problem (William), fix char 0x2d in regexps (William), regexp quantifier range with min occurs of 0 (William), HTML script/style parsing (Mike Day)
    • Improvement: make xmlTextReaderSetup() public
    • Compilation and postability: fix a missing include problem (William), __ss_familly on AIX again (Björn Wiberg), compilation without zlib (Michael Day), catalog patch for Win32 (Christian Ehrlicher), Windows CE fixes (Andreas Stricke)
    • Various CVS to SVN infrastructure changes

    2.6.27: Oct 25 2006

    • Portability fixes: file names on windows (Roland Schwingel, Emelyanov Alexey), windows compile fixup (Rob Richards), AIX iconv() is apparently case sensitive
    • improvements: Python XPath types mapping (Nic Ferrier), XPath optimization (Kasimier), add xmlXPathCompiledEvalToBoolean (Kasimier), Python node equality and comparison (Andreas Pakulat), xmlXPathCollectAndTest improvememt (Kasimier), expose if library was compiled with zlib support (Andrew Nosenko), cache for xmlSchemaIDCMatcher structs (Kasimier), xmlTextConcat should work with comments and PIs (Rob Richards), export htmlNewParserCtxt needed by Michael Day, refactoring of catalog entity loaders (Michael Day), add XPointer support to python bindings (Ross Reedstrom, Brian West and Stefan Anca), try to sort out most file path to URI conversions and xmlPathToUri, add --html --memory case to xmllint
    • building fix: fix --with-minimum (Felipe Contreras), VMS fix, const'ification of HTML parser structures (Matthias Clasen), portability fix (Emelyanov Alexey), wget autodetection (Peter Breitenlohner), remove the build path recorded in the python shared module, separate library flags for shared and static builds (Mikhail Zabaluev), fix --with-minimum --with-sax1 builds, fix --with-minimum --with-schemas builds
    • bug fix: xmlGetNodePath fix (Kasimier), xmlDOMWrapAdoptNode and attribute (Kasimier), crash when using the recover mode, xmlXPathEvalExpr problem (Kasimier), xmlXPathCompExprAdd bug (Kasimier), missing destry in xmlFreeRMutex (Andrew Nosenko), XML Schemas fixes (Kasimier), warning on entities processing, XHTML script and style serialization (Kasimier), python generator for long types, bug in xmlSchemaClearValidCtxt (Bertrand Fritsch), xmlSchemaXPathEvaluate allocation bug (Marton Illes), error message end of line (Rob Richards), fix attribute serialization in writer (Rob Richards), PHP4 DTD validation crasher, parser safety patch (Ben Darnell), _private context propagation when parsing entities (with Michael Day), fix entities behaviour when using SAX, URI to file path fix (Mikhail Zabaluev), disapearing validity context, arg error in SAX callback (Mike Hommey), fix mixed-content autodetect when using --noblanks, fix xmlIOParseDTD error handling, fix bug in xmlSplitQName on special Names, fix Relax-NG element content validation bug, fix xmlReconciliateNs bug, fix potential attribute XML parsing bug, fix line/column accounting in XML parser, chunking bug in the HTML parser on script, try to detect obviously buggy HTML meta encoding indications, bugs with encoding BOM and xmlSaveDoc, HTML entities in attributes parsing, HTML minimized attribute values, htmlReadDoc and htmlReadIO were broken, error handling bug in xmlXPathEvalExpression (Olaf Walkowiak), fix a problem in htmlCtxtUseOptions, xmlNewInputFromFile could leak (Marius Konitzer), bug on misformed SSD regexps (Christopher Boumenot)
    • documentation: warning about XML_PARSE_COMPACT (Kasimier Buchcik), fix xmlXPathCastToString documentation, improve man pages for xmllitn and xmlcatalog (Daniel Leidert), fixed comments of a few functions

    2.6.26: Jun 6 2006

    • portability fixes: Python detection (Joseph Sacco), compilation error(William Brack and Graham Bennett), LynxOS patch (Olli Savia)
    • bug fixes: encoding buffer problem, mix of code and data in xmlIO.c(Kjartan Maraas), entities in XSD validation (Kasimier Buchcik), variousXSD validation fixes (Kasimier), memory leak in pattern (Rob Richards andKasimier), attribute with colon in name (Rob Richards), XPath leak inerror reporting (Aleksey Sanin), XInclude text include of selfdocument.
    • improvements: Xpath optimizations (Kasimier), XPath object cache(Kasimier)

    2.6.25: Jun 6 2006:

    Do not use or package 2.6.25

    2.6.24: Apr 28 2006

    • Portability fixes: configure on Windows, testapi compile on windows (Kasimier Buchcik, venkat naidu), Borland C++ 6 compile (Eric Zurcher), HP-UX compiler workaround (Rick Jones), xml2-config bugfix, gcc-4.1 cleanups, Python detection scheme (Joseph Sacco), UTF-8 file paths on Windows (Roland Schwingel).
    • Improvements: xmlDOMWrapReconcileNamespaces xmlDOMWrapCloneNode (Kasimier Buchcik), XML catalog debugging (Rick Jones), update to Unicode 4.01.
    • Bug fixes: xmlParseChunk() problem in 2.6.23, xmlParseInNodeContext() on HTML docs, URI behaviour on Windows (Rob Richards), comment streaming bug, xmlParseComment (with William Brack), regexp bug fixes (DV & Youri Golovanov), xmlGetNodePath on text/CDATA (Kasimier), one Relax-NG interleave bug, xmllint --path and --valid, XSD bugfixes (Kasimier), remove debug left in Python bindings (Nic Ferrier), xmlCatalogAdd bug (Martin Cole), xmlSetProp fixes (Rob Richards), HTML IDness (Rob Richards), a large number of cleanups and small fixes based on Coverity reports, bug in character ranges, Unicode tables const (Aivars Kalvans), schemas fix (Stefan Kost), xmlRelaxNGParse error deallocation, xmlSchemaAddSchemaDoc error deallocation, error handling on unallowed code point, ixmllint --nonet to never reach the net (Gary Coady), line break in writer after end PI (Jason Viers).
    • Documentation: man pages updates and cleanups (Daniel Leidert).
    • New features: Relax NG structure error handlers.

    2.6.23: Jan 5 2006

    • portability fixes: Windows (Rob Richards), getaddrinfo on Windows (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas), --with-minimum compilation fixes (William Brack), error case handling fix on Solaris (Albert Chin), don't use 'list' as parameter name reported by Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin), MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones),
    • code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring parsing code (Bjorn Reese)
    • bug fixes: xmlBuildRelativeURI and empty path (William Brack), combinatory explosion and performances in regexp code, leak in xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik), XPath pattern based evaluation bugs (DV & Kasimier), xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF split problem (William), issues with non-namespaced attributes in xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards), HTML parsing of script, Python must not output to stdout (Nic Ferrier), exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype totalDigits bug (Kasimier Buchcik), error handling when writing to an xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier), fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair), compilation and build fixes (Michael Day), removed dependancies on xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath pattern based evaluation fixes (Kasimier)
    • improvements: XSD Schemas redefinitions/restrictions (Kasimier Buchcik), node copy checks and fix for attribute (Rob Richards), counted transition bug in regexps, ctxt->standalone = -2 to indicate no standalone attribute was found, add xmlSchemaSetParserStructuredErrors() (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API (Kasimier), handle gzipped HTTP resources (Gary Coady), add htmlDocDumpMemoryFormat. (Rob Richards),
    • documentation: typo (Michael Day), libxml man page (Albert Chin), save function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),

    2.6.22: Sep 12 2005

    • build fixes: compile without schematron (Stéphane Bidoul)
    • bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, CDATA push parser bug, xmlElemDump problem with XHTML1 doc, XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some output formatting for meta element (Rob Richards), script and style XHTML1 serialization (David Madore), Attribute derivation fixups in XSD (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)
    • improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for derive (Kasimier Buchcik).
    • documentation: generation of gtk-doc like docs, integration with devhelp.

    2.6.21: Sep 4 2005

    • build fixes: Cygwin portability fixes (Gerrit P. Haase), calling convention problems on Windows (Marcus Boerger), cleanups based on Linus' sparse tool, update of win32/configure.js (Rob Richards), remove warnings on Windows(Marcus Boerger), compilation without SAX1, detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko), compilation/link with threads and old gcc, compile problem by C370 on Z/OS,
    • bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 bug (Jiri Netolicky), XPath NaN compare bug (William Brack), htmlParseScript potential bug, Schemas regexp handling of spaces, Base64 Schemas comparisons NIST passes, automata build error xsd:all, xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas foreign namespaces handling, XML Schemas facet comparison (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI composition (William), xs:anyType in Schemas (Kasimier), Python resolver emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism detection problem, XInclude bug, Schemas context type (Dean Hill), validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling, xmlGetLineNo fixes, bug on entities handling, entity name extraction in error handling with XInclude, text nodes in HTML body tags (Gary Coady), xml:id and IDness at the treee level fixes, XPath streaming patterns bugs.
    • improvements: structured interfaces for schemas and RNG error reports (Marcus Boerger), optimization of the char data inner loop parsing (thanks to Behdad Esfahbod for the idea), schematron validation though not finished yet, xmlSaveOption to omit XML declaration, keyref match error reports (Kasimier), formal expression handling code not plugged yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option for text nodes allocation.
    • documentation: xmllint man page had --nonet duplicated

    2.6.20: Jul 10 2005

    • build fixes: Windows build (Rob Richards), Mingw compilation (Igor Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and andriy@google.com), use gcc weak references to pthread to avoid the pthread dependancy on Linux, compilation problem (Steve Nairn), compiling of subset (Morten Welinder), IPv6/ss_family compilation (William Brack), compilation when disabling parts of the library, standalone test distribution.
    • bug fixes: bug in lang(), memory cleanup on errors (William Brack), HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup on XInclude (William), pattern fixes (William), attribute bug in exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards), a small RelaxNG leak, HTML parsing in push mode bug (James Bursa), failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks() heuristic failure, duplicate attributes in DTD bug (William).
    • improvements: lot of work on Schemas by Kasimier Buchcik both on conformance and streaming, Schemas validation messages (Kasimier Buchcik, Matthew Burgess), namespace removal at the python level (Brent Hendricks), Update to new Schemas regression tests from W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), standalone test framework and programs, new DOM import APIs xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and Schemas regression tests, xmlStopParser() available in pull mode too, ienhancement to xmllint --shell namespaces support, Windows port of the standalone testing tools (Kasimier and William), xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX Schemas APIs, Schemas xmlReader support.

    2.6.19: Apr 02 2005

    • build fixes: drop .la from RPMs, --with-minimum build fix (William Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on Linux/ELF/gcc4
    • bug fixes: schemas type decimal fixups (William Brack), xmmlint return code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute validation (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), HTML serialization of name attribute on a elements, Python error handlers leaks and improvement (Brent Hendricks), uninitialized variable in encoding code, Relax-NG validation bug, potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, switched back to assuming UTF-8 in case no encoding is given at serialization time
    • improvements: lot of work on Schemas by Kasimier Buchcik on facets checking and also mixed handling.

    2.6.18: Mar 13 2005

    • build fixes: warnings (Peter Breitenlohner), testapi.c generation, Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), some gcc4 fixes, HP-UX portability fixes (Rick Jones).
    • bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and xmlreader stopping on non-fatal errors, thread support for dictionnaries reference counting (Gary Coady), internal subset and push problem, URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix (Mike Hommey), warning should not count as error (William Brack), xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup FTP and HTTP code to reuse the uri parsing and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).
    • improvement: speedup parsing comments and DTDs, dictionnary support for hash tables, Schemas Identity constraints (Kasimier), streaming XPath subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical values handling (Kasimier), add xmlTextReaderByteConsumed (Aron Stansvik),
    • Documentation: Wiki support (Joel Reed)

    2.6.17: Jan 16 2005

    • build fixes: Windows, warnings removal (William Brack), maintainer-clean dependency(William), build in a different directory (William), fixing --with-minimum configure build (William), BeOS build (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan McNichol)
    • bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() to use the catalog(s), loop on output (William Brack), XPath memory leak, ID deallocation problem (Steve Shepard), debugDumpNode crash (William), warning not using error callback (William), xmlStopParser bug (William), UTF-16 with BOM on DTDs (William), namespace bug on empty elements in push mode (Rob Richards), line and col computations fixups (Aleksey Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), patterns with too many steps, bug in RNG choice optimization, line number sometimes missing.
    • improvements: XSD Schemas (Kasimier Buchcik), python generator (William), xmlUTF8Strpos speedup (William), unicode Python strings (William), XSD error reports (Kasimier Buchcik), Python __str__ call serialize().
    • new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel Reed), error extraction API from regexps, new XMLSave option for format (Phil Shafer)
    • documentation: site improvement (John Fleck), FAQ entries (William).

    2.6.16: Nov 10 2004

    • general hardening and bug fixing crossing all the API based on new automated regression testing
    • build fix: IPv6 build and test on AIX (Dodji Seketeli)
    • bug fixes: problem with XML::Libxml reported by Petr Pajas, encoding conversion functions return values, UTF-8 bug affecting XPath reported by Markus Bertheau, catalog problem with NULL entries (William Brack)
    • documentation: fix to xmllint man page, some API function descritpion were updated.
    • improvements: DTD validation APIs provided at the Python level (Brent Hendricks)

    2.6.15: Oct 27 2004

    • security fixes on the nanoftp and nanohttp modules
    • build fixes: xmllint detection bug in configure, building outside the source tree (Thomas Fitzsimmons)
    • bug fixes: HTML parser on broken ASCII chars in names (William), Python paths (Malcolm Tredinnick), xmlHasNsProp and default namespace (William), saving to python file objects (Malcolm Tredinnick), DTD lookup fix (Malcolm), save back <group> in catalogs (William), tree build fixes (DV and Rob Richards), Schemas memory bug, structured error handler on Python 64bits, thread local memory deallocation, memory leak reported by Volker Roth, xmlValidateDtd in the presence of an internal subset, entities and _private problem (William), xmlBuildRelativeURI error (William).
    • improvements: better XInclude error reports (William), tree debugging module and tests, convenience functions at the Reader API (Graham Bennett), add support for PI in the HTML parser.

    2.6.14: Sep 29 2004

    • build fixes: configure paths for xmllint and xsltproc, compilation without HTML parser, compilation warning cleanups (William Brack & Malcolm Tredinnick), VMS makefile update (Craig Berry),
    • bug fixes: xmlGetUTF8Char (William Brack), QName properties (Kasimier Buchcik), XInclude testing, Notation serialization, UTF8ToISO8859x transcoding (Mark Itzcovitz), lots of XML Schemas cleanup and fixes (Kasimier), ChangeLog cleanup (Stepan Kasal), memory fixes (Mark Vakoc), handling of failed realloc(), out of bound array adressing in Schemas date handling, Python space/tabs cleanups (Malcolm Tredinnick), NMTOKENS E20 validation fix (Malcolm),
    • improvements: added W3C XML Schemas testsuite (Kasimier Buchcik), add xmlSchemaValidateOneElement (Kasimier), Python exception hierearchy (Malcolm Tredinnick), Python libxml2 driver improvement (Malcolm Tredinnick), Schemas support for xsi:schemaLocation, xsi:noNamespaceSchemaLocation, xsi:type (Kasimier Buchcik)

    2.6.13: Aug 31 2004

    • build fixes: Windows and zlib (Igor Zlatkovic), -O flag with gcc, Solaris compiler warning, fixing RPM BuildRequires,
    • fixes: DTD loading on Windows (Igor), Schemas error reports APIs (Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 (William Brack and Julius Mittenzwei), Schemas facet check (Kasimier), default namespace problem (William), Schemas hexbinary empty values, encoding error could genrate a serialization loop.
    • Improvements: Schemas validity improvements (Kasimier), added --path and --load-trace options to xmllint
    • documentation: tutorial update (John Fleck)

    2.6.12: Aug 22 2004

    • build fixes: fix --with-minimum, elfgcchack.h fixes (Peter Breitenlohner), perl path lookup (William), diff on Solaris (Albert Chin), some 64bits cleanups.
    • Python: avoid a warning with 2.3 (William Brack), tab and space mixes (William), wrapper generator fixes (William), Cygwin support (Gerrit P. Haase), node wrapper fix (Marc-Antoine Parent), XML Schemas support (Torkel Lyng)
    • Schemas: a lot of bug fixes and improvements from Kasimier Buchcik
    • fixes: RVT fixes (William), XPath context resets bug (William), memory debug (Steve Hay), catalog white space handling (Peter Breitenlohner), xmlReader state after attribute reading (William), structured error handler (William), XInclude generated xml:base fixup (William), Windows memory reallocation problem (Steve Hay), Out of Memory conditions handling (William and Olivier Andrieu), htmlNewDoc() charset bug, htmlReadMemory init (William), a posteriori validation DTD base (William), notations serialization missing, xmlGetNodePath (Dodji), xmlCheckUTF8 (Diego Tartara), missing line numbers on entity (William)
    • improvements: DocBook catalog build scrip (William), xmlcatalog tool (Albert Chin), xmllint --c14n option, no_proxy environment (Mike Hommey), xmlParseInNodeContext() addition, extend xmllint --shell, allow XInclude to not generate start/end nodes, extend xmllint --version to include CVS tag (William)
    • documentation: web pages fixes, validity API docs fixes (William) schemas API fix (Eric Haszlakiewicz), xmllint man page (John Fleck)

    2.6.11: July 5 2004

    • Schemas: a lot of changes and improvements by Kasimier Buchcik for attributes, namespaces and simple types.
    • build fixes: --with-minimum (William Brack), some gcc cleanup (William), --with-thread-alloc (William)
    • portability: Windows binary package change (Igor Zlatkovic), Catalog path on Windows
    • documentation: update to the tutorial (John Fleck), xmllint return code (John Fleck), man pages (Ville Skytta),
    • bug fixes: C14N bug serializing namespaces (Aleksey Sanin), testSAX properly initialize the library (William), empty node set in XPath (William), xmlSchemas errors (William), invalid charref problem pointed by Morus Walter, XInclude xml:base generation (William), Relax-NG bug with div processing (William), XPointer and xml:base problem(William), Reader and entities, xmllint return code for schemas (William), reader streaming problem (Steve Ball), DTD serialization problem (William), libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on Python classes, xmlReader buffer bug, Python bindings memory interfaces improvement (with Stéphane Bidoul), Fixed the push parser to be back to synchronous behaviour.
    • improvement: custom per-thread I/O enhancement (Rob Richards), register namespace in debug shell (Stefano Debenedetti), Python based regression test for non-Unix users (William), dynamically increase the number of XPath extension functions in Python and fix a memory leak (Marc-Antoine Parent and William)
    • performance: hack done with Arjan van de Ven to reduce ELF footprint and generated code on Linux, plus use gcc runtime profiling to optimize the code generated in the RPM packages.

    2.6.10: May 17 2004

    • Web page generated for ChangeLog
    • build fixes: --without-html problems, make check without make all
    • portability: problem with xpath.c on Windows (MSC and Borland), memcmp vs. strncmp on Solaris, XPath tests on Windows (Mark Vakoc), C++ do not use "list" as parameter name, make tests work with Python 1.5 (Ed Davis),
    • improvements: made xmlTextReaderMode public, small buffers resizing (Morten Welinder), add --maxmem option to xmllint, add xmlPopInputCallback() for Matt Sergeant, refactoring of serialization escaping, added escaping customization
    • bugfixes: xsd:extension (Taihei Goi), assorted regexp bugs (William Brack), xmlReader end of stream problem, node deregistration with reader, URI escaping and filemanes, XHTML1 formatting (Nick Wellnhofer), regexp transition reduction (William), various XSD Schemas fixes (Kasimier Buchcik), XInclude fallback problem (William), weird problems with DTD (William), structured error handler callback context (William), reverse xmlEncodeSpecialChars() behaviour back to escaping '"'

    2.6.9: Apr 18 2004

    • implement xml:id Working Draft, relaxed XPath id() checking
    • bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave Beckett), Relax-NG compilation (William Brack), Regexp patches (with William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with William), Relax-NG name classes compares (William), XInclude duplicate fallback (William), external DTD encoding detection (William), a DTD validation bug (William), xmlReader Close() fix, recusive extention schemas
    • improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting save optimization, better handle IIS broken HTTP redirect behaviour (Ian Hummel), HTML parser frameset (James Bursa), libxml2-python RPM dependancy, XML Schemas union support (Kasimier Buchcik), warning removal clanup (William), keep ChangeLog compressed when installing from RPMs
    • documentation: examples and xmlDocDumpMemory docs (John Fleck), new example (load, xpath, modify, save), xmlCatalogDump() comments,
    • Windows: Borland C++ builder (Eric Zurcher), work around Microsoft compiler NaN handling bug (Mark Vakoc)

    2.6.8: Mar 23 2004

    • First step of the cleanup of the serialization code and APIs
    • XML Schemas: mixed content (Adam Dickmeiss), QName handling fixes (Adam Dickmeiss), anyURI for "" (John Belmonte)
    • Python: Canonicalization C14N support added (Anthony Carrico)
    • xmlDocCopyNode() extension (William)
    • Relax-NG: fix when processing XInclude results (William), external reference in interleave (William), missing error on <choice> failure (William), memory leak in schemas datatype facets.
    • xmlWriter: patch for better DTD support (Alfred Mickautsch)
    • bug fixes: xmlXPathLangFunction memory leak (Mike Hommey and William Brack), no ID errors if using HTML_PARSE_NOERROR, xmlcatalog fallbacks to URI on SYSTEM lookup failure, XInclude parse flags inheritance (William), XInclude and XPointer fixes for entities (William), XML parser bug reported by Holger Rauch, nanohttp fd leak (William), regexps char groups '-' handling (William), dictionnary reference counting problems, do not close stderr.
    • performance patches from Petr Pajas
    • Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)
    • compilation and portability fixes: --without-valid, catalog cleanups (Peter Breitenlohner), MingW patch (Roland Schwingel), cross-compilation to Windows (Christophe de Vienne), --with-html-dir fixup (Julio Merino Vidal), Windows build (Eric Zurcher)

    2.6.7: Feb 23 2004

    • documentation: tutorial updates (John Fleck), benchmark results
    • xmlWriter: updates and fixes (Alfred Mickautsch, Lucas Brasilino)
    • XPath optimization (Petr Pajas)
    • DTD ID handling optimization
    • bugfixes: xpath number with > 19 fractional (William Brack), push mode with unescaped '>' characters, fix xmllint --stream --timing, fix xmllint --memory --stream memory usage, xmlAttrSerializeTxtContent handling NULL, trying to fix Relax-NG/Perl interface.
    • python: 2.3 compatibility, whitespace fixes (Malcolm Tredinnick)
    • Added relaxng option to xmllint --shell

    2.6.6: Feb 12 2004

    • nanohttp and nanoftp: buffer overflow error on URI parsing (Igor and William) reported by Yuuichi Teranishi
    • bugfixes: make test and path issues, xmlWriter attribute serialization (William Brack), xmlWriter indentation (William), schemas validation (Eric Haszlakiewicz), XInclude dictionnaries issues (William and Oleg Paraschenko), XInclude empty fallback (William), HTML warnings (William), XPointer in XInclude (William), Python namespace serialization, isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter entities in internal subset (William), internal subset bug in push mode, <xs:all> fix (Alexey Sarytchev)
    • Build: fix for automake-1.8 (Alexander Winston), warnings removal (Philip Ludlam), SOCKLEN_T detection fixes (Daniel Richard), fix --with-minimum configuration.
    • XInclude: allow the 2001 namespace without warning.
    • Documentation: missing example/index.html (John Fleck), version dependancies (John Fleck)
    • reader API: structured error reporting (Steve Ball)
    • Windows compilation: mingw, msys (Mikhail Grushinskiy), function prototype (Cameron Johnson), MSVC6 compiler warnings, _WINSOCKAPI_ patch
    • Parsers: added xmlByteConsumed(ctxt) API to get the byte offest in input.

    2.6.5: Jan 25 2004

    • Bugfixes: dictionnaries for schemas (William Brack), regexp segfault (William), xs:all problem (William), a number of XPointer bugfixes (William), xmllint error go to stderr, DTD validation problem with namespace, memory leak (William), SAX1 cleanup and minimal options fixes (Mark Vadoc), parser context reset on error (Shaun McCance), XPath union evaluation problem (William) , xmlReallocLoc with NULL (Aleksey Sanin), XML Schemas double free (Steve Ball), XInclude with no href, argument callbacks order for XPath callbacks (Frederic Peters)
    • Documentation: python scripts (William Brack), xslt stylesheets (John Fleck), doc (Sven Zimmerman), I/O example.
    • Python bindings: fixes (William), enum support (Stéphane Bidoul), structured error reporting (Stéphane Bidoul)
    • XInclude: various fixes for conformance, problem related to dictionnary references (William & me), recursion (William)
    • xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred Mickautsch),
    • xmlSchemas: normalizedString datatype (John Belmonte)
    • code cleanup for strings functions (William)
    • Windows: compiler patches (Mark Vakoc)
    • Parser optimizations, a few new XPath and dictionnary APIs for future XSLT optimizations.

    2.6.4: Dec 24 2003

    • Windows build fixes (Igor Zlatkovic)
    • Some serious XInclude problems reported by Oleg Paraschenko and
    • Unix and Makefile packaging fixes (me, William Brack,
    • Documentation improvements (John Fleck, William Brack), example fix (Lucas Brasilino)
    • bugfixes: xmlTextReaderExpand() with xmlReaderWalker, XPath handling of NULL strings (William Brack) , API building reader or parser from filedescriptor should not close it, changed XPath sorting to be stable again (William Brack), xmlGetNodePath() generating '(null)' (William Brack), DTD validation and namespace bug (William Brack), XML Schemas double inclusion behaviour

    2.6.3: Dec 10 2003

    • documentation updates and cleanup (DV, William Brack, John Fleck)
    • added a repository of examples, examples from Aleksey Sanin, Dodji Seketeli, Alfred Mickautsch
    • Windows updates: Mark Vakoc, Igor Zlatkovic, Eric Zurcher, Mingw (Kenneth Haley)
    • Unicode range checking (William Brack)
    • code cleanup (William Brack)
    • Python bindings: doc (John Fleck), bug fixes
    • UTF-16 cleanup and BOM issues (William Brack)
    • bug fixes: ID and xmlReader validation, XPath (William Brack), xmlWriter (Alfred Mickautsch), hash.h inclusion problem, HTML parser (James Bursa), attribute defaulting and validation, some serialization cleanups, XML_GET_LINE macro, memory debug when using threads (William Brack), serialization of attributes and entities content, xmlWriter (Daniel Schulman)
    • XInclude bugfix, new APIs and update to the last version including the namespace change.
    • XML Schemas improvements: include (Robert Stepanek), import and namespace handling, fixed the regression tests troubles, added examples based on Eric van der Vlist book, regexp fixes
    • preliminary pattern support for streaming (needed for schemas constraints), added xmlTextReaderPreservePattern() to collect subdocument when streaming.
    • various fixes in the structured error handling

    2.6.2: Nov 4 2003

    • XPath context unregistration fixes
    • text node coalescing fixes (Mark Lilback)
    • API to screate a W3C Schemas from an existing document (Steve Ball)
    • BeOS patches (Marcin 'Shard' Konicki)
    • xmlStrVPrintf function added (Aleksey Sanin)
    • compilation fixes (Mark Vakoc)
    • stdin parsing fix (William Brack)
    • a posteriori DTD validation fixes
    • xmlReader bug fixes: Walker fixes, python bindings
    • fixed xmlStopParser() to really stop the parser and errors
    • always generate line numbers when using the new xmlReadxxx functions
    • added XInclude support to the xmlReader interface
    • implemented XML_PARSE_NONET parser option
    • DocBook XSLT processing bug fixed
    • HTML serialization for <p> elements (William Brack and me)
    • XPointer failure in XInclude are now handled as resource errors
    • fixed xmllint --html to use the HTML serializer on output (added --xmlout to implement the previous behaviour of saving it using the XML serializer)

    2.6.1: Oct 28 2003

    • Mostly bugfixes after the big 2.6.0 changes
    • Unix compilation patches: libxml.m4 (Patrick Welche), warnings cleanup (William Brack)
    • Windows compilation patches (Joachim Bauch, Stephane Bidoul, Igor Zlatkovic)
    • xmlWriter bugfix (Alfred Mickautsch)
    • chvalid.[ch]: couple of fixes from Stephane Bidoul
    • context reset: error state reset, push parser reset (Graham Bennett)
    • context reuse: generate errors if file is not readable
    • defaulted attributes for element coming from internal entities (Stephane Bidoul)
    • Python: tab and spaces mix (William Brack)
    • Error handler could crash in DTD validation in 2.6.0
    • xmlReader: do not use the document or element _private field
    • testSAX.c: avoid a problem with some PIs (Massimo Morara)
    • general bug fixes: mandatory encoding in text decl, serializing Document Fragment nodes, xmlSearchNs 2.6.0 problem (Kasimier Buchcik), XPath errors not reported, slow HTML parsing of large documents.

    2.6.0: Oct 20 2003

    • Major revision release: should be API and ABI compatible but got a lot of change
    • Increased the library modularity, far more options can be stripped out, a --with-minimum configuration will weight around 160KBytes
    • Use per parser and per document dictionnary, allocate names and small text nodes from the dictionnary
    • Switch to a SAX2 like parser rewrote most of the XML parser core, provides namespace resolution and defaulted attributes, minimize memory allocations and copies, namespace checking and specific error handling, immutable buffers, make predefined entities static structures, etc...
    • rewrote all the error handling in the library, all errors can be intercepted at a structured level, with precise information available.
    • New simpler and more generic XML and HTML parser APIs, allowing to easilly modify the parsing options and reuse parser context for multiple consecutive documents.
    • Similar new APIs for the xmlReader, for options and reuse, provided new functions to access content as const strings, use them for Python bindings
    • a lot of other smaller API improvements: xmlStrPrintf (Aleksey Sanin), Walker i.e. reader on a document tree based on Alfred Mickautsch code, make room in nodes for line numbers, reference counting and future PSVI extensions, generation of character ranges to be checked with faster algorithm (William), xmlParserMaxDepth (Crutcher Dunnavant), buffer access
    • New xmlWriter API provided by Alfred Mickautsch
    • Schemas: base64 support by Anthony Carrico
    • Parser<->HTTP integration fix, proper processing of the Mime-Type and charset information if available.
    • Relax-NG: bug fixes including the one reported by Martijn Faassen and zeroOrMore, better error reporting.
    • Python bindings (Stéphane Bidoul), never use stdout for errors output
    • Portability: all the headers have macros for export and calling convention definitions (Igor Zlatkovic), VMS update (Craig A. Berry), Windows: threads (Jesse Pelton), Borland compiler (Eric Zurcher, Igor), Mingw (Igor), typos (Mark Vakoc), beta version (Stephane Bidoul), warning cleanups on AIX and MIPS compilers (William Brack), BeOS (Marcin 'Shard' Konicki)
    • Documentation fixes and README (William Brack), search fix (William), tutorial updates (John Fleck), namespace docs (Stefan Kost)
    • Bug fixes: xmlCleanupParser (Dave Beckett), threading uninitialized mutexes, HTML doctype lowercase, SAX/IO (William), compression detection and restore (William), attribute declaration in DTDs (William), namespace on attribute in HTML output (William), input filename (Rob Richards), namespace DTD validation, xmlReplaceNode (Chris Ryland), I/O callbacks (Markus Keim), CDATA serialization (Shaun McCance), xmlReader (Peter Derr), high codepoint charref like &#x10FFFF;, buffer access in push mode (Justin Fletcher), TLS threads on Windows (Jesse Pelton), XPath bug (William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP error handling.
    • xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat testing, --nodict for building without tree dictionnary, --nocdata to replace CDATA by text, --nsclean to remove surperfluous namespace declarations
    • added xml2-config --libtool-libs option from Kevin P. Fleming
    • a lot of profiling and tuning of the code, speedup patch for xmlSearchNs() by Luca Padovani. The xmlReader should do far less allocation and it speed should get closer to SAX. Chris Anderson worked on speeding and cleaning up repetitive checking code.
    • cleanup of "make tests"
    • libxml-2.0-uninstalled.pc from Malcolm Tredinnick
    • deactivated the broken docBook SGML parser code and plugged the XML parser instead.

    2.5.11: Sep 9 2003

    A bugfix only release:

    • risk of crash in Relax-NG
    • risk of crash when using multithreaded programs

    2.5.10: Aug 15 2003

    A bugfixes only release

    • Windows Makefiles (William Brack)
    • UTF-16 support fixes (Mark Itzcovitz)
    • Makefile and portability (William Brack) automake, Linux alpha, Mingw on Windows (Mikhail Grushinskiy)
    • HTML parser (Oliver Stoeneberg)
    • XInclude performance problem reported by Kevin Ruscoe
    • XML parser performance problem reported by Grant Goodale
    • xmlSAXParseDTD() bug fix from Malcolm Tredinnick
    • and a couple other cleanup

    2.5.9: Aug 9 2003

    • bugfixes: IPv6 portability, xmlHasNsProp (Markus Keim), Windows build (Wiliam Brake, Jesse Pelton, Igor), Schemas (Peter Sobisch), threading (Rob Richards), hexBinary type (), UTF-16 BOM (Dodji Seketeli), xmlReader, Relax-NG schemas compilation, namespace handling, EXSLT (Sean Griffin), HTML parsing problem (William Brack), DTD validation for mixed content + namespaces, HTML serialization, library initialization, progressive HTML parser
    • better interfaces for Relax-NG error handling (Joachim Bauch, )
    • adding xmlXIncludeProcessTree() for XInclud'ing in a subtree
    • doc fixes and improvements (John Fleck)
    • configure flag for -with-fexceptions when embedding in C++
    • couple of new UTF-8 helper functions (William Brack)
    • general encoding cleanup + ISO-8859-x without iconv (Peter Jacobi)
    • xmlTextReader cleanup + enum for node types (Bjorn Reese)
    • general compilation/warning cleanup Solaris/HP-UX/... (William Brack)

    2.5.8: Jul 6 2003

    • bugfixes: XPath, XInclude, file/URI mapping, UTF-16 save (Mark Itzcovitz), UTF-8 checking, URI saving, error printing (William Brack), PI related memleak, compilation without schemas or without xpath (Joerg Schmitz-Linneweber/Garry Pennington), xmlUnlinkNode problem with DTDs, rpm problem on , i86_64, removed a few compilation problems from 2.5.7, xmlIOParseDTD, and xmlSAXParseDTD (Malcolm Tredinnick)
    • portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)
    • William Brack fixed multithreading lock problems
    • IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)
    • Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane Bidoul)
    • A few W3C Schemas Structure improvements
    • W3C Schemas Datatype improvements (Charlie Bozeman)
    • Python bindings for thread globals (Stéphane Bidoul), and method/class generator
    • added --nonet option to xmllint
    • documentation improvements (John Fleck)

    2.5.7: Apr 25 2003

    • Relax-NG: Compiling to regexp and streaming validation on top of the xmlReader interface, added to xmllint --stream
    • xmlReader: Expand(), Next() and DOM access glue, bug fixes
    • Support for large files: RGN validated a 4.5GB instance
    • Thread support is now configured in by default
    • Fixes: update of the Trio code (Bjorn), WXS Date and Duration fixes (Charles Bozeman), DTD and namespaces (Brent Hendricks), HTML push parser and zero bytes handling, some missing Windows file path conversions, behaviour of the parser and validator in the presence of "out of memory" error conditions
    • extended the API to be able to plug a garbage collecting memory allocator, added xmlMallocAtomic() and modified the allocations accordingly.
    • Performances: removed excessive malloc() calls, speedup of the push and xmlReader interfaces, removed excessive thread locking
    • Documentation: man page (John Fleck), xmlReader documentation
    • Python: adding binding for xmlCatalogAddLocal (Brent M Hendricks)

    2.5.6: Apr 1 2003

    • Fixed W3C XML Schemas datatype, should be compliant now except for binHex and base64 which are not supported yet.
    • bug fixes: non-ASCII IDs, HTML output, XInclude on large docs and XInclude entities handling, encoding detection on external subsets, XML Schemas bugs and memory leaks, HTML parser (James Bursa)
    • portability: python/trio (Albert Chin), Sun compiler warnings
    • documentation: added --relaxng option to xmllint man page (John)
    • improved error reporting: xml:space, start/end tag mismatches, Relax NG errors

    2.5.5: Mar 24 2003

    • Lot of fixes on the Relax NG implementation. More testing including DocBook and TEI examples.
    • Increased the support for W3C XML Schemas datatype
    • Several bug fixes in the URI handling layer
    • Bug fixes: HTML parser, xmlReader, DTD validation, XPath, encoding conversion, line counting in the parser.
    • Added support for $XMLLINT_INDENT environment variable, FTP delete
    • Fixed the RPM spec file name

    2.5.4: Feb 20 2003

    • Conformance testing and lot of fixes on Relax NG and XInclude implementation
    • Implementation of XPointer element() scheme
    • Bug fixes: XML parser, XInclude entities merge, validity checking on namespaces,

      2 serialization bugs, node info generation problems, a DTD regexp generation problem.

    • Portability: windows updates and path canonicalization (Igor)
    • A few typo fixes (Kjartan Maraas)
    • Python bindings generator fixes (Stephane Bidoul)

    2.5.3: Feb 10 2003

    • RelaxNG and XML Schemas datatypes improvements, and added a first version of RelaxNG Python bindings
    • Fixes: XLink (Sean Chittenden), XInclude (Sean Chittenden), API fix for serializing namespace nodes, encoding conversion bug, XHTML1 serialization
    • Portability fixes: Windows (Igor), AMD 64bits RPM spec file

    2.5.2: Feb 5 2003

    • First implementation of RelaxNG, added --relaxng flag to xmllint
    • Schemas support now compiled in by default.
    • Bug fixes: DTD validation, namespace checking, XInclude and entities, delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul), XPath parser and evaluation, UTF8ToUTF8 serialization, XML reader memory consumption, HTML parser, HTML serialization in the presence of namespaces
    • added an HTML API to check elements and attributes.
    • Documentation improvement, PDF for the tutorial (John Fleck), doc patches (Stefan Kost)
    • Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)
    • Added python bindings for XPointer, contextual error reporting (Stéphane Bidoul)
    • URI/file escaping problems (Stefano Zacchiroli)

    2.5.1: Jan 8 2003

    • Fixes a memory leak and configuration/compilation problems in 2.5.0
    • documentation updates (John)
    • a couple of XmlTextReader fixes

    2.5.0: Jan 6 2003

    • New XmltextReader interface based on C# API (with help of Stéphane Bidoul)
    • Windows: more exports, including the new API (Igor)
    • XInclude fallback fix
    • Python: bindings for the new API, packaging (Stéphane Bidoul), drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup and iterators for Python-2.2 (Hannu Krosing)
    • Tutorial fixes (john Fleck and Niraj Tolia) xmllint man update (John)
    • Fix an XML parser bug raised by Vyacheslav Pindyura
    • Fix for VMS serialization (Nigel Hall) and config (Craig A. Berry)
    • Entities handling fixes
    • new API to optionally track node creation and deletion (Lukas Schroeder)
    • Added documentation for the XmltextReader interface and some XML guidelines

    2.4.30: Dec 12 2002

    • 2.4.29 broke the python bindings, rereleasing
    • Improvement/fixes of the XML API generator, and couple of minor code fixes.

    2.4.29: Dec 11 2002

    • Windows fixes (Igor): Windows CE port, pthread linking, python bindings (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates
    • Fix for prev in python bindings (ERDI Gergo)
    • Fix for entities handling (Marcus Clarke)
    • Refactored the XML and HTML dumps to a single code path, fixed XHTML1 dump
    • Fix for URI parsing when handling URNs with fragment identifiers
    • Fix for HTTP URL escaping problem
    • added an TextXmlReader (C#) like API (work in progress)
    • Rewrote the API in XML generation script, includes a C parser and saves more information needed for C# bindings

    2.4.28: Nov 22 2002

    • a couple of python binding fixes
    • 2 bug fixes in the XML push parser
    • potential memory leak removed (Martin Stoilov)
    • fix to the configure script for Unix (Dimitri Papadopoulos)
    • added encoding support for XInclude parse="text"
    • autodetection of XHTML1 and specific serialization rules added
    • nasty threading bug fixed (William Brack)

    2.4.27: Nov 17 2002

    • fixes for the Python bindings
    • a number of bug fixes: SGML catalogs, xmlParseBalancedChunkMemory(), HTML parser, Schemas (Charles Bozeman), document fragment support (Christian Glahn), xmlReconciliateNs (Brian Stafford), XPointer, xmlFreeNode(), xmlSAXParseMemory (Peter Jones), xmlGetNodePath (Petr Pajas), entities processing
    • added grep to xmllint --shell
    • VMS update patch from Craig A. Berry
    • cleanup of the Windows build with support for more compilers (Igor), better thread support on Windows
    • cleanup of Unix Makefiles and spec file
    • Improvements to the documentation (John Fleck)

    2.4.26: Oct 18 2002

    • Patches for Windows CE port, improvements on Windows paths handling
    • Fixes to the validation code (DTD and Schemas), xmlNodeGetPath() , HTML serialization, Namespace compliance, and a number of small problems

    2.4.25: Sep 26 2002

    • A number of bug fixes: XPath, validation, Python bindings, DOM and tree, xmlI/O, Html
    • Serious rewrite of XInclude
    • Made XML Schemas regexp part of the default build and APIs, small fix and improvement of the regexp core
    • Changed the validation code to reuse XML Schemas regexp APIs
    • Better handling of Windows file paths, improvement of Makefiles (Igor, Daniel Gehriger, Mark Vakoc)
    • Improved the python I/O bindings, the tests, added resolver and regexp APIs
    • New logos from Marc Liyanage
    • Tutorial improvements: John Fleck, Christopher Harris
    • Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe Merlet)
    • removal of all stderr/perror use for error reporting
    • Better error reporting: XPath and DTD validation
    • update of the trio portability layer (Bjorn Reese)

    2.4.24: Aug 22 2002

    • XPath fixes (William), xf:escape-uri() (Wesley Terpstra)
    • Python binding fixes: makefiles (William), generator, rpm build, x86-64 (fcrozat)
    • HTML <style> and boolean attributes serializer fixes
    • C14N improvements by Aleksey
    • doc cleanups: Rick Jones
    • Windows compiler makefile updates: Igor and Elizabeth Barham
    • XInclude: implementation of fallback and xml:base fixup added

    2.4.23: July 6 2002

    • performances patches: Peter Jacobi
    • c14n fixes, testsuite and performances: Aleksey Sanin
    • added xmlDocFormatDump: Chema Celorio
    • new tutorial: John Fleck
    • new hash functions and performances: Sander Vesik, portability fix from Peter Jacobi
    • a number of bug fixes: XPath (William Brack, Richard Jinks), XML and HTML parsers, ID lookup function
    • removal of all remaining sprintf: Aleksey Sanin

    2.4.22: May 27 2002

    • a number of bug fixes: configure scripts, base handling, parser, memory usage, HTML parser, XPath, documentation (Christian Cornelssen), indentation, URI parsing
    • Optimizations for XMLSec, fixing and making public some of the network protocol handlers (Aleksey)
    • performance patch from Gary Pennington
    • Charles Bozeman provided date and time support for XML Schemas datatypes

    2.4.21: Apr 29 2002

    This release is both a bug fix release and also contains the early XML Schemas structures and datatypes code, beware, all interfaces are likely to change, there is huge holes, it is clearly a work in progress and don't even think of putting this code in a production system, it's actually not compiled in by default. The real fixes are:

    • a couple of bugs or limitations introduced in 2.4.20
    • patches for Borland C++ and MSC by Igor
    • some fixes on XPath strings and conformance patches by Richard Jinks
    • patch from Aleksey for the ExcC14N specification
    • OSF/1 bug fix by Bjorn

    2.4.20: Apr 15 2002

    • bug fixes: file descriptor leak, XPath, HTML output, DTD validation
    • XPath conformance testing by Richard Jinks
    • Portability fixes: Solaris, MPE/iX, Windows, OSF/1, python bindings, libxml.m4

    2.4.19: Mar 25 2002

    • bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8 encoder
    • portability fixes in the HTTP code
    • memory allocation checks using valgrind, and profiling tests
    • revamp of the Windows build and Makefiles

    2.4.18: Mar 18 2002

    • bug fixes: tree, SAX, canonicalization, validation, portability, XPath
    • removed the --with-buffer option it was becoming unmaintainable
    • serious cleanup of the Python makefiles
    • speedup patch to XPath very effective for DocBook stylesheets
    • Fixes for Windows build, cleanup of the documentation

    2.4.17: Mar 8 2002

    • a lot of bug fixes, including "namespace nodes have no parents in XPath"
    • fixed/improved the Python wrappers, added more examples and more regression tests, XPath extension functions can now return node-sets
    • added the XML Canonicalization support from Aleksey Sanin

    2.4.16: Feb 20 2002

    • a lot of bug fixes, most of them were triggered by the XML Testsuite from OASIS and W3C. Compliance has been significantly improved.
    • a couple of portability fixes too.

    2.4.15: Feb 11 2002

    • Fixed the Makefiles, especially the python module ones
    • A few bug fixes and cleanup
    • Includes cleanup

    2.4.14: Feb 8 2002

    • Change of License to the MIT License basically for integration in XFree86 codebase, and removing confusion around the previous dual-licensing
    • added Python bindings, beta software but should already be quite complete
    • a large number of fixes and cleanups, especially for all tree manipulations
    • cleanup of the headers, generation of a reference API definition in XML

    2.4.13: Jan 14 2002

    • update of the documentation: John Fleck and Charlie Bozeman
    • cleanup of timing code from Justin Fletcher
    • fixes for Windows and initial thread support on Win32: Igor and Serguei Narojnyi
    • Cygwin patch from Robert Collins
    • added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg

    2.4.12: Dec 7 2001

    • a few bug fixes: thread (Gary Pennington), xmllint (Geert Kloosterman), XML parser (Robin Berjon), XPointer (Danny Jamshy), I/O cleanups (robert)
    • Eric Lavigne contributed project files for MacOS
    • some makefiles cleanups

    2.4.11: Nov 26 2001

    • fixed a couple of errors in the includes, fixed a few bugs, some code cleanups
    • xmllint man pages improvement by Heiko Rupp
    • updated VMS build instructions from John A Fotheringham
    • Windows Makefiles updates from Igor

    2.4.10: Nov 10 2001

    • URI escaping fix (Joel Young)
    • added xmlGetNodePath() (for paths or XPointers generation)
    • Fixes namespace handling problems when using DTD and validation
    • improvements on xmllint: Morus Walter patches for --format and --encode, Stefan Kost and Heiko Rupp improvements on the --shell
    • fixes for xmlcatalog linking pointed by Weiqi Gao
    • fixes to the HTML parser

    2.4.9: Nov 6 2001

    • fixes more catalog bugs
    • avoid a compilation problem, improve xmlGetLineNo()

    2.4.8: Nov 4 2001

    • fixed SGML catalogs broken in previous release, updated xmlcatalog tool
    • fixed a compile errors and some includes troubles.

    2.4.7: Oct 30 2001

    • exported some debugging interfaces
    • serious rewrite of the catalog code
    • integrated Gary Pennington thread safety patch, added configure option and regression tests
    • removed an HTML parser bug
    • fixed a couple of potentially serious validation bugs
    • integrated the SGML DocBook support in xmllint
    • changed the nanoftp anonymous login passwd
    • some I/O cleanup and a couple of interfaces for Perl wrapper
    • general bug fixes
    • updated xmllint man page by John Fleck
    • some VMS and Windows updates

    2.4.6: Oct 10 2001

    • added an updated man pages by John Fleck
    • portability and configure fixes
    • an infinite loop on the HTML parser was removed (William)
    • Windows makefile patches from Igor
    • fixed half a dozen bugs reported for libxml or libxslt
    • updated xmlcatalog to be able to modify SGML super catalogs

    2.4.5: Sep 14 2001

    • Remove a few annoying bugs in 2.4.4
    • forces the HTML serializer to output decimal charrefs since some version of Netscape can't handle hexadecimal ones

    1.8.16: Sep 14 2001

    • maintenance release of the old libxml1 branch, couple of bug and portability fixes

    2.4.4: Sep 12 2001

    • added --convert to xmlcatalog, bug fixes and cleanups of XML Catalog
    • a few bug fixes and some portability changes
    • some documentation cleanups

    2.4.3: Aug 23 2001

    • XML Catalog support see the doc
    • New NaN/Infinity floating point code
    • A few bug fixes

    2.4.2: Aug 15 2001

    • adds xmlLineNumbersDefault() to control line number generation
    • lot of bug fixes
    • the Microsoft MSC projects files should now be up to date
    • inheritance of namespaces from DTD defaulted attributes
    • fixes a serious potential security bug
    • added a --format option to xmllint

    2.4.1: July 24 2001

    • possibility to keep line numbers in the tree
    • some computation NaN fixes
    • extension of the XPath API
    • cleanup for alpha and ia64 targets
    • patch to allow saving through HTTP PUT or POST

    2.4.0: July 10 2001

    • Fixed a few bugs in XPath, validation, and tree handling.
    • Fixed XML Base implementation, added a couple of examples to the regression tests
    • A bit of cleanup

    2.3.14: July 5 2001

    • fixed some entities problems and reduce memory requirement when substituting them
    • lots of improvements in the XPath queries interpreter can be substantially faster
    • Makefiles and configure cleanups
    • Fixes to XPath variable eval, and compare on empty node set
    • HTML tag closing bug fixed
    • Fixed an URI reference computation problem when validating

    2.3.13: June 28 2001

    • 2.3.12 configure.in was broken as well as the push mode XML parser
    • a few more fixes for compilation on Windows MSC by Yon Derek

    1.8.14: June 28 2001

    • Zbigniew Chyla gave a patch to use the old XML parser in push mode
    • Small Makefile fix

    2.3.12: June 26 2001

    • lots of cleanup
    • a couple of validation fix
    • fixed line number counting
    • fixed serious problems in the XInclude processing
    • added support for UTF8 BOM at beginning of entities
    • fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0 miscompile uri.c (William), Thomas Leitner provided a fix for the optimizer on Tru64
    • incorporated Yon Derek and Igor Zlatkovic fixes and improvements for compilation on Windows MSC
    • update of libxml-doc.el (Felix Natter)
    • fixed 2 bugs in URI normalization code

    2.3.11: June 17 2001

    • updates to trio, Makefiles and configure should fix some portability problems (alpha)
    • fixed some HTML serialization problems (pre, script, and block/inline handling), added encoding aware APIs, cleanup of this code
    • added xmlHasNsProp()
    • implemented a specific PI for encoding support in the DocBook SGML parser
    • some XPath fixes (-Infinity, / as a function parameter and namespaces node selection)
    • fixed a performance problem and an error in the validation code
    • fixed XInclude routine to implement the recursive behaviour
    • fixed xmlFreeNode problem when libxml is included statically twice
    • added --version to xmllint for bug reports

    2.3.10: June 1 2001

    • fixed the SGML catalog support
    • a number of reported bugs got fixed, in XPath, iconv detection, XInclude processing
    • XPath string function should now handle unicode correctly

    2.3.9: May 19 2001

    Lots of bugfixes, and added a basic SGML catalog support:

    • HTML push bugfix #54891 and another patch from Jonas Borgström
    • some serious speed optimization again
    • some documentation cleanups
    • trying to get better linking on Solaris (-R)
    • XPath API cleanup from Thomas Broyer
    • Validation bug fixed #54631, added a patch from Gary Pennington, fixed xmlValidGetValidElements()
    • Added an INSTALL file
    • Attribute removal added to API: #54433
    • added a basic support for SGML catalogs
    • fixed xmlKeepBlanksDefault(0) API
    • bugfix in xmlNodeGetLang()
    • fixed a small configure portability problem
    • fixed an inversion of SYSTEM and PUBLIC identifier in HTML document

    1.8.13: May 14 2001

    • bugfixes release of the old libxml1 branch used by Gnome

    2.3.8: May 3 2001

    • Integrated an SGML DocBook parser for the Gnome project
    • Fixed a few things in the HTML parser
    • Fixed some XPath bugs raised by XSLT use, tried to fix the floating point portability issue
    • Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for DOM+validation using the XML REC as input and a 700MHz celeron).
    • incorporated more Windows cleanup
    • added xmlSaveFormatFile()
    • fixed problems in copying nodes with entities references (gdome)
    • removed some troubles surrounding the new validation module

    2.3.7: April 22 2001

    • lots of small bug fixes, corrected XPointer
    • Non deterministic content model validation support
    • added xmlDocCopyNode for gdome2
    • revamped the way the HTML parser handles end of tags
    • XPath: corrections of namespaces support and number formatting
    • Windows: Igor Zlatkovic patches for MSC compilation
    • HTML output fixes from P C Chow and William M. Brack
    • Improved validation speed sensible for DocBook
    • fixed a big bug with ID declared in external parsed entities
    • portability fixes, update of Trio from Bjorn Reese

    2.3.6: April 8 2001

    • Code cleanup using extreme gcc compiler warning options, found and cleared half a dozen potential problem
    • the Eazel team found an XML parser bug
    • cleaned up the user of some of the string formatting function. used the trio library code to provide the one needed when the platform is missing them
    • xpath: removed a memory leak and fixed the predicate evaluation problem, extended the testsuite and cleaned up the result. XPointer seems broken ...

    2.3.5: Mar 23 2001

    • Biggest change is separate parsing and evaluation of XPath expressions, there is some new APIs for this too
    • included a number of bug fixes(XML push parser, 51876, notations, 52299)
    • Fixed some portability issues

    2.3.4: Mar 10 2001

    • Fixed bugs #51860 and #51861
    • Added a global variable xmlDefaultBufferSize to allow default buffer size to be application tunable.
    • Some cleanup in the validation code, still a bug left and this part should probably be rewritten to support ambiguous content model :-\
    • Fix a couple of serious bugs introduced or raised by changes in 2.3.3 parser
    • Fixed another bug in xmlNodeGetContent()
    • Bjorn fixed XPath node collection and Number formatting
    • Fixed a loop reported in the HTML parsing
    • blank space are reported even if the Dtd content model proves that they are formatting spaces, this is for XML conformance

    2.3.3: Mar 1 2001

    • small change in XPath for XSLT
    • documentation cleanups
    • fix in validation by Gary Pennington
    • serious parsing performances improvements

    2.3.2: Feb 24 2001

    • chasing XPath bugs, found a bunch, completed some TODO
    • fixed a Dtd parsing bug
    • fixed a bug in xmlNodeGetContent
    • ID/IDREF support partly rewritten by Gary Pennington

    2.3.1: Feb 15 2001

    • some XPath and HTML bug fixes for XSLT
    • small extension of the hash table interfaces for DOM gdome2 implementation
    • A few bug fixes

    2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track)

    • Lots of XPath bug fixes
    • Add a mode with Dtd lookup but without validation error reporting for XSLT
    • Add support for text node without escaping (XSLT)
    • bug fixes for xmlCheckFilename
    • validation code bug fixes from Gary Pennington
    • Patch from Paul D. Smith correcting URI path normalization
    • Patch to allow simultaneous install of libxml-devel and libxml2-devel
    • the example Makefile is now fixed
    • added HTML to the RPM packages
    • tree copying bugfixes
    • updates to Windows makefiles
    • optimization patch from Bjorn Reese

    2.2.11: Jan 4 2001

    • bunch of bug fixes (memory I/O, xpath, ftp/http, ...)
    • added htmlHandleOmittedElem()
    • Applied Bjorn Reese's IPV6 first patch
    • Applied Paul D. Smith patches for validation of XInclude results
    • added XPointer xmlns() new scheme support

    2.2.10: Nov 25 2000

    • Fix the Windows problems of 2.2.8
    • integrate OpenVMS patches
    • better handling of some nasty HTML input
    • Improved the XPointer implementation
    • integrate a number of provided patches

    2.2.9: Nov 25 2000

    • erroneous release :-(

    2.2.8: Nov 13 2000

    • First version of XInclude support
    • Patch in conditional section handling
    • updated MS compiler project
    • fixed some XPath problems
    • added an URI escaping function
    • some other bug fixes

    2.2.7: Oct 31 2000

    • added message redirection
    • XPath improvements (thanks TOM !)
    • xmlIOParseDTD() added
    • various small fixes in the HTML, URI, HTTP and XPointer support
    • some cleanup of the Makefile, autoconf and the distribution content

    2.2.6: Oct 25 2000:

    • Added an hash table module, migrated a number of internal structure to those
    • Fixed a posteriori validation problems
    • HTTP module cleanups
    • HTML parser improvements (tag errors, script/style handling, attribute normalization)
    • coalescing of adjacent text nodes
    • couple of XPath bug fixes, exported the internal API

    2.2.5: Oct 15 2000:

    • XPointer implementation and testsuite
    • Lot of XPath fixes, added variable and functions registration, more tests
    • Portability fixes, lots of enhancements toward an easy Windows build and release
    • Late validation fixes
    • Integrated a lot of contributed patches
    • added memory management docs
    • a performance problem when using large buffer seems fixed

    2.2.4: Oct 1 2000:

    • main XPath problem fixed
    • Integrated portability patches for Windows
    • Serious bug fixes on the URI and HTML code

    2.2.3: Sep 17 2000

    • bug fixes
    • cleanup of entity handling code
    • overall review of all loops in the parsers, all sprintf usage has been checked too
    • Far better handling of larges Dtd. Validating against DocBook XML Dtd works smoothly now.

    1.8.10: Sep 6 2000

    • bug fix release for some Gnome projects

    2.2.2: August 12 2000

    • mostly bug fixes
    • started adding routines to access xml parser context options

    2.2.1: July 21 2000

    • a purely bug fixes release
    • fixed an encoding support problem when parsing from a memory block
    • fixed a DOCTYPE parsing problem
    • removed a bug in the function allowing to override the memory allocation routines

    2.2.0: July 14 2000

    • applied a lot of portability fixes
    • better encoding support/cleanup and saving (content is now always encoded in UTF-8)
    • the HTML parser now correctly handles encodings
    • added xmlHasProp()
    • fixed a serious problem with &#38;
    • propagated the fix to FTP client
    • cleanup, bugfixes, etc ...
    • Added a page about libxml Internationalization support

    1.8.9: July 9 2000

    • fixed the spec the RPMs should be better
    • fixed a serious bug in the FTP implementation, released 1.8.9 to solve rpmfind users problem

    2.1.1: July 1 2000

    • fixes a couple of bugs in the 2.1.0 packaging
    • improvements on the HTML parser

    2.1.0 and 1.8.8: June 29 2000

    • 1.8.8 is mostly a commodity package for upgrading to libxml2 according to new instructions. It fixes a nasty problem about &#38; charref parsing
    • 2.1.0 also ease the upgrade from libxml v1 to the recent version. it also contains numerous fixes and enhancements:
      • added xmlStopParser() to stop parsing
      • improved a lot parsing speed when there is large CDATA blocs
      • includes XPath patches provided by Picdar Technology
      • tried to fix as much as possible DTD validation and namespace related problems
      • output to a given encoding has been added/tested
      • lot of various fixes

    2.0.0: Apr 12 2000

    • First public release of libxml2. If you are using libxml, it's a good idea to check the 1.x to 2.x upgrade instructions. NOTE: while initially scheduled for Apr 3 the release occurred only on Apr 12 due to massive workload.
    • The include are now located under $prefix/include/libxml (instead of $prefix/include/gnome-xml), they also are referenced by
      #include <libxml/xxx.h>

      instead of

      #include "xxx.h"
    • a new URI module for parsing URIs and following strictly RFC 2396
    • the memory allocation routines used by libxml can now be overloaded dynamically by using xmlMemSetup()
    • The previously CVS only tool tester has been renamed xmllint and is now installed as part of the libxml2 package
    • The I/O interface has been revamped. There is now ways to plug in specific I/O modules, either at the URI scheme detection level using xmlRegisterInputCallbacks() or by passing I/O functions when creating a parser context using xmlCreateIOParserCtxt()
    • there is a C preprocessor macro LIBXML_VERSION providing the version number of the libxml module in use
    • a number of optional features of libxml can now be excluded at configure time (FTP/HTTP/HTML/XPath/Debug)

    2.0.0beta: Mar 14 2000

    • This is a first Beta release of libxml version 2
    • It's available only fromxmlsoft.org FTP, it's packaged as libxml2-2.0.0beta and available as tar and RPMs
    • This version is now the head in the Gnome CVS base, the old one is available under the tag LIB_XML_1_X
    • This includes a very large set of changes. From a programmatic point of view applications should not have to be modified too much, check the upgrade page
    • Some interfaces may changes (especially a bit about encoding).
    • the updates includes:
      • fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly handled now
      • Better handling of entities, especially well-formedness checking and proper PEref extensions in external subsets
      • DTD conditional sections
      • Validation now correctly handle entities content
      • change structures to accommodate DOM
    • Serious progress were made toward compliance, here are the result of the test against the OASIS testsuite (except the Japanese tests since I don't support that encoding yet). This URL is rebuilt every couple of hours using the CVS head version.

    1.8.7: Mar 6 2000

    • This is a bug fix release:
    • It is possible to disable the ignorable blanks heuristic used by libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note that for adherence to XML spec, this behaviour will be disabled by default in 2.x . The same function will allow to keep compatibility for old code.
    • Blanks in <a> </a> constructs are not ignored anymore, avoiding heuristic is really the Right Way :-\
    • The unchecked use of snprintf which was breaking libxml-1.8.6 compilation on some platforms has been fixed
    • nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing URIs

    1.8.6: Jan 31 2000

    • added a nanoFTP transport module, debugged until the new version of rpmfind can use it without troubles

    1.8.5: Jan 21 2000

    • adding APIs to parse a well balanced chunk of XML (production [43] content of the XML spec)
    • fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no
    • Jody Goldberg <jgoldberg@home.com> provided another patch trying to solve the zlib checks problems
    • The current state in gnome CVS base is expected to ship as 1.8.5 with gnumeric soon

    1.8.4: Jan 13 2000

    • bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()
    • all exit() call should have been removed from libxml
    • fixed a problem with INCLUDE_WINSOCK on WIN32 platform
    • added newDocFragment()

    1.8.3: Jan 5 2000

    • a Push interface for the XML and HTML parsers
    • a shell-like interface to the document tree (try tester --shell :-)
    • lots of bug fixes and improvement added over XMas holidays
    • fixed the DTD parsing code to work with the xhtml DTD
    • added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()
    • Fixed bugs in xmlNewNs()
    • External entity loading code has been revamped, now it uses xmlLoadExternalEntity(), some fix on entities processing were added
    • cleaned up WIN32 includes of socket stuff

    1.8.2: Dec 21 1999

    • I got another problem with includes and C++, I hope this issue is fixed for good this time
    • Added a few tree modification functions: xmlReplaceNode, xmlAddPrevSibling, xmlAddNextSibling, xmlNodeSetName and xmlDocSetRootElement
    • Tried to improve the HTML output with help from Chris Lahey

    1.8.1: Dec 18 1999

    • various patches to avoid troubles when using libxml with C++ compilers the "namespace" keyword and C escaping in include files
    • a problem in one of the core macros IS_CHAR was corrected
    • fixed a bug introduced in 1.8.0 breaking default namespace processing, and more specifically the Dia application
    • fixed a posteriori validation (validation after parsing, or by using a Dtd not specified in the original document)
    • fixed a bug in

    1.8.0: Dec 12 1999

    • cleanup, especially memory wise
    • the parser should be more reliable, especially the HTML one, it should not crash, whatever the input !
    • Integrated various patches, especially a speedup improvement for large dataset from Carl Nygard, configure with --with-buffers to enable them.
    • attribute normalization, oops should have been added long ago !
    • attributes defaulted from DTDs should be available, xmlSetProp() now does entities escaping by default.

    1.7.4: Oct 25 1999

    • Lots of HTML improvement
    • Fixed some errors when saving both XML and HTML
    • More examples, the regression tests should now look clean
    • Fixed a bug with contiguous charref

    1.7.3: Sep 29 1999

    • portability problems fixed
    • snprintf was used unconditionally, leading to link problems on system were it's not available, fixed

    1.7.1: Sep 24 1999

    • The basic type for strings manipulated by libxml has been renamed in 1.7.1 from CHAR to xmlChar. The reason is that CHAR was conflicting with a predefined type on Windows. However on non WIN32 environment, compatibility is provided by the way of a #define .
    • Changed another error : the use of a structure field called errno, and leading to troubles on platforms where it's a macro

    1.7.0: Sep 23 1999

    • Added the ability to fetch remote DTD or parsed entities, see the nanohttp module.
    • Added an errno to report errors by another mean than a simple printf like callback
    • Finished ID/IDREF support and checking when validation
    • Serious memory leaks fixed (there is now a memory wrapper module)
    • Improvement of XPath implementation
    • Added an HTML parser front-end

    XML

    XML is a standard for markup-based structured documents. Here is an example XML document:

    <?xml version="1.0"?>
    <EXAMPLE prop1="gnome is great" prop2="&amp; linux too">
      <head>
       <title>Welcome to Gnome</title>
      </head>
      <chapter>
       <title>The Linux adventure</title>
       <p>bla bla bla ...</p>
       <image href="linus.gif"/>
       <p>...</p>
      </chapter>
    </EXAMPLE>

    The first line specifies that it is an XML document and gives useful information about its encoding. Then the rest of the document is a text format whose structure is specified by tags between brackets. Each tag opened has to be closed. XML is pedantic about this. However, if a tag is empty (no content), a single tag can serve as both the opening and closing tag if it ends with /> rather than with >. Note that, for example, the image tag has no content (just an attribute) and is closed by ending the tag with />.

    XML can be applied successfully to a wide range of tasks, ranging from long term structured document maintenance (where it follows the steps of SGML) to simple data encoding mechanisms like configuration file formatting (glade), spreadsheets (gnumeric), or even shorter lived documents such as WebDAV where it is used to encode remote calls between a client and a server.

    XSLT

    Check the separate libxslt page

    XSL Transformations, is a language for transforming XML documents into other XML documents (or HTML/textual output).

    A separate library called libxslt is available implementing XSLT-1.0 for libxml2. This module "libxslt" too can be found in the Gnome SVN base.

    You can check the progresses on the libxslt Changelog.

    Python and bindings

    There are a number of language bindings and wrappers available for libxml2, the list below is not exhaustive. Please contact the xml-bindings@gnome.org (archives) in order to get updates to this list or to discuss the specific topic of libxml2 or libxslt wrappers or bindings:

    • Libxml++ seems the most up-to-date C++ bindings for libxml2, check the documentation and the examples.
    • There is another C++ wrapper based on the gdome2 bindings maintained by Tobias Peters.
    • and a third C++ wrapper by Peter Jones <pjones@pmade.org>

      Website: http://pmade.org/pjones/software/xmlwrapp/

    • XML::LibXML Perl bindings are available on CPAN, as well as XML::LibXSLT Perl libxslt bindings.
    • If you're interested into scripting XML processing, have a look at XSH an XML editing shell based on Libxml2 Perl bindings.
    • Dave Kuhlman provides an earlier version of the libxml/libxslt wrappers for Python.
    • Gopal.V and Peter Minten develop libxml#, a set of C# libxml2 bindings.
    • Petr Kozelka provides Pascal units to glue libxml2 with Kylix, Delphi and other Pascal compilers.
    • Uwe Fechner also provides idom2, a DOM2 implementation for Kylix2/D5/D6 from Borland.
    • There is bindings for Ruby and libxml2 bindings are also available in Ruby through the libgdome-ruby module maintained by Tobias Peters.
    • Steve Ball and contributors maintains libxml2 and libxslt bindings for Tcl.
    • libxml2 and libxslt are the default XML libraries for PHP5.
    • LibxmlJ is an effort to create a 100% JAXP-compatible Java wrapper for libxml2 and libxslt as part of GNU ClasspathX project.
    • Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, look for RexxXML.
    • Satimage provides XMLLib osax. This is an osax for Mac OS X with a set of commands to implement in AppleScript the XML DOM, XPATH and XSLT. Also includes commands for Property-lists (Apple's fast lookup table XML format.)
    • Francesco Montorsi developped wxXml2 wrappers that interface libxml2, allowing wxWidgets applications to load/save/edit XML instances.

    The distribution includes a set of Python bindings, which are guaranteed to be maintained as part of the library in the future, though the Python interface have not yet reached the completeness of the C API.

    Note that some of the Python purist dislike the default set of Python bindings, rather than complaining I suggest they have a look at lxml the more pythonic bindings for libxml2 and libxslt and help Martijn Faassen complete those.

    Stéphane Bidoul maintains a Windows port of the Python bindings.

    Note to people interested in building bindings, the API is formalized as an XML API description file which allows to automate a large part of the Python bindings, this includes function descriptions, enums, structures, typedefs, etc... The Python script used to build the bindings is python/generator.py in the source distribution.

    To install the Python bindings there are 2 options:

    • If you use an RPM based distribution, simply install the libxml2-python RPM (and if needed the libxslt-python RPM).
    • Otherwise use the libxml2-python module distribution corresponding to your installed version of libxml2 and libxslt. Note that to install it you will need both libxml2 and libxslt installed and run "python setup.py build install" in the module tree.

    The distribution includes a set of examples and regression tests for the python bindings in the python/tests directory. Here are some excerpts from those tests:

    tst.py:

    This is a basic test of the file interface and DOM navigation:

    import libxml2, sys
    
    doc = libxml2.parseFile("tst.xml")
    if doc.name != "tst.xml":
        print "doc.name failed"
        sys.exit(1)
    root = doc.children
    if root.name != "doc":
        print "root.name failed"
        sys.exit(1)
    child = root.children
    if child.name != "foo":
        print "child.name failed"
        sys.exit(1)
    doc.freeDoc()

    The Python module is called libxml2; parseFile is the equivalent of xmlParseFile (most of the bindings are automatically generated, and the xml prefix is removed and the casing convention are kept). All node seen at the binding level share the same subset of accessors:

    • name : returns the node name
    • type : returns a string indicating the node type
    • content : returns the content of the node, it is based on xmlNodeGetContent() and hence is recursive.
    • parent , children, last, next, prev, doc, properties: pointing to the associated element in the tree, those may return None in case no such link exists.

    Also note the need to explicitly deallocate documents with freeDoc() . Reference counting for libxml2 trees would need quite a lot of work to function properly, and rather than risk memory leaks if not implemented correctly it sounds safer to have an explicit function to free a tree. The wrapper python objects like doc, root or child are them automatically garbage collected.

    validate.py:

    This test check the validation interfaces and redirection of error messages:

    import libxml2
    
    #deactivate error messages from the validation
    def noerr(ctx, str):
        pass
    
    libxml2.registerErrorHandler(noerr, None)
    
    ctxt = libxml2.createFileParserCtxt("invalid.xml")
    ctxt.validate(1)
    ctxt.parseDocument()
    doc = ctxt.doc()
    valid = ctxt.isValid()
    doc.freeDoc()
    if valid != 0:
        print "validity check failed"

    The first thing to notice is the call to registerErrorHandler(), it defines a new error handler global to the library. It is used to avoid seeing the error messages when trying to validate the invalid document.

    The main interest of that test is the creation of a parser context with createFileParserCtxt() and how the behaviour can be changed before calling parseDocument() . Similarly the information resulting from the parsing phase is also available using context methods.

    Contexts like nodes are defined as class and the libxml2 wrappers maps the C function interfaces in terms of objects method as much as possible. The best to get a complete view of what methods are supported is to look at the libxml2.py module containing all the wrappers.

    push.py:

    This test show how to activate the push parser interface:

    import libxml2
    
    ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml")
    ctxt.parseChunk("/>", 2, 1)
    doc = ctxt.doc()
    
    doc.freeDoc()

    The context is created with a special call based on the xmlCreatePushParser() from the C library. The first argument is an optional SAX callback object, then the initial set of data, the length and the name of the resource in case URI-References need to be computed by the parser.

    Then the data are pushed using the parseChunk() method, the last call setting the third argument terminate to 1.

    pushSAX.py:

    this test show the use of the event based parsing interfaces. In this case the parser does not build a document, but provides callback information as the parser makes progresses analyzing the data being provided:

    import libxml2
    log = ""
    
    class callback:
        def startDocument(self):
            global log
            log = log + "startDocument:"
    
        def endDocument(self):
            global log
            log = log + "endDocument:"
    
        def startElement(self, tag, attrs):
            global log
            log = log + "startElement %s %s:" % (tag, attrs)
    
        def endElement(self, tag):
            global log
            log = log + "endElement %s:" % (tag)
    
        def characters(self, data):
            global log
            log = log + "characters: %s:" % (data)
    
        def warning(self, msg):
            global log
            log = log + "warning: %s:" % (msg)
    
        def error(self, msg):
            global log
            log = log + "error: %s:" % (msg)
    
        def fatalError(self, msg):
            global log
            log = log + "fatalError: %s:" % (msg)
    
    handler = callback()
    
    ctxt = libxml2.createPushParser(handler, "<foo", 4, "test.xml")
    chunk = " url='tst'>b"
    ctxt.parseChunk(chunk, len(chunk), 0)
    chunk = "ar</foo>"
    ctxt.parseChunk(chunk, len(chunk), 1)
    
    reference = "startDocument:startElement foo {'url': 'tst'}:" + \ 
                "characters: bar:endElement foo:endDocument:"
    if log != reference:
        print "Error got: %s" % log
        print "Expected: %s" % reference

    The key object in that test is the handler, it provides a number of entry points which can be called by the parser as it makes progresses to indicate the information set obtained. The full set of callback is larger than what the callback class in that specific example implements (see the SAX definition for a complete list). The wrapper will only call those supplied by the object when activated. The startElement receives the names of the element and a dictionary containing the attributes carried by this element.

    Also note that the reference string generated from the callback shows a single character call even though the string "bar" is passed to the parser from 2 different call to parseChunk()

    xpath.py:

    This is a basic test of XPath wrappers support

    import libxml2
    
    doc = libxml2.parseFile("tst.xml")
    ctxt = doc.xpathNewContext()
    res = ctxt.xpathEval("//*")
    if len(res) != 2:
        print "xpath query: wrong node set size"
        sys.exit(1)
    if res[0].name != "doc" or res[1].name != "foo":
        print "xpath query: wrong node set value"
        sys.exit(1)
    doc.freeDoc()
    ctxt.xpathFreeContext()

    This test parses a file, then create an XPath context to evaluate XPath expression on it. The xpathEval() method execute an XPath query and returns the result mapped in a Python way. String and numbers are natively converted, and node sets are returned as a tuple of libxml2 Python nodes wrappers. Like the document, the XPath context need to be freed explicitly, also not that the result of the XPath query may point back to the document tree and hence the document must be freed after the result of the query is used.

    xpathext.py:

    This test shows how to extend the XPath engine with functions written in python:

    import libxml2
    
    def foo(ctx, x):
        return x + 1
    
    doc = libxml2.parseFile("tst.xml")
    ctxt = doc.xpathNewContext()
    libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
    res = ctxt.xpathEval("foo(1)")
    if res != 2:
        print "xpath extension failure"
    doc.freeDoc()
    ctxt.xpathFreeContext()

    Note how the extension function is registered with the context (but that part is not yet finalized, this may change slightly in the future).

    tstxpath.py:

    This test is similar to the previous one but shows how the extension function can access the XPath evaluation context:

    def foo(ctx, x):
        global called
    
        #
        # test that access to the XPath evaluation contexts
        #
        pctxt = libxml2.xpathParserContext(_obj=ctx)
        ctxt = pctxt.context()
        called = ctxt.function()
        return x + 1

    All the interfaces around the XPath parser(or rather evaluation) context are not finalized, but it should be sufficient to do contextual work at the evaluation point.

    Memory debugging:

    last but not least, all tests starts with the following prologue:

    #memory debug specific
    libxml2.debugMemory(1)

    and ends with the following epilogue:

    #memory debug specific
    libxml2.cleanupParser()
    if libxml2.debugMemory(1) == 0:
        print "OK"
    else:
        print "Memory leak %d bytes" % (libxml2.debugMemory(1))
        libxml2.dumpMemory()

    Those activate the memory debugging interface of libxml2 where all allocated block in the library are tracked. The prologue then cleans up the library state and checks that all allocated memory has been freed. If not it calls dumpMemory() which saves that list in a .memdump file.

    libxml2 architecture

    Libxml2 is made of multiple components; some of them are optional, and most of the block interfaces are public. The main components are:

    • an Input/Output layer
    • FTP and HTTP client layers (optional)
    • an Internationalization layer managing the encodings support
    • a URI module
    • the XML parser and its basic SAX interface
    • an HTML parser using the same SAX interface (optional)
    • a SAX tree module to build an in-memory DOM representation
    • a tree module to manipulate the DOM representation
    • a validation module using the DOM representation (optional)
    • an XPath module for global lookup in a DOM representation (optional)
    • a debug module (optional)

    Graphically this gives the following:

    a graphical view of the various

    The tree output

    The parser returns a tree built during the document analysis. The value returned is an xmlDocPtr (i.e., a pointer to an xmlDoc structure). This structure contains information such as the file name, the document type, and a children pointer which is the root of the document (or more exactly the first child under the root which is the document). The tree is made of xmlNodes, chained in double-linked lists of siblings and with a children<->parent relationship. An xmlNode can also carry properties (a chain of xmlAttr structures). An attribute may have a value which is a list of TEXT or ENTITY_REF nodes.

    Here is an example (erroneous with respect to the XML spec since there should be only one ELEMENT under the root):

     structure.gif

    In the source package there is a small program (not installed by default) called xmllint which parses XML files given as argument and prints them back as parsed. This is useful for detecting errors both in XML code and in the XML parser itself. It has an option --debug which prints the actual in-memory structure of the document; here is the result with the example given before:

    DOCUMENT
    version=1.0
    standalone=true
      ELEMENT EXAMPLE
        ATTRIBUTE prop1
          TEXT
          content=gnome is great
        ATTRIBUTE prop2
          ENTITY_REF
          TEXT
          content= linux too 
        ELEMENT head
          ELEMENT title
            TEXT
            content=Welcome to Gnome
        ELEMENT chapter
          ELEMENT title
            TEXT
            content=The Linux adventure
          ELEMENT p
            TEXT
            content=bla bla bla ...
          ELEMENT image
            ATTRIBUTE href
              TEXT
              content=linus.gif
          ELEMENT p
            TEXT
            content=...

    This should be useful for learning the internal representation model.

    The SAX interface

    Sometimes the DOM tree output is just too large to fit reasonably into memory. In that case (and if you don't expect to save back the XML document loaded using libxml), it's better to use the SAX interface of libxml. SAX is a callback-based interface to the parser. Before parsing, the application layer registers a customized set of callbacks which are called by the library as it progresses through the XML input.

    To get more detailed step-by-step guidance on using the SAX interface of libxml, see the nice documentation.written by James Henstridge.

    You can debug the SAX behaviour by using the testSAX program located in the gnome-xml module (it's usually not shipped in the binary packages of libxml, but you can find it in the tar source distribution). Here is the sequence of callbacks that would be reported by testSAX when parsing the example XML document shown earlier:

    SAX.setDocumentLocator()
    SAX.startDocument()
    SAX.getEntity(amp)
    SAX.startElement(EXAMPLE, prop1='gnome is great', prop2='&amp; linux too')
    SAX.characters(   , 3)
    SAX.startElement(head)
    SAX.characters(    , 4)
    SAX.startElement(title)
    SAX.characters(Welcome to Gnome, 16)
    SAX.endElement(title)
    SAX.characters(   , 3)
    SAX.endElement(head)
    SAX.characters(   , 3)
    SAX.startElement(chapter)
    SAX.characters(    , 4)
    SAX.startElement(title)
    SAX.characters(The Linux adventure, 19)
    SAX.endElement(title)
    SAX.characters(    , 4)
    SAX.startElement(p)
    SAX.characters(bla bla bla ..., 15)
    SAX.endElement(p)
    SAX.characters(    , 4)
    SAX.startElement(image, href='linus.gif')
    SAX.endElement(image)
    SAX.characters(    , 4)
    SAX.startElement(p)
    SAX.characters(..., 3)
    SAX.endElement(p)
    SAX.characters(   , 3)
    SAX.endElement(chapter)
    SAX.characters( , 1)
    SAX.endElement(EXAMPLE)
    SAX.endDocument()

    Most of the other interfaces of libxml2 are based on the DOM tree-building facility, so nearly everything up to the end of this document presupposes the use of the standard DOM tree build. Note that the DOM tree itself is built by a set of registered default callbacks, without internal specific interface.

    Validation & DTDs

    Table of Content:

    1. General overview
    2. The definition
    3. Simple rules
      1. How to reference a DTD from a document
      2. Declaring elements
      3. Declaring attributes
    4. Some examples
    5. How to validate
    6. Other resources

    General overview

    Well what is validation and what is a DTD ?

    DTD is the acronym for Document Type Definition. This is a description of the content for a family of XML files. This is part of the XML 1.0 specification, and allows one to describe and verify that a given document instance conforms to the set of rules detailing its structure and content.

    Validation is the process of checking a document against a DTD (more generally against a set of construction rules).

    The validation process and building DTDs are the two most difficult parts of the XML life cycle. Briefly a DTD defines all the possible elements to be found within your document, what is the formal shape of your document tree (by defining the allowed content of an element; either text, a regular expression for the allowed list of children, or mixed content i.e. both text and children). The DTD also defines the valid attributes for all elements and the types of those attributes.

    The definition

    The W3C XML Recommendation (Tim Bray's annotated version of Rev1):

    (unfortunately) all this is inherited from the SGML world, the syntax is ancient...

    Simple rules

    Writing DTDs can be done in many ways. The rules to build them if you need something permanent or something which can evolve over time can be radically different. Really complex DTDs like DocBook ones are flexible but quite harder to design. I will just focus on DTDs for a formats with a fixed simple structure. It is just a set of basic rules, and definitely not exhaustive nor usable for complex DTD design.

    How to reference a DTD from a document:

    Assuming the top element of the document is spec and the dtd is placed in the file mydtd in the subdirectory dtds of the directory from where the document were loaded:

    <!DOCTYPE spec SYSTEM "dtds/mydtd">

    Notes:

    • The system string is actually an URI-Reference (as defined in RFC 2396) so you can use a full URL string indicating the location of your DTD on the Web. This is a really good thing to do if you want others to validate your document.
    • It is also possible to associate a PUBLIC identifier (a magic string) so that the DTD is looked up in catalogs on the client side without having to locate it on the web.
    • A DTD contains a set of element and attribute declarations, but they don't define what the root of the document should be. This is explicitly told to the parser/validator as the first element of the DOCTYPE declaration.

    Declaring elements:

    The following declares an element spec:

    <!ELEMENT spec (front, body, back?)>

    It also expresses that the spec element contains one front, one body and one optional back children elements in this order. The declaration of one element of the structure and its content are done in a single declaration. Similarly the following declares div1 elements:

    <!ELEMENT div1 (head, (p | list | note)*, div2?)>

    which means div1 contains one head then a series of optional p, lists and notes and then an optional div2. And last but not least an element can contain text:

    <!ELEMENT b (#PCDATA)>

    b contains text or being of mixed content (text and elements in no particular order):

    <!ELEMENT p (#PCDATA|a|ul|b|i|em)*>

    p can contain text or a, ul, b, i or em elements in no particular order.

    Declaring attributes:

    Again the attributes declaration includes their content definition:

    <!ATTLIST termdef name CDATA #IMPLIED>

    means that the element termdef can have a name attribute containing text (CDATA) and which is optional (#IMPLIED). The attribute value can also be defined within a set:

    <!ATTLIST list type (bullets|ordered|glossary) "ordered">

    means list element have a type attribute with 3 allowed values "bullets", "ordered" or "glossary" and which default to "ordered" if the attribute is not explicitly specified.

    The content type of an attribute can be text (CDATA), anchor/reference/references (ID/IDREF/IDREFS), entity(ies) (ENTITY/ENTITIES) or name(s) (NMTOKEN/NMTOKENS). The following defines that a chapter element can have an optional id attribute of type ID, usable for reference from attribute of type IDREF:

    <!ATTLIST chapter id ID #IMPLIED>

    The last value of an attribute definition can be #REQUIRED meaning that the attribute has to be given, #IMPLIED meaning that it is optional, or the default value (possibly prefixed by #FIXED if it is the only allowed).

    Notes:

    • Usually the attributes pertaining to a given element are declared in a single expression, but it is just a convention adopted by a lot of DTD writers:
      <!ATTLIST termdef
                id      ID      #REQUIRED
                name    CDATA   #IMPLIED>

      The previous construct defines both id and name attributes for the element termdef.

    Some examples

    The directory test/valid/dtds/ in the libxml2 distribution contains some complex DTD examples. The example in the file test/valid/dia.xml shows an XML file where the simple DTD is directly included within the document.

    How to validate

    The simplest way is to use the xmllint program included with libxml. The --valid option turns-on validation of the files given as input. For example the following validates a copy of the first revision of the XML 1.0 specification:

    xmllint --valid --noout test/valid/REC-xml-19980210.xml

    the -- noout is used to disable output of the resulting tree.

    The --dtdvalid dtd allows validation of the document(s) against a given DTD.

    Libxml2 exports an API to handle DTDs and validation, check the associated description.

    Other resources

    DTDs are as old as SGML. So there may be a number of examples on-line, I will just list one for now, others pointers welcome:

    I suggest looking at the examples found under test/valid/dtd and any of the large number of books available on XML. The dia example in test/valid should be both simple and complete enough to allow you to build your own.

    Memory Management

    Table of Content:

    1. General overview
    2. Setting libxml2 set of memory routines
    3. Cleaning up after using the library
    4. Debugging routines
    5. General memory requirements
    6. Returning memory to the kernel

    General overview

    The module xmlmemory.h provides the interfaces to the libxml2 memory system:

    • libxml2 does not use the libc memory allocator directly but xmlFree(), xmlMalloc() and xmlRealloc()
    • those routines can be reallocated to a specific set of routine, by default the libc ones i.e. free(), malloc() and realloc()
    • the xmlmemory.c module includes a set of debugging routine

    Setting libxml2 set of memory routines

    It is sometimes useful to not use the default memory allocator, either for debugging, analysis or to implement a specific behaviour on memory management (like on embedded systems). Two function calls are available to do so:

    • xmlMemGet () which return the current set of functions in use by the parser
    • xmlMemSetup() which allow to set up a new set of memory allocation functions

    Of course a call to xmlMemSetup() should probably be done before calling any other libxml2 routines (unless you are sure your allocations routines are compatibles).

    Cleaning up after using the library

    Libxml2 is not stateless, there is a few set of memory structures needing allocation before the parser is fully functional (some encoding structures for example). This also mean that once parsing is finished there is a tiny amount of memory (a few hundred bytes) which can be recollected if you don't reuse the library or any document built with it:

    • xmlCleanupParser () is a centralized routine to free the library state and data. Note that it won't deallocate any produced tree if any (use the xmlFreeDoc() and related routines for this). This should be called only when the library is not used anymore.
    • xmlInitParser () is the dual routine allowing to preallocate the parsing state which can be useful for example to avoid initialization reentrancy problems when using libxml2 in multithreaded applications

    Generally xmlCleanupParser() is safe assuming no parsing is ongoing and no document is still being used, if needed the state will be rebuild at the next invocation of parser routines (or by xmlInitParser()), but be careful of the consequences in multithreaded applications.

    Debugging routines

    When configured using --with-mem-debug flag (off by default), libxml2 uses a set of memory allocation debugging routines keeping track of all allocated blocks and the location in the code where the routine was called. A couple of other debugging routines allow to dump the memory allocated infos to a file or call a specific routine when a given block number is allocated:

    When developing libxml2 memory debug is enabled, the tests programs call xmlMemoryDump () and the "make test" regression tests will check for any memory leak during the full regression test sequence, this helps a lot ensuring that libxml2 does not leak memory and bullet proof memory allocations use (some libc implementations are known to be far too permissive resulting in major portability problems!).

    If the .memdump reports a leak, it displays the allocation function and also tries to give some information about the content and structure of the allocated blocks left. This is sufficient in most cases to find the culprit, but not always. Assuming the allocation problem is reproducible, it is possible to find more easily:

    1. write down the block number xxxx not allocated
    2. export the environment variable XML_MEM_BREAKPOINT=xxxx , the easiest when using GDB is to simply give the command

      set environment XML_MEM_BREAKPOINT xxxx

      before running the program.

    3. run the program under a debugger and set a breakpoint on xmlMallocBreakpoint() a specific function called when this precise block is allocated
    4. when the breakpoint is reached you can then do a fine analysis of the allocation an step to see the condition resulting in the missing deallocation.

    I used to use a commercial tool to debug libxml2 memory problems but after noticing that it was not detecting memory leaks that simple mechanism was used and proved extremely efficient until now. Lately I have also used valgrind with quite some success, it is tied to the i386 architecture since it works by emulating the processor and instruction set, it is slow but extremely efficient, i.e. it spot memory usage errors in a very precise way.

    General memory requirements

    How much libxml2 memory require ? It's hard to tell in average it depends of a number of things:

    • the parser itself should work in a fixed amount of memory, except for information maintained about the stacks of names and entities locations. The I/O and encoding handlers will probably account for a few KBytes. This is true for both the XML and HTML parser (though the HTML parser need more state).
    • If you are generating the DOM tree then memory requirements will grow nearly linear with the size of the data. In general for a balanced textual document the internal memory requirement is about 4 times the size of the UTF8 serialization of this document (example the XML-1.0 recommendation is a bit more of 150KBytes and takes 650KBytes of main memory when parsed). Validation will add a amount of memory required for maintaining the external Dtd state which should be linear with the complexity of the content model defined by the Dtd
    • If you need to work with fixed memory requirements or don't need the full DOM tree then using the xmlReader interface is probably the best way to proceed, it still allows to validate or operate on subset of the tree if needed.
    • If you don't care about the advanced features of libxml2 like validation, DOM, XPath or XPointer, don't use entities, need to work with fixed memory requirements, and try to get the fastest parsing possible then the SAX interface should be used, but it has known restrictions.

    Returning memory to the kernel

    You may encounter that your process using libxml2 does not have a reduced memory usage although you freed the trees. This is because libxml2 allocates memory in a number of small chunks. When freeing one of those chunks, the OS may decide that giving this little memory back to the kernel will cause too much overhead and delay the operation. As all chunks are this small, they get actually freed but not returned to the kernel. On systems using glibc, there is a function call "malloc_trim" from malloc.h which does this missing operation (note that it is allowed to fail). Thus, after freeing your tree you may simply try "malloc_trim(0);" to really get the memory back. If your OS does not provide malloc_trim, try searching for a similar function.

    Encodings support

    If you are not really familiar with Internationalization (usual shortcut is I18N) , Unicode, characters and glyphs, I suggest you read a presentation by Tim Bray on Unicode and why you should care about it.

    If you don't understand why it does not make sense to have a string without knowing what encoding it uses, then as Joel Spolsky said please do not write another line of code until you finish reading that article.. It is a prerequisite to understand this page, and avoid a lot of problems with libxml2, XML or text processing in general.

    Table of Content:

    1. What does internationalization support mean ?
    2. The internal encoding, how and why
    3. How is it implemented ?
    4. Default supported encodings
    5. How to extend the existing support

    What does internationalization support mean ?

    XML was designed from the start to allow the support of any character set by using Unicode. Any conformant XML parser has to support the UTF-8 and UTF-16 default encodings which can both express the full unicode ranges. UTF8 is a variable length encoding whose greatest points are to reuse the same encoding for ASCII and to save space for Western encodings, but it is a bit more complex to handle in practice. UTF-16 use 2 bytes per character (and sometimes combines two pairs), it makes implementation easier, but looks a bit overkill for Western languages encoding. Moreover the XML specification allows the document to be encoded in other encodings at the condition that they are clearly labeled as such. For example the following is a wellformed XML document encoded in ISO-8859-1 and using accentuated letters that we French like for both markup and content:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <très>là</très>

    Having internationalization support in libxml2 means the following:

    • the document is properly parsed
    • information about it's encoding is saved
    • it can be modified
    • it can be saved in its original encoding
    • it can also be saved in another encoding supported by libxml2 (for example straight UTF8 or even an ASCII form)

    Another very important point is that the whole libxml2 API, with the exception of a few routines to read with a specific encoding or save to a specific encoding, is completely agnostic about the original encoding of the document.

    It should be noted too that the HTML parser embedded in libxml2 now obey the same rules too, the following document will be (as of 2.2.2) handled in an internationalized fashion by libxml2 too:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
                          "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html lang="fr">
    <head>
      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
    </head>
    <body>
    <p>W3C crée des standards pour le Web.</body>
    </html>

    The internal encoding, how and why

    One of the core decisions was to force all documents to be converted to a default internal encoding, and that encoding to be UTF-8, here are the rationales for those choices:

    • keeping the native encoding in the internal form would force the libxml users (or the code associated) to be fully aware of the encoding of the original document, for examples when adding a text node to a document, the content would have to be provided in the document encoding, i.e. the client code would have to check it before hand, make sure it's conformant to the encoding, etc ... Very hard in practice, though in some specific cases this may make sense.
    • the second decision was which encoding. From the XML spec only UTF8 and UTF16 really makes sense as being the two only encodings for which there is mandatory support. UCS-4 (32 bits fixed size encoding) could be considered an intelligent choice too since it's a direct Unicode mapping support. I selected UTF-8 on the basis of efficiency and compatibility with surrounding software:
      • UTF-8 while a bit more complex to convert from/to (i.e. slightly more costly to import and export CPU wise) is also far more compact than UTF-16 (and UCS-4) for a majority of the documents I see it used for right now (RPM RDF catalogs, advogato data, various configuration file formats, etc.) and the key point for today's computer architecture is efficient uses of caches. If one nearly double the memory requirement to store the same amount of data, this will trash caches (main memory/external caches/internal caches) and my take is that this harms the system far more than the CPU requirements needed for the conversion to UTF-8
      • Most of libxml2 version 1 users were using it with straight ASCII most of the time, doing the conversion with an internal encoding requiring all their code to be rewritten was a serious show-stopper for using UTF-16 or UCS-4.
      • UTF-8 is being used as the de-facto internal encoding standard for related code like the pango upcoming Gnome text widget, and a lot of Unix code (yet another place where Unix programmer base takes a different approach from Microsoft - they are using UTF-16)

    What does this mean in practice for the libxml2 user:

    • xmlChar, the libxml2 data type is a byte, those bytes must be assembled as UTF-8 valid strings. The proper way to terminate an xmlChar * string is simply to append 0 byte, as usual.
    • One just need to make sure that when using chars outside the ASCII set, the values has been properly converted to UTF-8

    How is it implemented ?

    Let's describe how all this works within libxml, basically the I18N (internationalization) support get triggered only during I/O operation, i.e. when reading a document or saving one. Let's look first at the reading sequence:

    1. when a document is processed, we usually don't know the encoding, a simple heuristic allows to detect UTF-16 and UCS-4 from encodings where the ASCII range (0-0x7F) maps with ASCII
    2. the xml declaration if available is parsed, including the encoding declaration. At that point, if the autodetected encoding is different from the one declared a call to xmlSwitchEncoding() is issued.
    3. If there is no encoding declaration, then the input has to be in either UTF-8 or UTF-16, if it is not then at some point when processing the input, the converter/checker of UTF-8 form will raise an encoding error. You may end-up with a garbled document, or no document at all ! Example:
      ~/XML -> ./xmllint err.xml 
      err.xml:1: error: Input is not proper UTF-8, indicate encoding !
      <très>là</très>
         ^
      err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C
      <très>là</très>
         ^
    4. xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and then search the default registered encoding converters for that encoding. If it's not within the default set and iconv() support has been compiled it, it will ask iconv for such an encoder. If this fails then the parser will report an error and stops processing:
      ~/XML -> ./xmllint err2.xml 
      err2.xml:1: error: Unsupported encoding UnsupportedEnc
      <?xml version="1.0" encoding="UnsupportedEnc"?>
                                                   ^
    5. From that point the encoder processes progressively the input (it is plugged as a front-end to the I/O module) for that entity. It captures and converts on-the-fly the document to be parsed to UTF-8. The parser itself just does UTF-8 checking of this input and process it transparently. The only difference is that the encoding information has been added to the parsing context (more precisely to the input corresponding to this entity).
    6. The result (when using DOM) is an internal form completely in UTF-8 with just an encoding information on the document node.

    Ok then what happens when saving the document (assuming you collected/built an xmlDoc DOM like structure) ? It depends on the function called, xmlSaveFile() will just try to save in the original encoding, while xmlSaveFileTo() and xmlSaveFileEnc() can optionally save to a given encoding:

    1. if no encoding is given, libxml2 will look for an encoding value associated to the document and if it exists will try to save to that encoding,

      otherwise everything is written in the internal form, i.e. UTF-8

    2. so if an encoding was specified, either at the API level or on the document, libxml2 will again canonicalize the encoding name, lookup for a converter in the registered set or through iconv. If not found the function will return an error code
    3. the converter is placed before the I/O buffer layer, as another kind of buffer, then libxml2 will simply push the UTF-8 serialization to through that buffer, which will then progressively be converted and pushed onto the I/O layer.
    4. It is possible that the converter code fails on some input, for example trying to push an UTF-8 encoded Chinese character through the UTF-8 to ISO-8859-1 converter won't work. Since the encoders are progressive they will just report the error and the number of bytes converted, at that point libxml2 will decode the offending character, remove it from the buffer and replace it with the associated charRef encoding &#123; and resume the conversion. This guarantees that any document will be saved without losses (except for markup names where this is not legal, this is a problem in the current version, in practice avoid using non-ascii characters for tag or attribute names). A special "ascii" encoding name is used to save documents to a pure ascii form can be used when portability is really crucial

    Here are a few examples based on the same test document:

    ~/XML -> ./xmllint isolat1 
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <très>là</très>
    ~/XML -> ./xmllint --encode UTF-8 isolat1 
    <?xml version="1.0" encoding="UTF-8"?>
    <très>là  </très>
    ~/XML -> 

    The same processing is applied (and reuse most of the code) for HTML I18N processing. Looking up and modifying the content encoding is a bit more difficult since it is located in a <meta> tag under the <head>, so a couple of functions htmlGetMetaEncoding() and htmlSetMetaEncoding() have been provided. The parser also attempts to switch encoding on the fly when detecting such a tag on input. Except for that the processing is the same (and again reuses the same code).

    Default supported encodings

    libxml2 has a set of default converters for the following encodings (located in encoding.c):

    1. UTF-8 is supported by default (null handlers)
    2. UTF-16, both little and big endian
    3. ISO-Latin-1 (ISO-8859-1) covering most western languages
    4. ASCII, useful mostly for saving
    5. HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML predefined entities like &copy; for the Copyright sign.

    More over when compiled on an Unix platform with iconv support the full set of encodings supported by iconv can be instantly be used by libxml. On a linux machine with glibc-2.1 the list of supported encodings and aliases fill 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the various Japanese ones.

    To convert from the UTF-8 values returned from the API to another encoding then it is possible to use the function provided from the encoding module like UTF8Toisolat1, or use the POSIX iconv() API directly.

    Encoding aliases

    From 2.2.3, libxml2 has support to register encoding names aliases. The goal is to be able to parse document whose encoding is supported but where the name differs (for example from the default set of names accepted by iconv). The following functions allow to register and handle new aliases for existing encodings. Once registered libxml2 will automatically lookup the aliases when handling a document:

    • int xmlAddEncodingAlias(const char *name, const char *alias);
    • int xmlDelEncodingAlias(const char *alias);
    • const char * xmlGetEncodingAlias(const char *alias);
    • void xmlCleanupEncodingAliases(void);

    How to extend the existing support

    Well adding support for new encoding, or overriding one of the encoders (assuming it is buggy) should not be hard, just write input and output conversion routines to/from UTF-8, and register them using xmlNewCharEncodingHandler(name, xxxToUTF8, UTF8Toxxx), and they will be called automatically if the parser(s) encounter such an encoding name (register it uppercase, this will help). The description of the encoders, their arguments and expected return values are described in the encoding.h header.

    I/O Interfaces

    Table of Content:

    1. General overview
    2. The basic buffer type
    3. Input I/O handlers
    4. Output I/O handlers
    5. The entities loader
    6. Example of customized I/O

    General overview

    The module xmlIO.h provides the interfaces to the libxml2 I/O system. This consists of 4 main parts:

    • Entities loader, this is a routine which tries to fetch the entities (files) based on their PUBLIC and SYSTEM identifiers. The default loader don't look at the public identifier since libxml2 do not maintain a catalog. You can redefine you own entity loader by using xmlGetExternalEntityLoader() and xmlSetExternalEntityLoader(). Check the example.
    • Input I/O buffers which are a commodity structure used by the parser(s) input layer to handle fetching the information to feed the parser. This provides buffering and is also a placeholder where the encoding converters to UTF8 are piggy-backed.
    • Output I/O buffers are similar to the Input ones and fulfill similar task but when generating a serialization from a tree.
    • A mechanism to register sets of I/O callbacks and associate them with specific naming schemes like the protocol part of the URIs.

      This affect the default I/O operations and allows to use specific I/O handlers for certain names.

    The general mechanism used when loading http://rpmfind.net/xml.html for example in the HTML parser is the following:

    1. The default entity loader calls xmlNewInputFromFile() with the parsing context and the URI string.
    2. the URI string is checked against the existing registered handlers using their match() callback function, if the HTTP module was compiled in, it is registered and its match() function will succeeds
    3. the open() function of the handler is called and if successful will return an I/O Input buffer
    4. the parser will the start reading from this buffer and progressively fetch information from the resource, calling the read() function of the handler until the resource is exhausted
    5. if an encoding change is detected it will be installed on the input buffer, providing buffering and efficient use of the conversion routines
    6. once the parser has finished, the close() function of the handler is called once and the Input buffer and associated resources are deallocated.

    The user defined callbacks are checked first to allow overriding of the default libxml2 I/O routines.

    The basic buffer type

    All the buffer manipulation handling is done using the xmlBuffer type define in tree.h which is a resizable memory buffer. The buffer allocation strategy can be selected to be either best-fit or use an exponential doubling one (CPU vs. memory use trade-off). The values are XML_BUFFER_ALLOC_EXACT and XML_BUFFER_ALLOC_DOUBLEIT, and can be set individually or on a system wide basis using xmlBufferSetAllocationScheme(). A number of functions allows to manipulate buffers with names starting with the xmlBuffer... prefix.

    Input I/O handlers

    An Input I/O handler is a simple structure xmlParserInputBuffer containing a context associated to the resource (file descriptor, or pointer to a protocol handler), the read() and close() callbacks to use and an xmlBuffer. And extra xmlBuffer and a charset encoding handler are also present to support charset conversion when needed.

    Output I/O handlers

    An Output handler xmlOutputBuffer is completely similar to an Input one except the callbacks are write() and close().

    The entities loader

    The entity loader resolves requests for new entities and create inputs for the parser. Creating an input from a filename or an URI string is done through the xmlNewInputFromFile() routine. The default entity loader do not handle the PUBLIC identifier associated with an entity (if any). So it just calls xmlNewInputFromFile() with the SYSTEM identifier (which is mandatory in XML).

    If you want to hook up a catalog mechanism then you simply need to override the default entity loader, here is an example:

    #include <libxml/xmlIO.h>
    
    xmlExternalEntityLoader defaultLoader = NULL;
    
    xmlParserInputPtr
    xmlMyExternalEntityLoader(const char *URL, const char *ID,
                                   xmlParserCtxtPtr ctxt) {
        xmlParserInputPtr ret;
        const char *fileID = NULL;
        /* lookup for the fileID depending on ID */
    
        ret = xmlNewInputFromFile(ctxt, fileID);
        if (ret != NULL)
            return(ret);
        if (defaultLoader != NULL)
            ret = defaultLoader(URL, ID, ctxt);
        return(ret);
    }
    
    int main(..) {
        ...
    
        /*
         * Install our own entity loader
         */
        defaultLoader = xmlGetExternalEntityLoader();
        xmlSetExternalEntityLoader(xmlMyExternalEntityLoader);
    
        ...
    }

    Example of customized I/O

    This example come from a real use case, xmlDocDump() closes the FILE * passed by the application and this was a problem. The solution was to redefine a new output handler with the closing call deactivated:

    1. First define a new I/O output allocator where the output don't close the file:
      xmlOutputBufferPtr
      xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
          xmlOutputBufferPtr ret;
          
          if (xmlOutputCallbackInitialized == 0)
              xmlRegisterDefaultOutputCallbacks();
      
          if (file == NULL) return(NULL);
          ret = xmlAllocOutputBuffer(encoder);
          if (ret != NULL) {
              ret->context = file;
              ret->writecallback = xmlFileWrite;
              ret->closecallback = NULL;  /* No close callback */
          }
          return(ret);
      } 
    2. And then use it to save the document:
      FILE *f;
      xmlOutputBufferPtr output;
      xmlDocPtr doc;
      int res;
      
      f = ...
      doc = ....
      
      output = xmlOutputBufferCreateOwn(f, NULL);
      res = xmlSaveFileTo(output, doc, NULL);
          

    Catalog support

    Table of Content:

    1. General overview
    2. The definition
    3. Using catalogs
    4. Some examples
    5. How to tune catalog usage
    6. How to debug catalog processing
    7. How to create and maintain catalogs
    8. The implementor corner quick review of the API
    9. Other resources

    General overview

    What is a catalog? Basically it's a lookup mechanism used when an entity (a file or a remote resource) references another entity. The catalog lookup is inserted between the moment the reference is recognized by the software (XML parser, stylesheet processing, or even images referenced for inclusion in a rendering) and the time where loading that resource is actually started.

    It is basically used for 3 things:

    • mapping from "logical" names, the public identifiers and a more concrete name usable for download (and URI). For example it can associate the logical name

      "-//OASIS//DTD DocBook XML V4.1.2//EN"

      of the DocBook 4.1.2 XML DTD with the actual URL where it can be downloaded

      http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd

    • remapping from a given URL to another one, like an HTTP indirection saying that

      "http://www.oasis-open.org/committes/tr.xsl"

      should really be looked at

      "http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"

    • providing a local cache mechanism allowing to load the entities associated to public identifiers or remote resources, this is a really important feature for any significant deployment of XML or SGML since it allows to avoid the aleas and delays associated to fetching remote resources.

    The definitions

    Libxml, as of 2.4.3 implements 2 kind of catalogs:

    • the older SGML catalogs, the official spec is SGML Open Technical Resolution TR9401:1997, but is better understood by reading the SP Catalog page from James Clark. This is relatively old and not the preferred mode of operation of libxml.
    • XML Catalogs is far more flexible, more recent, uses an XML syntax and should scale quite better. This is the default option of libxml.

    Using catalog

    In a normal environment libxml2 will by default check the presence of a catalog in /etc/xml/catalog, and assuming it has been correctly populated, the processing is completely transparent to the document user. To take a concrete example, suppose you are authoring a DocBook document, this one starts with the following DOCTYPE definition:

    <?xml version='1.0'?>
    <!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN"
              "http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd">

    When validating the document with libxml, the catalog will be automatically consulted to lookup the public identifier "-//Norman Walsh//DTD DocBk XML V3.1.4//EN" and the system identifier "http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd", and if these entities have been installed on your system and the catalogs actually point to them, libxml will fetch them from the local disk.

    Note: Really don't use this DOCTYPE example it's a really old version, but is fine as an example.

    Libxml2 will check the catalog each time that it is requested to load an entity, this includes DTD, external parsed entities, stylesheets, etc ... If your system is correctly configured all the authoring phase and processing should use only local files, even if your document stays portable because it uses the canonical public and system ID, referencing the remote document.

    Some examples:

    Here is a couple of fragments from XML Catalogs used in libxml2 early regression tests in test/catalogs :

    <?xml version="1.0"?>
    <!DOCTYPE catalog PUBLIC 
       "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
       "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
      <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
       uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/>
    ...

    This is the beginning of a catalog for DocBook 4.1.2, XML Catalogs are written in XML, there is a specific namespace for catalog elements "urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry in this catalog is a public mapping it allows to associate a Public Identifier with an URI.

    ...
        <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/"
                       rewritePrefix="file:///usr/share/xml/docbook/"/>
    ...

    A rewriteSystem is a very powerful instruction, it says that any URI starting with a given prefix should be looked at another URI constructed by replacing the prefix with an new one. In effect this acts like a cache system for a full area of the Web. In practice it is extremely useful with a file prefix if you have installed a copy of those resources on your local system.

    ...
    <delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //"
                    catalog="file:///usr/share/xml/docbook.xml"/>
    <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML"
                    catalog="file:///usr/share/xml/docbook.xml"/>
    <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML"
                    catalog="file:///usr/share/xml/docbook.xml"/>
    <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/"
                    catalog="file:///usr/share/xml/docbook.xml"/>
    <delegateURI uriStartString="http://www.oasis-open.org/docbook/"
                    catalog="file:///usr/share/xml/docbook.xml"/>
    ...

    Delegation is the core features which allows to build a tree of catalogs, easier to maintain than a single catalog, based on Public Identifier, System Identifier or URI prefixes it instructs the catalog software to look up entries in another resource. This feature allow to build hierarchies of catalogs, the set of entries presented should be sufficient to redirect the resolution of all DocBook references to the specific catalog in /usr/share/xml/docbook.xml this one in turn could delegate all references for DocBook 4.2.1 to a specific catalog installed at the same time as the DocBook resources on the local machine.

    How to tune catalog usage:

    The user can change the default catalog behaviour by redirecting queries to its own set of catalogs, this can be done by setting the XML_CATALOG_FILES environment variable to a list of catalogs, an empty one should deactivate loading the default /etc/xml/catalog default catalog

    How to debug catalog processing:

    Setting up the XML_DEBUG_CATALOG environment variable will make libxml2 output debugging information for each catalog operations, for example:

    orchis:~/XML -> xmllint --memory --noout test/ent2
    warning: failed to load external entity "title.xml"
    orchis:~/XML -> export XML_DEBUG_CATALOG=
    orchis:~/XML -> xmllint --memory --noout test/ent2
    Failed to parse catalog /etc/xml/catalog
    Failed to parse catalog /etc/xml/catalog
    warning: failed to load external entity "title.xml"
    Catalogs cleanup
    orchis:~/XML -> 

    The test/ent2 references an entity, running the parser from memory makes the base URI unavailable and the the "title.xml" entity cannot be loaded. Setting up the debug environment variable allows to detect that an attempt is made to load the /etc/xml/catalog but since it's not present the resolution fails.

    But the most advanced way to debug XML catalog processing is to use the xmlcatalog command shipped with libxml2, it allows to load catalogs and make resolution queries to see what is going on. This is also used for the regression tests:

    orchis:~/XML -> ./xmlcatalog test/catalogs/docbook.xml \
                       "-//OASIS//DTD DocBook XML V4.1.2//EN"
    http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
    orchis:~/XML -> 

    For debugging what is going on, adding one -v flags increase the verbosity level to indicate the processing done (adding a second flag also indicate what elements are recognized at parsing):

    orchis:~/XML -> ./xmlcatalog -v test/catalogs/docbook.xml \
                       "-//OASIS//DTD DocBook XML V4.1.2//EN"
    Parsing catalog test/catalogs/docbook.xml's content
    Found public match -//OASIS//DTD DocBook XML V4.1.2//EN
    http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
    Catalogs cleanup
    orchis:~/XML -> 

    A shell interface is also available to debug and process multiple queries (and for regression tests):

    orchis:~/XML -> ./xmlcatalog -shell test/catalogs/docbook.xml \
                       "-//OASIS//DTD DocBook XML V4.1.2//EN"
    > help   
    Commands available:
    public PublicID: make a PUBLIC identifier lookup
    system SystemID: make a SYSTEM identifier lookup
    resolve PublicID SystemID: do a full resolver lookup
    add 'type' 'orig' 'replace' : add an entry
    del 'values' : remove values
    dump: print the current catalog state
    debug: increase the verbosity level
    quiet: decrease the verbosity level
    exit:  quit the shell
    > public "-//OASIS//DTD DocBook XML V4.1.2//EN"
    http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
    > quit
    orchis:~/XML -> 

    This should be sufficient for most debugging purpose, this was actually used heavily to debug the XML Catalog implementation itself.

    How to create and maintain catalogs:

    Basically XML Catalogs are XML files, you can either use XML tools to manage them or use xmlcatalog for this. The basic step is to create a catalog the -create option provide this facility:

    orchis:~/XML -> ./xmlcatalog --create tst.xml
    <?xml version="1.0"?>
    <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
             "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/>
    orchis:~/XML -> 

    By default xmlcatalog does not overwrite the original catalog and save the result on the standard output, this can be overridden using the -noout option. The -add command allows to add entries in the catalog:

    orchis:~/XML -> ./xmlcatalog --noout --create --add "public" \
      "-//OASIS//DTD DocBook XML V4.1.2//EN" \
      http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml
    orchis:~/XML -> cat tst.xml
    <?xml version="1.0"?>
    <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \
      "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
    <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
            uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/>
    </catalog>
    orchis:~/XML -> 

    The -add option will always take 3 parameters even if some of the XML Catalog constructs (like nextCatalog) will have only a single argument, just pass a third empty string, it will be ignored.

    Similarly the -del option remove matching entries from the catalog:

    orchis:~/XML -> ./xmlcatalog --del \
      "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml
    <?xml version="1.0"?>
    <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
        "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/>
    orchis:~/XML -> 

    The catalog is now empty. Note that the matching of -del is exact and would have worked in a similar fashion with the Public ID string.

    This is rudimentary but should be sufficient to manage a not too complex catalog tree of resources.

    The implementor corner quick review of the API:

    First, and like for every other module of libxml, there is an automatically generated API page for catalog support.

    The header for the catalog interfaces should be included as:

    #include <libxml/catalog.h>

    The API is voluntarily kept very simple. First it is not obvious that applications really need access to it since it is the default behaviour of libxml2 (Note: it is possible to completely override libxml2 default catalog by using xmlSetExternalEntityLoader to plug an application specific resolver).

    Basically libxml2 support 2 catalog lists:

    • the default one, global shared by all the application
    • a per-document catalog, this one is built if the document uses the oasis-xml-catalog PIs to specify its own catalog list, it is associated to the parser context and destroyed when the parsing context is destroyed.

    the document one will be used first if it exists.

    Initialization routines:

    xmlInitializeCatalog(), xmlLoadCatalog() and xmlLoadCatalogs() should be used at startup to initialize the catalog, if the catalog should be initialized with specific values xmlLoadCatalog() or xmlLoadCatalogs() should be called before xmlInitializeCatalog() which would otherwise do a default initialization first.

    The xmlCatalogAddLocal() call is used by the parser to grow the document own catalog list if needed.

    Preferences setup:

    The XML Catalog spec requires the possibility to select default preferences between public and system delegation, xmlCatalogSetDefaultPrefer() allows this, xmlCatalogSetDefaults() and xmlCatalogGetDefaults() allow to control if XML Catalogs resolution should be forbidden, allowed for global catalog, for document catalog or both, the default is to allow both.

    And of course xmlCatalogSetDebug() allows to generate debug messages (through the xmlGenericError() mechanism).

    Querying routines:

    xmlCatalogResolve(), xmlCatalogResolveSystem(), xmlCatalogResolvePublic() and xmlCatalogResolveURI() are relatively explicit if you read the XML Catalog specification they correspond to section 7 algorithms, they should also work if you have loaded an SGML catalog with a simplified semantic.

    xmlCatalogLocalResolve() and xmlCatalogLocalResolveURI() are the same but operate on the document catalog list

    Cleanup and Miscellaneous:

    xmlCatalogCleanup() free-up the global catalog, xmlCatalogFreeLocal() is the per-document equivalent.

    xmlCatalogAdd() and xmlCatalogRemove() are used to dynamically modify the first catalog in the global list, and xmlCatalogDump() allows to dump a catalog state, those routines are primarily designed for xmlcatalog, I'm not sure that exposing more complex interfaces (like navigation ones) would be really useful.

    The xmlParseCatalogFile() is a function used to load XML Catalog files, it's similar as xmlParseFile() except it bypass all catalog lookups, it's provided because this functionality may be useful for client tools.

    threaded environments:

    Since the catalog tree is built progressively, some care has been taken to try to avoid troubles in multithreaded environments. The code is now thread safe assuming that the libxml2 library has been compiled with threads support.

    Other resources

    The XML Catalog specification is relatively recent so there isn't much literature to point at:

    • You can find a good rant from Norm Walsh about the need for catalogs, it provides a lot of context information even if I don't agree with everything presented. Norm also wrote a more recent article XML entities and URI resolvers describing them.
    • An old XML catalog proposal from John Cowan
    • The Resource Directory Description Language (RDDL) another catalog system but more oriented toward providing metadata for XML namespaces.
    • the page from the OASIS Technical Committee on Entity Resolution who maintains XML Catalog, you will find pointers to the specification update, some background and pointers to others tools providing XML Catalog support
    • There is a shell script to generate XML Catalogs for DocBook 4.1.2 . If it can write to the /etc/xml/ directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on the resources found on the system. Otherwise it will just create ~/xmlcatalog and ~/dbkxmlcatalog and doing:

      export XML_CATALOG_FILES=$HOME/xmlcatalog

      should allow to process DocBook documentations without requiring network accesses for the DTD or stylesheets

    • I have uploaded a small tarball containing XML Catalogs for DocBook 4.1.2 which seems to work fine for me too
    • The xmlcatalog manual page

    If you have suggestions for corrections or additions, simply contact me:

    The parser interfaces

    This section is directly intended to help programmers getting bootstrapped using the XML tollkit from the C language. It is not intended to be extensive. I hope the automatically generated documents will provide the completeness required, but as a separate set of documents. The interfaces of the XML parser are by principle low level, Those interested in a higher level API should look at DOM.

    The parser interfaces for XML are separated from the HTML parser interfaces. Let's have a look at how the XML parser can be called:

    Invoking the parser : the pull method

    Usually, the first thing to do is to read an XML input. The parser accepts documents either from in-memory strings or from files. The functions are defined in "parser.h":

    xmlDocPtr xmlParseMemory(char *buffer, int size);

    Parse a null-terminated string containing the document.

    xmlDocPtr xmlParseFile(const char *filename);

    Parse an XML document contained in a (possibly compressed) file.

    The parser returns a pointer to the document structure (or NULL in case of failure).

    Invoking the parser: the push method

    In order for the application to keep the control when the document is being fetched (which is common for GUI based programs) libxml2 provides a push interface, too, as of version 1.8.3. Here are the interface functions:

    xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
                                             void *user_data,
                                             const char *chunk,
                                             int size,
                                             const char *filename);
    int              xmlParseChunk          (xmlParserCtxtPtr ctxt,
                                             const char *chunk,
                                             int size,
                                             int terminate);

    and here is a simple example showing how to use the interface:

                FILE *f;
    
                f = fopen(filename, "r");
                if (f != NULL) {
                    int res, size = 1024;
                    char chars[1024];
                    xmlParserCtxtPtr ctxt;
    
                    res = fread(chars, 1, 4, f);
                    if (res > 0) {
                        ctxt = xmlCreatePushParserCtxt(NULL, NULL,
                                    chars, res, filename);
                        while ((res = fread(chars, 1, size, f)) > 0) {
                            xmlParseChunk(ctxt, chars, res, 0);
                        }
                        xmlParseChunk(ctxt, chars, 0, 1);
                        doc = ctxt->myDoc;
                        xmlFreeParserCtxt(ctxt);
                    }
                }

    The HTML parser embedded into libxml2 also has a push interface; the functions are just prefixed by "html" rather than "xml".

    Invoking the parser: the SAX interface

    The tree-building interface makes the parser memory-hungry, first loading the document in memory and then building the tree itself. Reading a document without building the tree is possible using the SAX interfaces (see SAX.h and James Henstridge's documentation). Note also that the push interface can be limited to SAX: just use the two first arguments of xmlCreatePushParserCtxt().

    Building a tree from scratch

    The other way to get an XML tree in memory is by building it. Basically there is a set of functions dedicated to building new elements. (These are also described in <libxml/tree.h>.) For example, here is a piece of code that produces the XML document used in the previous examples:

        #include <libxml/tree.h>
        xmlDocPtr doc;
        xmlNodePtr tree, subtree;
    
        doc = xmlNewDoc("1.0");
        doc->children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL);
        xmlSetProp(doc->children, "prop1", "gnome is great");
        xmlSetProp(doc->children, "prop2", "& linux too");
        tree = xmlNewChild(doc->children, NULL, "head", NULL);
        subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome");
        tree = xmlNewChild(doc->children, NULL, "chapter", NULL);
        subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure");
        subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ...");
        subtree = xmlNewChild(tree, NULL, "image", NULL);
        xmlSetProp(subtree, "href", "linus.gif");

    Not really rocket science ...

    Traversing the tree

    Basically by including "tree.h" your code has access to the internal structure of all the elements of the tree. The names should be somewhat simple like parent, children, next, prev, properties, etc... For example, still with the previous example:

    doc->children->children->children

    points to the title element,

    doc->children->children->next->children->children

    points to the text node containing the chapter title "The Linux adventure".

    NOTE: XML allows PIs and comments to be present before the document root, so doc->children may point to an element which is not the document Root Element; a function xmlDocGetRootElement() was added for this purpose.

    Modifying the tree

    Functions are provided for reading and writing the document content. Here is an excerpt from the tree API:

    xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value);

    This sets (or changes) an attribute carried by an ELEMENT node. The value can be NULL.

    const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar *name);

    This function returns a pointer to new copy of the property content. Note that the user must deallocate the result.

    Two functions are provided for reading and writing the text associated with elements:

    xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value);

    This function takes an "external" string and converts it to one text node or possibly to a list of entity and text nodes. All non-predefined entity references like &Gnome; will be stored internally as entity nodes, hence the result of the function may not be a single node.

    xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine);

    This function is the inverse of xmlStringGetNodeList(). It generates a new string containing the content of the text and entity nodes. Note the extra argument inLine. If this argument is set to 1, the function will expand entity references. For example, instead of returning the &Gnome; XML encoding in the string, it will substitute it with its value (say, "GNU Network Object Model Environment").

    Saving a tree

    Basically 3 options are possible:

    void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);

    Returns a buffer into which the document has been saved.

    extern void xmlDocDump(FILE *f, xmlDocPtr doc);

    Dumps a document to an open file descriptor.

    int xmlSaveFile(const char *filename, xmlDocPtr cur);

    Saves the document to a file. In this case, the compression interface is triggered if it has been turned on.

    Compression

    The library transparently handles compression when doing file-based accesses. The level of compression on saves can be turned on either globally or individually for one file:

    int xmlGetDocCompressMode (xmlDocPtr doc);

    Gets the document compression ratio (0-9).

    void xmlSetDocCompressMode (xmlDocPtr doc, int mode);

    Sets the document compression ratio.

    int xmlGetCompressMode(void);

    Gets the default compression ratio.

    void xmlSetCompressMode(int mode);

    Sets the default compression ratio.

    Entities or no entities

    Entities in principle are similar to simple C macros. An entity defines an abbreviation for a given string that you can reuse many times throughout the content of your document. Entities are especially useful when a given string may occur frequently within a document, or to confine the change needed to a document to a restricted area in the internal subset of the document (at the beginning). Example:

    1 <?xml version="1.0"?>
    2 <!DOCTYPE EXAMPLE SYSTEM "example.dtd" [
    3 <!ENTITY xml "Extensible Markup Language">
    4 ]>
    5 <EXAMPLE>
    6    &xml;
    7 </EXAMPLE>

    Line 3 declares the xml entity. Line 6 uses the xml entity, by prefixing its name with '&' and following it by ';' without any spaces added. There are 5 predefined entities in libxml2 allowing you to escape characters with predefined meaning in some parts of the xml document content: &lt; for the character '<', &gt; for the character '>', &apos; for the character ''', &quot; for the character '"', and &amp; for the character '&'.

    One of the problems related to entities is that you may want the parser to substitute an entity's content so that you can see the replacement text in your application. Or you may prefer to keep entity references as such in the content to be able to save the document back without losing this usually precious information (if the user went through the pain of explicitly defining entities, he may have a a rather negative attitude if you blindly substitute them as saving time). The xmlSubstituteEntitiesDefault() function allows you to check and change the behaviour, which is to not substitute entities by default.

    Here is the DOM tree built by libxml2 for the previous document in the default case:

    /gnome/src/gnome-xml -> ./xmllint --debug test/ent1
    DOCUMENT
    version=1.0
       ELEMENT EXAMPLE
         TEXT
         content=
         ENTITY_REF
           INTERNAL_GENERAL_ENTITY xml
           content=Extensible Markup Language
         TEXT
         content=

    And here is the result when substituting entities:

    /gnome/src/gnome-xml -> ./tester --debug --noent test/ent1
    DOCUMENT
    version=1.0
       ELEMENT EXAMPLE
         TEXT
         content=     Extensible Markup Language

    So, entities or no entities? Basically, it depends on your use case. I suggest that you keep the non-substituting default behaviour and avoid using entities in your XML document or data if you are not willing to handle the entity references elements in the DOM tree.

    Note that at save time libxml2 enforces the conversion of the predefined entities where necessary to prevent well-formedness problems, and will also transparently replace those with chars (i.e. it will not generate entity reference elements in the DOM tree or call the reference() SAX callback when finding them in the input).

    WARNING: handling entities on top of the libxml2 SAX interface is difficult!!! If you plan to use non-predefined entities in your documents, then the learning curve to handle then using the SAX API may be long. If you plan to use complex documents, I strongly suggest you consider using the DOM interface instead and let libxml deal with the complexity rather than trying to do it yourself.

    Namespaces

    The libxml2 library implements XML namespaces support by recognizing namespace constructs in the input, and does namespace lookup automatically when building the DOM tree. A namespace declaration is associated with an in-memory structure and all elements or attributes within that namespace point to it. Hence testing the namespace is a simple and fast equality operation at the user level.

    I suggest that people using libxml2 use a namespace, and declare it in the root element of their document as the default namespace. Then they don't need to use the prefix in the content but we will have a basis for future semantic refinement and merging of data from different sources. This doesn't increase the size of the XML output significantly, but significantly increases its value in the long-term. Example:

    <mydoc xmlns="http://mydoc.example.org/schemas/">
       <elem1>...</elem1>
       <elem2>...</elem2>
    </mydoc>

    The namespace value has to be an absolute URL, but the URL doesn't have to point to any existing resource on the Web. It will bind all the element and attributes with that URL. I suggest to use an URL within a domain you control, and that the URL should contain some kind of version information if possible. For example, "http://www.gnome.org/gnumeric/1.0/" is a good namespace scheme.

    Then when you load a file, make sure that a namespace carrying the version-independent prefix is installed on the root element of your document, and if the version information don't match something you know, warn the user and be liberal in what you accept as the input. Also do *not* try to base namespace checking on the prefix value. <foo:text> may be exactly the same as <bar:text> in another document. What really matters is the URI associated with the element or the attribute, not the prefix string (which is just a shortcut for the full URI). In libxml, element and attributes have an ns field pointing to an xmlNs structure detailing the namespace prefix and its URI.

    @@Interfaces@@

    xmlNodePtr node;
    if(!strncmp(node->name,"mytag",5)
      && node->ns
      && !strcmp(node->ns->href,"http://www.mysite.com/myns/1.0")) {
      ...
    }

    Usually people object to using namespaces together with validity checking. I will try to make sure that using namespaces won't break validity checking, so even if you plan to use or currently are using validation I strongly suggest adding namespaces to your document. A default namespace scheme xmlns="http://...." should not break validity even on less flexible parsers. Using namespaces to mix and differentiate content coming from multiple DTDs will certainly break current validation schemes. To check such documents one needs to use schema-validation, which is supported in libxml2 as well. See relagx-ng and w3c-schema.

    Upgrading 1.x code

    Incompatible changes:

    Version 2 of libxml2 is the first version introducing serious backward incompatible changes. The main goals were:

    • a general cleanup. A number of mistakes inherited from the very early versions couldn't be changed due to compatibility constraints. Example the "childs" element in the nodes.
    • Uniformization of the various nodes, at least for their header and link parts (doc, parent, children, prev, next), the goal is a simpler programming model and simplifying the task of the DOM implementors.
    • better conformances to the XML specification, for example version 1.x had an heuristic to try to detect ignorable white spaces. As a result the SAX event generated were ignorableWhitespace() while the spec requires character() in that case. This also mean that a number of DOM node containing blank text may populate the DOM tree which were not present before.

    How to fix libxml-1.x code:

    So client code of libxml designed to run with version 1.x may have to be changed to compile against version 2.x of libxml. Here is a list of changes that I have collected, they may not be sufficient, so in case you find other change which are required, drop me a mail:

    1. The package name have changed from libxml to libxml2, the library name is now -lxml2 . There is a new xml2-config script which should be used to select the right parameters libxml2
    2. Node childs field has been renamed children so s/childs/children/g should be applied (probability of having "childs" anywhere else is close to 0+
    3. The document don't have anymore a root element it has been replaced by children and usually you will get a list of element here. For example a Dtd element for the internal subset and it's declaration may be found in that list, as well as processing instructions or comments found before or after the document root element. Use xmlDocGetRootElement(doc) to get the root element of a document. Alternatively if you are sure to not reference DTDs nor have PIs or comments before or after the root element s/->root/->children/g will probably do it.
    4. The white space issue, this one is more complex, unless special case of validating parsing, the line breaks and spaces usually used for indenting and formatting the document content becomes significant. So they are reported by SAX and if your using the DOM tree, corresponding nodes are generated. Too approach can be taken:
      1. lazy one, use the compatibility call xmlKeepBlanksDefault(0) but be aware that you are relying on a special (and possibly broken) set of heuristics of libxml to detect ignorable blanks. Don't complain if it breaks or make your application not 100% clean w.r.t. to it's input.
      2. the Right Way: change you code to accept possibly insignificant blanks characters, or have your tree populated with weird blank text nodes. You can spot them using the commodity function xmlIsBlankNode(node) returning 1 for such blank nodes.

      Note also that with the new default the output functions don't add any extra indentation when saving a tree in order to be able to round trip (read and save) without inflating the document with extra formatting chars.

    5. The include path has changed to $prefix/libxml/ and the includes themselves uses this new prefix in includes instructions... If you are using (as expected) the
      xml2-config --cflags

      output to generate you compile commands this will probably work out of the box

    6. xmlDetectCharEncoding takes an extra argument indicating the length in byte of the head of the document available for character detection.

    Ensuring both libxml-1.x and libxml-2.x compatibility

    Two new version of libxml (1.8.11) and libxml2 (2.3.4) have been released to allow smooth upgrade of existing libxml v1code while retaining compatibility. They offers the following:

    1. similar include naming, one should use #include<libxml/...> in both cases.
    2. similar identifiers defined via macros for the child and root fields: respectively xmlChildrenNode and xmlRootNode
    3. a new macro LIBXML_TEST_VERSION which should be inserted once in the client code

    So the roadmap to upgrade your existing libxml applications is the following:

    1. install the libxml-1.8.8 (and libxml-devel-1.8.8) packages
    2. find all occurrences where the xmlDoc root field is used and change it to xmlRootNode
    3. similarly find all occurrences where the xmlNode childs field is used and change it to xmlChildrenNode
    4. add a LIBXML_TEST_VERSION macro somewhere in your main() or in the library init entry point
    5. Recompile, check compatibility, it should still work
    6. Change your configure script to look first for xml2-config and fall back using xml-config . Use the --cflags and --libs output of the command as the Include and Linking parameters needed to use libxml.
    7. install libxml2-2.3.x and libxml2-devel-2.3.x (libxml-1.8.y and libxml-devel-1.8.y can be kept simultaneously)
    8. remove your config.cache, relaunch your configuration mechanism, and recompile, if steps 2 and 3 were done right it should compile as-is
    9. Test that your application is still running correctly, if not this may be due to extra empty nodes due to formating spaces being kept in libxml2 contrary to libxml1, in that case insert xmlKeepBlanksDefault(1) in your code before calling the parser (next to LIBXML_TEST_VERSION is a fine place).

    Following those steps should work. It worked for some of my own code.

    Let me put some emphasis on the fact that there is far more changes from libxml 1.x to 2.x than the ones you may have to patch for. The overall code has been considerably cleaned up and the conformance to the XML specification has been drastically improved too. Don't take those changes as an excuse to not upgrade, it may cost a lot on the long term ...

    Thread safety

    Starting with 2.4.7, libxml2 makes provisions to ensure that concurrent threads can safely work in parallel parsing different documents. There is however a couple of things to do to ensure it:

    • configure the library accordingly using the --with-threads options
    • call xmlInitParser() in the "main" thread before using any of the libxml2 API (except possibly selecting a different memory allocator)

    Note that the thread safety cannot be ensured for multiple threads sharing the same document, the locking must be done at the application level, libxml exports a basic mutex and reentrant mutexes API in <libxml/threads.h>. The parts of the library checked for thread safety are:

    • concurrent loading
    • file access resolution
    • catalog access
    • catalog building
    • entities lookup/accesses
    • validation
    • global variables per-thread override
    • memory handling

    XPath is supposed to be thread safe now, but this wasn't tested seriously.

    DOM Principles

    DOM stands for the Document Object Model; this is an API for accessing XML or HTML structured documents. Native support for DOM in Gnome is on the way (module gnome-dom), and will be based on gnome-xml. This will be a far cleaner interface to manipulate XML files within Gnome since it won't expose the internal structure.

    The current DOM implementation on top of libxml2 is the gdome2 Gnome module, this is a full DOM interface, thanks to Paolo Casarini, check the Gdome2 homepage for more information.

    A real example

    Here is a real size example, where the actual content of the application data is not kept in the DOM tree but uses internal structures. It is based on a proposal to keep a database of jobs related to Gnome, with an XML based storage structure. Here is an XML encoded jobs base:

    <?xml version="1.0"?>
    <gjob:Helping xmlns:gjob="http://www.gnome.org/some-location">
      <gjob:Jobs>
    
        <gjob:Job>
          <gjob:Project ID="3"/>
          <gjob:Application>GBackup</gjob:Application>
          <gjob:Category>Development</gjob:Category>
    
          <gjob:Update>
            <gjob:Status>Open</gjob:Status>
            <gjob:Modified>Mon, 07 Jun 1999 20:27:45 -0400 MET DST</gjob:Modified>
            <gjob:Salary>USD 0.00</gjob:Salary>
          </gjob:Update>
    
          <gjob:Developers>
            <gjob:Developer>
            </gjob:Developer>
          </gjob:Developers>
    
          <gjob:Contact>
            <gjob:Person>Nathan Clemons</gjob:Person>
            <gjob:Email>nathan@windsofstorm.net</gjob:Email>
            <gjob:Company>
            </gjob:Company>
            <gjob:Organisation>
            </gjob:Organisation>
            <gjob:Webpage>
            </gjob:Webpage>
            <gjob:Snailmail>
            </gjob:Snailmail>
            <gjob:Phone>
            </gjob:Phone>
          </gjob:Contact>
    
          <gjob:Requirements>
          The program should be released as free software, under the GPL.
          </gjob:Requirements>
    
          <gjob:Skills>
          </gjob:Skills>
    
          <gjob:Details>
          A GNOME based system that will allow a superuser to configure 
          compressed and uncompressed files and/or file systems to be backed 
          up with a supported media in the system.  This should be able to 
          perform via find commands generating a list of files that are passed 
          to tar, dd, cpio, cp, gzip, etc., to be directed to the tape machine 
          or via operations performed on the filesystem itself. Email 
          notification and GUI status display very important.
          </gjob:Details>
    
        </gjob:Job>
    
      </gjob:Jobs>
    </gjob:Helping>

    While loading the XML file into an internal DOM tree is a matter of calling only a couple of functions, browsing the tree to gather the data and generate the internal structures is harder, and more error prone.

    The suggested principle is to be tolerant with respect to the input structure. For example, the ordering of the attributes is not significant, the XML specification is clear about it. It's also usually a good idea not to depend on the order of the children of a given node, unless it really makes things harder. Here is some code to parse the information for a person:

    /*
     * A person record
     */
    typedef struct person {
        char *name;
        char *email;
        char *company;
        char *organisation;
        char *smail;
        char *webPage;
        char *phone;
    } person, *personPtr;
    
    /*
     * And the code needed to parse it
     */
    personPtr parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
        personPtr ret = NULL;
    
    DEBUG("parsePerson\n");
        /*
         * allocate the struct
         */
        ret = (personPtr) malloc(sizeof(person));
        if (ret == NULL) {
            fprintf(stderr,"out of memory\n");
            return(NULL);
        }
        memset(ret, 0, sizeof(person));
    
        /* We don't care what the top level element name is */
        cur = cur->xmlChildrenNode;
        while (cur != NULL) {
            if ((!strcmp(cur->name, "Person")) && (cur->ns == ns))
                ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            if ((!strcmp(cur->name, "Email")) && (cur->ns == ns))
                ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            cur = cur->next;
        }
    
        return(ret);
    }

    Here are a couple of things to notice:

    • Usually a recursive parsing style is the more convenient one: XML data is by nature subject to repetitive constructs and usually exhibits highly structured patterns.
    • The two arguments of type xmlDocPtr and xmlNsPtr, i.e. the pointer to the global XML document and the namespace reserved to the application. Document wide information are needed for example to decode entities and it's a good coding practice to define a namespace for your application set of data and test that the element and attributes you're analyzing actually pertains to your application space. This is done by a simple equality test (cur->ns == ns).
    • To retrieve text and attributes value, you can use the function xmlNodeListGetString to gather all the text and entity reference nodes generated by the DOM output and produce an single text string.

    Here is another piece of code used to parse another level of the structure:

    #include <libxml/tree.h>
    /*
     * a Description for a Job
     */
    typedef struct job {
        char *projectID;
        char *application;
        char *category;
        personPtr contact;
        int nbDevelopers;
        personPtr developers[100]; /* using dynamic alloc is left as an exercise */
    } job, *jobPtr;
    
    /*
     * And the code needed to parse it
     */
    jobPtr parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
        jobPtr ret = NULL;
    
    DEBUG("parseJob\n");
        /*
         * allocate the struct
         */
        ret = (jobPtr) malloc(sizeof(job));
        if (ret == NULL) {
            fprintf(stderr,"out of memory\n");
            return(NULL);
        }
        memset(ret, 0, sizeof(job));
    
        /* We don't care what the top level element name is */
        cur = cur->xmlChildrenNode;
        while (cur != NULL) {
            
            if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) {
                ret->projectID = xmlGetProp(cur, "ID");
                if (ret->projectID == NULL) {
                    fprintf(stderr, "Project has no ID\n");
                }
            }
            if ((!strcmp(cur->name, "Application")) && (cur->ns == ns))
                ret->application = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            if ((!strcmp(cur->name, "Category")) && (cur->ns == ns))
                ret->category = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns))
                ret->contact = parsePerson(doc, ns, cur);
            cur = cur->next;
        }
    
        return(ret);
    }

    Once you are used to it, writing this kind of code is quite simple, but boring. Ultimately, it could be possible to write stubbers taking either C data structure definitions, a set of XML examples or an XML DTD and produce the code needed to import and export the content between C data and XML storage. This is left as an exercise to the reader :-)

    Feel free to use the code for the full C parsing example as a template, it is also available with Makefile in the Gnome SVN base under libxml2/example

    Contributions

    0707010002b24e000081a40000000000000000000000014cb7d885000015b7000000b500010002ffffffffffffffff0000003a00000000root/usr/local/share/doc/libxml2-2.7.7/html/structure.gifGIF89aôaðÿÿÿ!ù,ôaþŒ©Ëí£œ´Ú‹³Þ¼û†âH–扦êʶî ÇòL×öçúÎ÷þ ‡Ä¢ñˆL*—̦ó J§ÔªõŠÍj·Ü®÷ ‹ÇdàŒN«×ì¶û ·ËôºýŽo°û¼ÿ(ˆÒgU8ˆ˜¨¸¨xHåÈ)9I™)uY©¹ÉÙé“ ê9JZj:"ê”zÊÚêúаÊ$ [k{I«¤‹Ûëû[Æ‹$ \l|lFœ¡\ÄŒü qÈ⺶¢@ýÙd_ÛeV šÞ YfeA¢©¡`b¸Ñ’æI6dTe²‘Wš’åˆJ" Ý€ÛQ4B½é_—r¾¸¦i°ÕI ]röYäƒÓ ©(…?êRªŸ0f¥†ÙÅÙÔj‡v’(š)¦£¾zÚE2ê(£j)(h¦‘'þ¨qš8'©2 ,®yʺ$²Ëþù©’±¦j謣Ôʦ²ªZ*ª…½¥v$ Ãkj¥=Ên¸îº sA:[n¶Ëº{/SkåŸ@ž*±ÜRëm%ñá›ï»Ò)à¦éÊ\ŽûÊ ð‘9І"¯•`Â[duä¢[Os™²¤.ß„m‡Œ‘Lå­'<‰t‡¡ö&ÈÝíꦑ‚½ý•@ÅUÁÎ ¯žh%êªX¶ŠVpÉCb#[A°ž¢§…Õc^1[ ¼vÖ£ãeA«nžÖ19lEi?“VÔ¶PÄ` coñZ@V¶8ɳhÙÀÖê%·Ÿˆ-o‹þf5 íÌ·Êê™sof±Ð÷³Çµ†®n5(†6—a‹b-8A\l¬¶º„À‹w`V“R©wG=®t1^òÒo$çÝÓR×ç°qTÛ î â+_¹\·¾S/^5Ù^F#¼‰p€³iK/l» Ó˜"Ãâ_N0XÆ}°¿*•þl¡ 5ÚÀxØ ‡¢Ãîír2L Sb·-Æeü­³¸ÆÍ˜ÊŽÛóø£… Šáöã![Ò½&42Ž•< Jù‚ÔãÔ¯lAbyËÄùD9½ødÊÑŽº=ò÷Ù?qž‘›Œ‹}’ûˆÒ-‚ͺ•¦7‘r^É•¦q6G"V8þ?“¹ÐúT9³B#BÑy£ãE½ËJ7+x†üo¥! Í+>ºYk¢Ÿ°é^ZF™Öô¨Ýihò|ÚDu«ãhg0Ÿº'Ƭ5M7j¥Î[µb®1ã¤7×+Ñ»¶l±‘ËÇ_[úÕU=¶ãJýDe BÚx ö³{}Dk7›Ùðq6åbmjn?–0â¶(¹ñ¬IO×QÛˆ}”·»€CvsµWâ3ÝE¹Œï|ë{ƒ÷Þ·¿ÿ=elO à_5ñ¬ߠ©p7ÉEšÀ]R²‡:]®éîp‰H|ŠÅ»üp¯QâÐvž½§ubL¬¯˜ò|b…r\ˆN8ZÄ‘óþ~Ujæøª¹ÍÄs‘ë ,¸®½ÚsÒ/ÁÕæB·ƒÑ·õ…†Êç.ŸvÌwŽš1èIU'µ™¡¡æåmýèÁ64Òï«]ð´uìP÷'Ç¢¾ÒýüÜêl?±ÛSÍrŨ릭žÁú¨ glQ×­ÿ<4N1¼îð:ðB,øž=ë1ü¤¿]rá!m_ë_8ÿ"H¹ùñsî+…M¿¥§wô‡ov‹›'oSH†oˆ=´…Xèg~Ä")l$†8‰„„†?uˆ Ñ( µþgWˆV˜‰á–…Š^Ö‰dU€Ÿˆˆ¥èDȇ¬Xg§ÈpH‹Ðg(J)ÈhzpVäæX¸huÀˆI‹Èˆ¦Èj¶¶UÄØz-xÂèH—˜† ‘hoõO(i±ØŒÆ8Œr˜‡lacöÑ2{(Eª‡:Tf£äŠî—„Y6œ³Ž¤eïrΔ‚¾àS3( åx€£øý¦\ðͶñ…SêÈÓ~åƒüÇ“ŽyAeÖ3‘T‘Yù˜‘És‘Vñ©aÉ!‰ZòHe2±‘)’+v޳@’‡b’‘Egð’Ù’¼èŒÅu“/1“е‹eÖ“”“:þY‰5” T””‹Sô“¥ð”‚¥Š#—”W•v5•Öu•X´”Ly”T‰:[ 7]é•;ùJç+~#–^••b¶‘k‰DdY–thTª «´KׂzÄü#—‰ó‡ƒTsœ¨*zöƒ„Ù V‹Ýó—€Ù”]…ŠÒP‚Fti‰Lp9—éQ(Xd{Õ‹¦ …’–¸tMU¹ ˜É–Ö&±°Ô`3K§šŠ‰H–yM¦™õäVêÑr§'L§M‘™.“P£‰Œï”¨™šªÙ½Y0Âäq@A䔘|æ+Åt#ɘ¹©›Ù„œÐ±|&¨\ySášž‚5ÿRv¦9cܹ þ†^Ѥ_•Å„‚D;ʹœ&Cò)wö©…îùž-(™SÑ)pTŸô$=Ú£Ñ.ÒR3…vfcŞ݀Ÿj…Qq—x35{t¡?Ä  j–Fô¡RÕ–T¢&šˆ#¢"J—­Ø¢.*¢£›ù•U£Ã°¢ú“¢ù9¢-Ô£>ú¢>¤*Ú”T¤Fz£%”¤Gu¢Ô¤Nº£ð¥;õ¤,š£º¤T¥V:¥æÓ¥Rú£¦^:¦\š¥FÉŒ$š¦ö’lÚ¦†’F˜mqzƒU¦"™§Ji§§}ê§ê´§zzOƒÚ‘†ê“€z§Ï„¨Ù¨ý¨¨‹ LZ‘”º‘ þ‚ôˆ©*K–Z©šº©™Ú©¡*ªèHª¥š‹§º†±ä©Ž:ªª Š© «í“¤³8µºQŠ«wëؽjH¿ =Á*¬âÕª ¦«ÇÊ“´¬Ìª–H¬ÐZIΚ¬„ê¬Ôª­ÛZOsJ§§ã­A¸ âˆdáZq+f®ÑÉHéZ…ºÇÓ†f<ø¦Ê.énz¯[¸˜Ë­Õú¯-8“5阋‰[­a”s¸¦ç4°[:£Cš€gê?eº°‚(±Šª «£ë?kŽ”u¤þ™±…–WªF‹@*\ýJÀÙ5ã)b3 g{ñŠ,Ka€²Eó¥4²¤X¯þ{/Í)a¼i}A{›ËZ!¹³×ö³'ˆ³'إÂU»zñ wS·+û´ª´ªQk‹];®#ë k©´wâR%çå(7+¶ÓZŒkMK bKJe¼y,’d#9¶`kNa;±€[7d[·%‹±H»Šêá!´¡Æâ·d¸[ËH Џr+BI7CV[šè4ZÔ³àT¥ëb3Ž;ŽÑå² ú¶©›† k¸¶- ¥%µ¡ݧ¸ôI¸:µXW2Ö¸ 9TSÀSã>·Êµ—QßzçÂujK_6l!»ŒJ Rꆷ¼g1»š«Y6ïzc‘Ëkßë»×溹«ŽŸ¦(i›&þX;.åA¹ uSo?¼ÃJp·ëY¸N[¾¤Å®R61‘—¾ü5Žà—„ø[^H¸¿8´v‹½[ rž[5ê*¡ÌO†Åˆü~¹DÁ‡ [³˜VË4œò»xâR¨3œËšoq®ž©• ã½ÄV¿d«5ˆa»G[»¼0*V¼ i9œ/°g‚>Ëf'³·Öˆº\Ã*·2S_Þ©•Ås²¬;½›¸! ½×œÝrŬÓÃ>ì³@¼¼YëÄO!£Ãgº|KÀV,¹³‹t] Ç xc´tKijÅpBšCÃ^¼9üƶT~ûBÈô:· Ç5´µ½:Ó½nŒÈ‡œ*’†þ]ª{fv|Ç¡K‹Û²\)gÉLA®+ÆÊ» ü¸ˆl£üÉGgÊìÂÿ9ÊH1ÃæK²§|51"I¸+űì–û»>SœçPXx¬ËŠÇ5ý9¾»|°U<˪\˧Ë0¤ûÊRÜÃýkÌAìÊÊœÊÈËlŒÍ¹<Í[Å™üº¤ Íäg_¨ ÊalÍ%|´$Îð\¸G Qž|Ä+çÇ\IãLδ¬ÏßÁ¡5ËȵU½˜ÆËžx|ÌBvx9hÐÀèб Ð0«pó)Ñå…ÉÍÌÍt¼Ñá¾¼ÊÌø¿w„\Îþy²=¿¢Ù®ÇûI¬ø¾ú*ÊtØÒMÓÍј{³ÌÜÀ‹þ1€¬Î;¹ -|¾°Ï µ ÷À½a¬Á|šÜãl Å\É·|ÌB ÎL½Ö }SÝÍÎì´>Í]:ÕÎ[=@üœÂ |&fÌÖ‰‹ÓZÅþÂ|¬Ä̯'³—yÕƒ Öb–Ñ™«¿Ì¡‚Ý…CÈ†à °‘F„PÍ×bm_yUÖqØ)пÈgû}ïSÓñlÖ´V¼”WÏŒí¶=ØÅ£­ÓËÓ|\ËVa‹ÄÚ9ÝÙ³éu/öÒþŒy—­Å™}Ú‰ÝѤ(Õ= "÷œÏ²ýÕ¿M›ÙؘÈZ»ÅýÆÚE­³‚Bn³jÛÛý¶a|С<Ïͽ%Ï ÔI-Ýþ³üÜÏ}ÇèmÝ“mÔ’†Ø¹#ìÛ¨íÞýF=Ý.ßÌß̽ÍýÝÛò}ëÜœmà:ºÜc!£ÿÝ•DýÝ{}Ûì]¸ >×è$Úï}×%BávýÅ~ŒnÓ~Üø½à9æážâáîâ3Þ²âáϼâˆ"̸ýÏ2j“s±(.ÜçM⸅´AãEj4Žä<>ÓO.à nR á>®“•C°Zšã kå\IáòL1@¯Äöå{5æzpæh5¯PTæ•ý¿@7ÒM²4¾ÔìÚŽq.çfŽçpKf`·6×jˆï¡ŒöøçT*YtŒ è è—m~½Šnþè Þl@‘e‹žÛ`êªdéJ†é°»>Ÿ®–…þR›îß8>á¥þ©/Žê1ÖéCöšÙ‰«Tž|^°š¾êýDš†ùN3Õª¢þµž>L¶¹gÂi¼§ùê<†¾´-T¢yV®•ì5¶ìŸÉgèÕ­ê—®LÄnkF,T^ê¦þ ß9/•¶®e¡ñD:ñ9SñÉyñ•ñ`´ñ&ÔñLúñò™%ïnSòn‘â¾XÑÞb'·ƒÈ­1_H{¾çVFó#Ý 7£çSµ€†@‰¶ –.ß±.V?¯F =_ôJôLŸôD†ŒnäN¿ TOæPOé’J‚HocVí^¯:AŸ?Ø>õX_õfõRô\ï:bo<œºö`Ÿ:nïórO8h¿:t¿ôxàv?:zõZŸõp¿õ~ë‚â|?÷l Œß÷Š?X:ÿæv$ùéšó•où2¯ù›ÏùïùŸú¡/ú£\;0707010002b24f000081a40000000000000000000000014cb7d88500000007000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/test1.xml 0707010002b203000081a40000000000000000000000014cb7d88500007d8f000000b500010002ffffffffffffffff0000003900000000root/usr/local/share/doc/libxml2-2.7.7/html/examples.xml Parse and validate an XML file with an xmlReader Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader2 <valid_xml_filename> reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp Daniel Veillard see Copyright for the status of this software.
    xmlReader
    <libxml/xmlreader.h>
    Load a document, locate subelements with XPath, modify said elements and save the resulting document. Shows how to make a full round-trip from a load/edit/save xpath2 <xml-file> <xpath-expr> <new-value> xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp Aleksey Sanin and Daniel Veillard see Copyright for the status of this software.
    XPath
    <libxml/parser.h> <libxml/xpath.h> <libxml/xpathInternals.h> <libxml/tree.h>
    Evaluate XPath expression and prints result node set. Shows how to evaluate XPath expression and register known namespaces in XPath context. xpath1 <xml-file> <xpath-expr> [<known-ns-list>] ./xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp Aleksey Sanin see Copyright for the status of this software.
    XPath
    <libxml/parser.h> <libxml/xpath.h> <libxml/xpathInternals.h> <libxml/tree.h>
    Parse an XML document in memory to a tree and free it Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree parse3 parse3 Daniel Veillard see Copyright for the status of this software.
    Parsing
    <libxml/tree.h> <libxml/parser.h>
    Output to char buffer Demonstrate the use of xmlDocDumpMemory to output document to a character buffer io2 io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp John Fleck see Copyright for the status of this software.
    InputOutput
    <libxml/parser.h>
    Creates a tree Shows how to create document, nodes and dump it to stdout or file. tree2 <filename> -Default output: stdout tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp Lucas Brasilino <brasilino@recife.pe.gov.br> see Copyright for the status of this software
    Tree
    <libxml/tree.h> <libxml/parser.h>
    Parse an XML file with an xmlReader Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader1 <filename> reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp Daniel Veillard see Copyright for the status of this software.
    xmlReader
    <libxml/xmlreader.h>
    use various APIs for the xmlWriter tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized. testWriter testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res Alfred Mickautsch see Copyright for the status of this software.
    xmlWriter
    <libxml/encoding.h> <libxml/xmlwriter.h>
    Parse an XML document chunk by chunk to a tree and free it Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree parse4 test3.xml parse4 test3.xml Daniel Veillard see Copyright for the status of this software.
    Parsing
    <libxml/tree.h> <libxml/parser.h>
    Show how to extract subdocuments with xmlReader Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader3 reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp Daniel Veillard see Copyright for the status of this software.
    xmlReader
    <libxml/xmlreader.h>
    Example of custom Input/Output Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way. io1 io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp Daniel Veillard see Copyright for the status of this software.
    InputOutput
    <libxml/parser.h> <libxml/xmlIO.h> <libxml/xinclude.h> <libxml/tree.h>
    Parse an XML file to a tree and free it Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree parse1 test1.xml parse1 test1.xml Daniel Veillard see Copyright for the status of this software.
    Parsing
    <libxml/tree.h> <libxml/parser.h>
    Navigates a tree to print element names Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order. tree1 filename_or_URL tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp Dodji Seketeli see Copyright for the status of this software.
    Tree
    <libxml/tree.h> <libxml/parser.h>
    Parse multiple XML files reusing an xmlReader Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader4 <filename> [ filename ... ] reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp Graham Bennett see Copyright for the status of this software.
    xmlReader
    <libxml/xmlreader.h>
    Parse and validate an XML file to a tree and free the result Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree. parse2 test2.xml parse2 test2.xml Daniel Veillard see Copyright for the status of this software.
    Parsing
    <libxml/tree.h> <libxml/parser.h>
    0707010002b24a000081a40000000000000000000000014cb7d88500000c3e000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/reader4.c/** * section: xmlReader * synopsis: Parse multiple XML files reusing an xmlReader * purpose: Demonstrate the use of xmlReaderForFile() and * xmlReaderNewFile to parse XML files while reusing the reader object * and parser context. (Note that the XMLReader functions require * libxml2 version later than 2.6.) * usage: reader4 [ filename ... ] * test: reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp * author: Graham Bennett * copy: see Copyright for the status of this software. */ #include #include #ifdef LIBXML_READER_ENABLED static void processDoc(xmlTextReaderPtr readerPtr) { int ret; xmlDocPtr docPtr; const xmlChar *URL; ret = xmlTextReaderRead(readerPtr); while (ret == 1) { ret = xmlTextReaderRead(readerPtr); } /* * One can obtain the document pointer to get insteresting * information about the document like the URL, but one must also * be sure to clean it up at the end (see below). */ docPtr = xmlTextReaderCurrentDoc(readerPtr); if (NULL == docPtr) { fprintf(stderr, "failed to obtain document\n"); return; } URL = docPtr->URL; if (NULL == URL) { fprintf(stderr, "Failed to obtain URL\n"); } if (ret != 0) { fprintf(stderr, "%s: Failed to parse\n", URL); return; } printf("%s: Processed ok\n", (const char *)URL); } int main(int argc, char **argv) { xmlTextReaderPtr readerPtr; int i; xmlDocPtr docPtr; if (argc < 2) return(1); /* * this initialises the library and check potential ABI mismatches * between the version it was compiled for and the actual shared * library used. */ LIBXML_TEST_VERSION /* * Create a new reader for the first file and process the * document. */ readerPtr = xmlReaderForFile(argv[1], NULL, 0); if (NULL == readerPtr) { fprintf(stderr, "%s: failed to create reader\n", argv[1]); return(1); } processDoc(readerPtr); /* * The reader can be reused for subsequent files. */ for (i=2; i < argc; ++i) { xmlReaderNewFile(readerPtr, argv[i], NULL, 0); if (NULL == readerPtr) { fprintf(stderr, "%s: failed to create reader\n", argv[i]); return(1); } processDoc(readerPtr); } /* * Since we've called xmlTextReaderCurrentDoc, we now have to * clean up after ourselves. We only have to do this the last * time, because xmlReaderNewFile calls xmlCtxtReset which takes * care of it. */ docPtr = xmlTextReaderCurrentDoc(readerPtr); if (docPtr != NULL) xmlFreeDoc(docPtr); /* * Clean up the reader. */ xmlFreeTextReader(readerPtr); /* * Cleanup function for the XML library. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); return(0); } #else int main(void) { fprintf(stderr, "xmlReader support not compiled in\n"); exit(1); } #endif 0707010002b201000081a40000000000000000000000014cb7d88500000bfe000000b500010002ffffffffffffffff0000004300000000root/usr/local/share/doc/libxml2-2.7.7/html/Libxml2-Logo-90x34.gifGIF89aZ"÷ÿòóòñòñÝÞÜÍÎÉïðïØÙÕ¹¹µÂ½ðñðKSTóôóqqnjjf::9´µ±ÝÝÛ--,ÏÐÉàáÞ©ª¥ÅÆÁžž™èèæƒ…%&%===îïî••‘ëìêéééÿÿÿ]]\™š”ÎÎÌ¢£ êëêU\[èéèqtrŸ ÚÚØÍÍÅ[[ZÖ×Õ``]ABAéêéíîítxumml­­©áâᥥ¢²²®€~xzvíîì@@@^cb}~|}~z‰Š†ìíêEFDz{yZ`_רÖkpollhRYWŠ`a`ÑÒÐ^^ZìíìvwtØØ×ÙÚØñòðÕÕÎåèææçæÐÐÇßàÞ˜˜’åæättq‘775ÉÉÁz|znrq}€|ö÷õ==;ÐÑÍVWU…ˆƒòòñDDAÆÆÅ887óóòafeãäáâãâ**)ÒÓÏäåãYZXfjhÇÈÃðð¨ÛÜÚâãàÔÔÐÊËÈŽŽimk¬­¬MMMÖ×ÒÊÊÆ–˜“ëëèš›™Š‰ÓÔÒ’”SSQåæåÈÈÆÚÛÙrro¾¾½fgdjji’’’¾À»ÒÒÌUUQ¦§¤chgÂÂÁññ𽽸Y^]ËÌÉrvsinl›œ–HHGv{yœŽ‹ º»¹ÑÒÎIOOÉÊÄñõõõõóCC@553cdaefbùúú,,+ØØÒ«¬«ÐÐÏIJHäåäàáà––•ÕÖÒÈÈÄËËÄÖ×ÐÛÜÖ;;:OQN@@>ÜÝ×—ËÌÅŠŠˆ6:7'('KMJ221352?@?äçæñññÔÕÓCJMÓÔÍ…‰ˆywt'+*//. ··²òñòBFCòóôËÐÐW]\OXXÊËÌ÷ø÷;>==EHÓÓË QQNÇÊÈóòóìëìôóôìíîpppðïîúûù\``AGH*32œœ™òòòÕÚÚ1;;./.ððð¾ÁÀ»¼¸€€€!ùÿ,Z"ÿÿ db,\€ƒ*\Ȱ¡Ã‡#š0ÆD @"6¬À £Ç CŠI²¤É“7Vlx@Dà´2NÊœI³æI5$ü 1Ħϟ@O‚r¡áÎGF?ÊÌqÁ´©S§e`ˆ ús ­b-)Kƒ‰K àÏ)8¤ÒŠ Gí½råÆ) A»™¶Rí8… ø’x˜$ƒo˜V C 1h‘ƒ‹@‹  ÚØ²1ä °Á„ppA+èDOôù€:"``Ž õô-)(be>ÀArA‚üÀ˜nY7 ú¢+(*p€!ä»°&>ÒJÈÒ2Dà0B-1_`z¸Á ‰)L! ȧ}“ÿO{æ3ziA+‘‡‚à,HÁ#1UŒŒàͪ@ ¶Ôà  èTà K°aù:ƒ’„:œÆyЂáÎ, i‚ü ‹Rp‚¦B‚(<°„HA ?X 1p/Ô y IIpƒpaŠŸà": ˆ8” I"¾ $ÐÁ>)HF 'àÃ@…¸Öô‚p3Á`â%$\ 8@€B´p ì! PV>±,8µeÈ@D 1ŠQp ‚ˆG4j1†$tàð*ŠP„Sä‹B ©aɃL¢-½ÂЈXÿ<"oÐA<AÀ^ ¡‚´Ô`¥ÀÀ¾' €n&¦ô¡¼ ˜¡fÈ@!‚€ˆQt ¡PA<Ú À§Mm’`<äô Dl7Ô… xA@C Ž@w޹‚ÀÔðÚÂ’@ ðGP±ˆ#(ô‡Q†>Ìð…d@eØ‚âô '´ƒ eP|  %lÃé%iAdTpg&pÄ. B®&¼ˆ<Œ!Yp€.À©C¬Pƒ ÄÂ|À‚#! eHCBûÁ/’0‡d c*¸+ŒŒUô¡Ä XÀ7NË’cÿ! j`ÜÒgÃÄ#fq4@´áÇ# B€<$Ï z±…-Pê±yD8T@0Ѐ µ8F#œƒ?ÀÄ”P†6P°€SlãR$«v¡ƒ × “xÁ!k´` ’ÐAD€ØÎ: ëB q]À iDã(®X5! Ã;A,‡"¼4@,Q„Ml£Ôù +@’›# "ð…®ËJ†2 !5Á4‘ˆ m¨ÈP@fˆQW³‰ ÷N‚5’`á IúŠGD€{(àá‡8à ‚‰SÑX<"€0"â@Ô!MÛØƒ*!€ ¹Â ar]¼œ{pù¡ó=Ä!œXÄËMŽX  n°Ôa4 ‹8"ˆÔ§Nõª÷ D° =à)¼à2ˆ#¢ ,¸ xø)#Ú׆`~G`1#X€‡´_ŒXûÔîõ&Ђ/ ”»âPìe$õ»žc>Àøš°‚°L8È’pñ%Ü`ã¯ùxŠÞ °•¡üC09üO¸¨OÕ“'°¸HFV°q×Û~/)YIK,BDä÷À¾ð2‘Š$ ;0707010002b200000081a40000000000000000000000014cb7d88500002003000000b500010002ffffffffffffffff0000004500000000root/usr/local/share/doc/libxml2-2.7.7/html/Libxml2-Logo-180x168.gifGIF89a´D÷ÿÿÿÿþþþüüüéê餥¡ 14/ûûûrrl--)½½½bb\”•‘452:;8’“ŽÝÝÝ‹Œ‰KLJšš•÷÷÷‰Š†áááôôôÕÕÔÒÒÑæææÐÐÎ$&#ÉÉÅÅÅÀäääÍÍÉKRRµ¶±óóóùùøijfÙÙÙCDA›œ™ýýýððשּׁ©òòò ¹¹²ÙÙÕ‚€ÁÁ½ÕÕÑ896­­¤ÊÊÈqrp,0+òõñ±°©îîî¾¾¹¶¶­lnjDKL€~äåâ;EFopmúúútur°±­Åż')$deb„…‚ÉÉÁèèæºº¬¡¢ž"¹¹µjliefdÜÜÚææäRRMUXVÍÍÆììëÍÍÌxyv°°¥½½µ|}zIJFààÞab`öøõz|yÂÂÀ}~|©ª¥ïñîuwtÁÁ¸íîì­­¡ZZQÆÆÃy{xghf\]Y}}rXYVÀÀ´wxu¡¡™‚ƒîðî~€}ikh\^\684óõòZZY_`]æéêbcastp@B>Z\ZUUQõöô (*'¦¦šVVTZ]]WZZëëé÷úöæèæóóòëìê–˜”…‡„½½° ÐÐÊzúüøÄĹFHD€€t©©¢ŽŒPTS]]TõõõÈȾ¤¤ž‡ˆ…QRPNPL®¯¬QWUúù÷èìíñññìîëAGI  ]a`¾¿½ÇÈÅnnl¦§¥ÔÔÎ=?<º»¹††|-66v IOP!$äæäµµ©ˆˆ„„y%*(©©ŸÛÛØÍÒÔžŸœÖÙÚìîîãäá  %#¼¼¸ŸŸ•üûø ûüùûûú†[[R££œáæéñóð××Õ··´SWWxxqßãæàâßøû÷ÓÓÓÓÖÔØÜÝÌÌÊóöö³´®³³«ÛßàÌÌÃbeeÄľíðñoroˆ‡ƒÄÄÃýþüxxm0::¦¦¡¤£›öúú€€€!ùÿ,´Dÿÿ Häй(\Ȱ¡Ã‡#JœH±¢Å‹3>Ì¥cÂ!"C Ts@£É“(Sª\‰ò€‘¯h K®/+èÜɳ§ÏŸ@ƒ J´¨Ñ£H“ö\ñ—ª„š®ˆ¤É ¥X³jÝʵ+ÖLˆC!Ž ^Óª]˶íÎ eàøGT€-@X1ß¿€ LØï€+¸]Ìxë– ˆ ƒÏ½HLTÀPÂ…çÏ C‹MºSL n̺õPÒ™`ÏL``á…!‚ N¼¸qã¿ ôp‘z€b×УSà!®¥H*°Ø@$Åœ.àËÿO¾¼ù.êT)Ãá ÕÏ£ËgŒ+€‡Pð€Ä”f»°€ú` 9$¨ ‚ ±L” Ú|‹ pˆÅ§“…}a¨¡R(€_°ìdaoÌ@ñ vÄ#!„"£‰à¡ã#Ѝ¢Ê*«L@Æ')¤€"¼ðò@ ¢ƒ €Œ€nÈ\ryX–ö4€ ¦À sÎí4‹¸À, ‘SV°0ÄÓ &À’ÆŠ»|b+Ó€‚¶|ðÁ;†Ú"‡ ñÌàÆ4½TA;J°Ò. 3*PpI`‚Ì¢æ\ÐC\6æn=¼ÿñF,”Ps†ÙæŒb!¼QÁœ¼2cÅ!xaJ«ZÙ©¦)!”´‹!ùü`‰+Õ`ÓÉ5Üv{Ͷ×L"î$gœ±È"¦"È:û˜{† }ôÐǯ¤0’ƒ$xÃA XîŠj ¡ÇÁ˜Ô.˜«®:­ÀÁ-fip,Ì PøÕ Ko˜°•³ðç‚ â!Ê gØóm50WÓÉÌåÔ\θ“\Sιê r%õTJ9Ýô`tò¼ÂŠˆPÀ_”уÃKUðE 1YD(‚ è%¶Rbƒ©×®gó4@%Y(t‚-ÞH‚DÄ‹@ñ@<¡h5ÿ»ÐNxö°EÐ8Á ö¸‚3¹åš{î"êžÑ‡7Xì È;œáÍ(c 1†RÈË+…ð %2¨b*/¶`!ɰ»Ö}wÙ,VJì-a¦ f™U€nï¨U`¼ &ß{s‡eÇ{jH¯™ï®Ye(ÔÄ@1wɦdq·nprjÈ<òH¤ùÉ+T ‰T€B ”û8Ï=« ¹ u£d†3tc ‡dÀ>ÈÀ pF!&8ÁWØÂ SÈÁ0Òà (`€Y&’BŒ‘‡+(ä P†rZÐ (Ç3=~Ã(@Gc z°€Øp9•€Åÿ€‚*@Á ,p[€åTBx.¨Å7b À@YÉQ„» 0PA €Ã7HBð­`ñö„d0à&ˆÂïêŸ-·6@î ß ƒ èPÌc"eà‡Pâ$7¸!54ÂS¨ÅÞ>è“EˆO!LjB´ è!zP@ P†"XA!/˜]’pµÐ¡¸È€êð‚$”á Cx€Ÿ&`á¶àÅ Úð‚:t€’P/p…OT7Èâ[> ÚˆˆX,!0ÚHÀ 1ÀÔ‘lH—{†96T¶8(°ÿÀ1€ ‚èÉ'¡ÎpG3–qŽtˆƒt¸ä ;ø¤veÈ ;¸!0DH  x#XkÄN 1pAˆ+D."`ƈ€µlâX£À&@jÊqT›Ã5³©ET€w²ŸlB5Ñ;D ‚CD X&Pçßt2vº“ J`úÁÖ¶¶5sµ8Ø%ØÐ‡KŒt`Å`Wò f0ƒTà„1€! t.j!`ræø—E{‚ÑÙ•¤ö‰B2'¼£ÈÀ;6A±8Ânó„$ ‹GàíÔÀO ¸`…ÿ$`”xÂrŠ(„å"€BÀpŠS,U›:yª3‘m€ò  À1–`xmjbUˆšJÀ:2=èØÀVò’w­‚(Ôàr,¢륃-'8Ð s†@:èáG°ÂÌ`ˆ+Ðq¢‘-ÁdyRY…|‚ : „ ò…dçЂB’q ¥@ŨŽ21ˆÑVõ(>À žÐ…ø¢ÙÃ)R `ºµ°'–pܦ*7ˆBŽ¡=7,?È"n€ÀbÁo+À]ï²ã tíÃx·l9uÁW |ÀÂ"¼!ƒ6À=ˆ€qF(Äÿp ‹ƒ×ÁM80d%{ÑŒJ<€A>€Y ¸á˜5Æ¡il¿ap ØD£P LCh±tm@‚xl⦠4.ýÌJÀÈ=~ Tœ 7@àšnXE‚±<È¡‰œ|Ÿ”©ÜÝ:²CG;Ú¼!–Ù hpBèÚ~£¯ð†¬b1à¢2˜sêl…:4ÁÀM0”“ëçc„¡ ¶Ð€7Ô`[7<³Ôø-è¡d£Æ ˆ4Ö@ÌàÐ\ÌŽ4˜#ŠP5¢ðƒè¢¥†«X… ש«þâ4Äc á=@€4Õ'$ÿ㵕%ñ†XÄBVo`9F1L<ƒ ìH,Áó¾A3Cc§@ˆàB˜3íüm=‹»“YÈjBaƒø+½PHòpŠW‚‚3Á&ðãbè2*FèïÈ €/Hpƒ\€°Á!h÷­{¢Š$°E*ðœ§fUã, F>¦ñM`-@H0””WÙ×Pˆ…%ÀsKLŽhC-a‰o| œgDÐQ¬k( ¤  $=ÛKïvÓÃÍçý„Oêœ`ÇBP‰”b/hG<ÂBoÀ-„ŠÁ€ØÝ ~‚q„Q‚1€ÿBÂQ…/,L •¾qˆ€ ª 0a>aÁ>¹ȪÄà HŸõ@1@1¼@rð0Q¦]:¡r¾F `C.Äy|¥föž'/lPRp€5ð"|À —£€tJ·mLnÖ{&b ÞG° ^âêi žÁžÓã;ò¹ÙÑç‰!¹a a©+ûÆÃìI™3㈧8ÆéïñÐÊÀ’  ° €pIrI>°_˜à¸wXG'pxæt.H6csBQ6F1£&b£5Z6Š¡1ÊÐj uHyB¡P6`<@½ðµà(3` * "*—»àfÀ IsÖš8`àùt3¦`=p(P’5¨€^;ဠk`aÐì€ÓP µð“Q¥qé4¤Ð £€|zÜÉ—ÞF`0˜kÿÁ!ÕCœ®Á†‘oŠ’¿! ŒÚ‡õØ]9À{€ sÊvJØè¤Öä§Õ‰xÐv™ rFm{Ù¢MX:P‘â‰{Ñ!ÍC&°°C̱”Ña!ذ;„™ 4&ôÉrBÆ™ ¨s¢ÊÛÈŽå§,Ò À `wY¨ `,zM@´p«€)ž¸¡ê£>퓞”Y ; •P|( ÐÏ ,lÚ¯ò P`r|Q¬%p¬¶â>•·©­ ú¢¤ÖÚ$Ð Ô B®µçªÙz*èf@fÀ®á¹+” ^3ÿ›oÐ0Ì2˜¬0ƒ` «  uÈ]Ù€$À S° ‹ S™^°¸Ï–:[¤ ­—À ̰ ¨ªIJ§@àZÔI»@P—0 '8®D`X^º¢-j-»®¸º&ð´Jò€5 `%¥1_°° 7D«=¦ø=®Q¦`#` Êà.г ‘8ÿ ;šú•*­ @*À { @­k°9¢VêIÛ Уp¢©À¥þ%«Gà†P#€³bú,’  $5,€%+€»µ 4 aEݹ­Á,ð Rÿ']?@E ½¤¥¥Z° V£ë¦LÉ©—p ©¶ú€ ck£0 T—»àAŸÂ_xP [ðW‡e®´Ú² Æ£ã)?ÛÀVd ðd°6õA…¢ º€½ Q íðçà価PPÀ ° \€Y qzèI«Ï: £»—€º`«ºÛp±k—9PÀNÐS,²°zÝ™¨5’‰0Á™Z¦’pÁ Q <P­²•ð ð pì` #üÅ@ !p%ísvü¢+À}Á%ÒÇÈk¾  ØDÿð”Oé ±4 7ïû¦U¦A¸[¿C¬œ¬RÐÕ‘] —À€þ{>  «ó`L€ƒ 9Ю>]Ìq`õ°‡=º†1ðb0j‡Ç\€ds• –y4°`A”Dç©<%б2+•€..+Ëq+á#Kˆü/ °(ð…[¨ÀûõÊÁ[.Ú²½­ÿÐ ËÑ qØL5ž&@‹7¥¤ ɬspÀP¹\•Ë §  `K70“¤­ ° AP¹LàAÐÎ ÊÀÏ Kw |X›pÂ6, ö'ÏÂMÏ~àN€ Åmf}Ö#~‚  Žæ!zNóc0 y-‘± 9¤Þ‚MÁ\Ø(Ø\j°Þ"€ÌQw5ænÑ5BÔ•rp¬€œ žðÞaåQP¹65eáì ‡‰‰<, ’M JÐÀ½<ñ¬S0TPž !.®vž ü ªÀÐÀŒàDp Øm Á~Ý #ÿ@ ámÑjÃãåíãqR°:ж@Xpž€ A ‡ÖÎàÂKXÊjSW npo ¡Å cíÌ ñæ(Ì*p=³ µ°Á= Ïš`à~0@ äáÌ~¢Ì^PÀc€I2 À ’¡5݆®-+Ëè#0-ÞNÞ`ÞÚ?Pr¯n   X® 6Ðp8œ ðj 1 ÀxMZ½wÐ3 i p OÐÎÀ0 4€`Þ’Ð*k³Th ùð 4辺Fº•œm€h j0@Õ@(¿H\Ê⊠ ¶¢}ÿ‰®xëíÞM # # 9ž©;nîè.2ñC“ÞîïŽå`,Â(óÅ0 \0m_pJdÈO äï" êwÃ1¾.ñˆ"DëúÀiz ÓñÁ]ºž rï9$¯ÈÎ@2@Dàv¯ý¥Û–×2ÿ± ‘à×8/ ŠÏóäNØ@ÏѬÂ&»lôðþÅíp1ÀîåÍ7  @À'hh  ÛEäKðaðîbÇ,öìÐ^à• LˆÀiÓ 3À[ëöb=±pI6-÷t ò~€uðhÐÇ_gtp„ðm0ðæ¢[à#‰ÿ`øˆŸóŠ/ ŒÏèŽoØ`šEðî^ù%Ìê  ëqpùÃÌsP rP¦‹ <Pð * P„® vˆÑ ‰ ^TøòÂÌ©¶:¨ ðÌ‹ $T®T¹0ÀÊ%8È‘!È<‡’$i£  Õh³j&^)ô8xÐHU„ŽðÂñ)C ^„"áÙÒjÄa† ‰–cÊsJ `©r@.µñ¸Á«’eö,T`ãá¡…¥Ú©S&Åå=v_°ð ä’o=* ”ˆPaÁ†-˜XQ"FI‹Xð:´é1’ÐPFR…¶+]Â”é æÿ‰ GŽÌéŒ;$H@à/2dðH!ÄÍDW©Aôͼ&[¶úvˆ,²fѪeÛömÜ…sE„d'€·—ú¥¸ `Xœ, ¦¯Ê†2`‡ þÂP'„² È Ëør¢Ê(ÚìŒèa 2táâMÞ±ÏBÀ ¶–‚ ƒ™rå +¬"7Ýæ B‡QôøÄy OjbŒ+t”)R'ˆU®ÚpHáÎ;Y¢,무֊mÐ+H 6¹€†àB ”£¾ÀºTfµ‚â€# Úxd8\Rd8(bÁB#!3!,(”ÿ”Ù,6xÿf — †"pDfs (Ù…BN¨ã„?þpñEpH‚—U>9„VyÀŽ1ìhÄŠOR˜UT©Ž#¶ëN¬(0b*†Y@òbÃÆ T\Š£˜b°Ï“'p0ž H5 †‚vla”„wN™À¥=nÀ"‚Caà¢LÌÚdB„<†MDÓÑ…l˜A™II´€L! ˆv™ Ž&®¸¢ŽOÿb‚)xF•O¬pb˜OÌ`â!V&8ă-æÐÁ©'•EX| ÉŒ¼áƒÚÀØÄ,™S´-(“%ŒY”0fØÄŒ…tâ xƒ1ƆÚiÿ$€w>x—˜aoèý^†ÂˆgÞ…pW—« º†w>á×¥dfÀ¢J^¡/ÍA&š0ÄÀ¾âGP•`‹1Æä„6y~VIÂ:æù¤^H–°\Öd¨àzP À”œYÚ[‡¹]‚¡Ž} åY‚x±#L2ô±™r`š2ht‚6Ú¶½z”_è“xŠçÏè= …ؽ]CŽ2LÉÛD•vf¡ ¦wi„äÁwÿ=ü˜çŠ Æî$À¸‚x ©#Zh”^&,dX#sP "à… ¬À<XÃâ8$Ã$ø ,@ÿ|c üp l`'à GhÁ`&Ôì¨B~plàUàÇ fЀ Ú€œ°@ Ð1ð DPÂP„A¤P5ÈCb;öÀ ~ 0àA2qFGèC¢øÆ8‘@‚Lê1‹øÀÊ„‘;2ƒ$!9ˆApMRD®À"–ïDé€FøÅvaºÔb!` `ž H"C-j‘†¨ã ¶¨GDbŽUÎ $@24ÐäR¹¼Á¼Q†gDÀP°Ìà”è€9:ð4¤A€2ÓPÿ˜P¤ù ói8å 6àL[¤áÓ`ç4z±€zlà°(Ol\ ˜T ehÌƈ9T %(A…pP„"´ Œ`hCga*ä ·è…º€|Òu&p.`L¬+@AI#ðŒ\€¤(8)À<£ e)ÊÀI°€’àÀ.àR(„  %U†M/@S,¬ë§jR˦~T©!HiŒiÔ”–¤%-©M9 H06°(H˜P°:b€X`Æ 0*ÄU®s¥k]í×]äU¯»<0†^ØÂf+K0˜Â°`ìbaÁ‚ô€ÿ°(A ËXÊšÂP,,zð¸ &@‚ *`Y`@³–e¬N'ÛÚÆb¬mle/ \öµ.¨,jsûÛl…m ð…°ðÂ: nu­{]ìfW»:˜&Hu AÈ(¥p^¢uë]/zÑË^ø@¾XAzÝëÞò `ô­ï}ýËÞûØ¿”"p[pœk†E,,Pot€•ä4e…-|a gÃ3p¥:4ô H nM|b§XÅ+f±J€ !ÒàƒMP‚7ô”¤Þð†|üc YÈC²7BzSIÀbÄ%ànq“üd(˜ÒÀˆŠlAgØH Xà@¦c&s™Í|æ3C’è La‚¤7Ês¦sS¼…€‚ÿÀAApG´rÙ´¦m¡ }hD'ZѪ-è+g;GZÒu®@Ÿ€ƒdúÅ` bsÞõÎWÔ£&u©M-êþNZÕ«Žò ˜PAdZÖWÐDr¡ \|ɬæu¯}â|ªÈE4qY'[ è^³ýlhG[ÚÓ¦vµ­½¨!ÙÛ&Â!& ƒb_[Üã&w¹ÍMí\p÷{Nv@;0707010002b256000081a40000000000000000000000014cb7d885000001c5000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/doc/libxml2-2.7.7/html/tree2.res content of node 1 this node has attributes other way to create content (which is also a node) 0707010002b205000041ed0000000000000000000000024cb7d88c00000000000000b500010002ffffffffffffffff0000003100000000root/usr/local/share/doc/libxml2-2.7.7/html/html0707010002b213000081a40000000000000000000000014cb7d88500003d81000000b500010002ffffffffffffffff0000004200000000root/usr/local/share/doc/libxml2-2.7.7/html/html/libxml-dict.html Module dict from libxml2
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    Module dict from libxml2

    API Menu
    API Indexes
    Related links

    dictionary of reusable strings, just used to avoid allocation and freeing operations.

    Table of Contents

    Structure xmlDict
    struct _xmlDict The content of this structure is not made public by the API.
    Typedef xmlDict * xmlDictPtr
    
    void	xmlDictCleanup			(void)
    xmlDictPtr	xmlDictCreate		(void)
    xmlDictPtr	xmlDictCreateSub	(xmlDictPtr sub)
    const xmlChar *	xmlDictExists		(xmlDictPtr dict, 
    const xmlChar * name,
    int len)
    void	xmlDictFree			(xmlDictPtr dict)
    const xmlChar *	xmlDictLookup		(xmlDictPtr dict, 
    const xmlChar * name,
    int len)
    int	xmlDictOwns			(xmlDictPtr dict, 
    const xmlChar * str)
    const xmlChar *	xmlDictQLookup		(xmlDictPtr dict, 
    const xmlChar * prefix,
    const xmlChar * name)
    int	xmlDictReference		(xmlDictPtr dict)
    int	xmlDictSize			(xmlDictPtr dict)

    Description

    Structure xmlDict

    Structure xmlDict
    struct _xmlDict { The content of this structure is not made public by the API. }

    Function: xmlDictCleanup

    void	xmlDictCleanup			(void)

    Free the dictionary mutex.

    Function: xmlDictCreate

    xmlDictPtr	xmlDictCreate		(void)

    Create a new dictionary

    Returns:the newly created dictionnary, or NULL if an error occured.

    Function: xmlDictCreateSub

    xmlDictPtr	xmlDictCreateSub	(xmlDictPtr sub)

    Create a new dictionary, inheriting strings from the read-only dictionnary @sub. On lookup, strings are first searched in the new dictionnary, then in @sub, and if not found are created in the new dictionnary.

    sub:an existing dictionnary
    Returns:the newly created dictionnary, or NULL if an error occured.

    Function: xmlDictExists

    const xmlChar *	xmlDictExists		(xmlDictPtr dict, 
    const xmlChar * name,
    int len)

    Check if the @name exists in the dictionnary @dict.

    dict:the dictionnary
    name:the name of the userdata
    len:the length of the name, if -1 it is recomputed
    Returns:the internal copy of the name or NULL if not found.

    Function: xmlDictFree

    void	xmlDictFree			(xmlDictPtr dict)

    Free the hash @dict and its contents. The userdata is deallocated with @f if provided.

    dict:the dictionnary

    Function: xmlDictLookup

    const xmlChar *	xmlDictLookup		(xmlDictPtr dict, 
    const xmlChar * name,
    int len)

    Add the @name to the dictionnary @dict if not present.

    dict:the dictionnary
    name:the name of the userdata
    len:the length of the name, if -1 it is recomputed
    Returns:the internal copy of the name or NULL in case of internal error

    Function: xmlDictOwns

    int	xmlDictOwns			(xmlDictPtr dict, 
    const xmlChar * str)

    check if a string is owned by the disctionary

    dict:the dictionnary
    str:the string
    Returns:1 if true, 0 if false and -1 in case of error -1 in case of error

    Function: xmlDictQLookup

    const xmlChar *	xmlDictQLookup		(xmlDictPtr dict, 
    const xmlChar * prefix,
    const xmlChar * name)

    Add the QName @prefix:@name to the hash @dict if not present.

    dict:the dictionnary
    prefix:the prefix
    name:the name
    Returns:the internal copy of the QName or NULL in case of internal error

    Function: xmlDictReference

    int	xmlDictReference		(xmlDictPtr dict)

    Increment the reference counter of a dictionary

    dict:the dictionnary
    Returns:0 in case of success and -1 in case of error

    Function: xmlDictSize

    int	xmlDictSize			(xmlDictPtr dict)

    Query the number of elements installed in the hash @dict.

    dict:the dictionnary
    Returns:the number of elements in the dictionnary or -1 in case of error

    Daniel Veillard

    0707010002b22f000081a40000000000000000000000014cb7d8850000b2ed000000b500010002ffffffffffffffff0000004700000000root/usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlregexp.html Module xmlregexp from libxml2
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    Module xmlregexp from libxml2

    API Menu
    API Indexes
    Related links

    basic API for libxml regular expressions handling used for XML Schemas and validation.

    Table of Contents

    Structure xmlExpCtxt
    struct _xmlExpCtxt The content of this structure is not made public by the API.
    Typedef xmlExpCtxt * xmlExpCtxtPtr
    
    Structure xmlExpNode
    struct _xmlExpNode The content of this structure is not made public by the API.
    Typedef xmlExpNode * xmlExpNodePtr
    
    Enum xmlExpNodeType
    
    Structure xmlRegExecCtxt
    struct _xmlRegExecCtxt The content of this structure is not made public by the API.
    Typedef xmlRegExecCtxt * xmlRegExecCtxtPtr
    
    Structure xmlRegexp
    struct _xmlRegexp The content of this structure is not made public by the API.
    Typedef xmlRegexp * xmlRegexpPtr
    
    int	xmlExpCtxtNbCons		(xmlExpCtxtPtr ctxt)
    int	xmlExpCtxtNbNodes		(xmlExpCtxtPtr ctxt)
    void	xmlExpDump			(xmlBufferPtr buf, 
    xmlExpNodePtr expr)
    xmlExpNodePtr	xmlExpExpDerive		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    xmlExpNodePtr sub)
    void	xmlExpFree			(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp)
    void	xmlExpFreeCtxt			(xmlExpCtxtPtr ctxt)
    int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    const xmlChar ** langList,
    int len)
    int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    const xmlChar ** tokList,
    int len)
    int	xmlExpIsNillable		(xmlExpNodePtr exp)
    int	xmlExpMaxToken			(xmlExpNodePtr expr)
    xmlExpNodePtr	xmlExpNewAtom		(xmlExpCtxtPtr ctxt, 
    const xmlChar * name,
    int len)
    xmlExpCtxtPtr	xmlExpNewCtxt		(int maxNodes, 
    xmlDictPtr dict)
    xmlExpNodePtr	xmlExpNewOr		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr left,
    xmlExpNodePtr right)
    xmlExpNodePtr	xmlExpNewRange		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr subset,
    int min,
    int max)
    xmlExpNodePtr	xmlExpNewSeq		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr left,
    xmlExpNodePtr right)
    xmlExpNodePtr	xmlExpParse		(xmlExpCtxtPtr ctxt, 
    const char * expr)
    void	xmlExpRef			(xmlExpNodePtr exp)
    xmlExpNodePtr	xmlExpStringDerive	(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    const xmlChar * str,
    int len)
    int	xmlExpSubsume			(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    xmlExpNodePtr sub)
    Function type: xmlRegExecCallbacks
    void	xmlRegExecCallbacks		(xmlRegExecCtxtPtr exec, 
    const xmlChar * token,
    void * transdata,
    void * inputdata)
    int	xmlRegExecErrInfo		(xmlRegExecCtxtPtr exec, 
    const xmlChar ** string,
    int * nbval,
    int * nbneg,
    xmlChar ** values,
    int * terminal)
    int	xmlRegExecNextValues		(xmlRegExecCtxtPtr exec, 
    int * nbval,
    int * nbneg,
    xmlChar ** values,
    int * terminal)
    int	xmlRegExecPushString		(xmlRegExecCtxtPtr exec, 
    const xmlChar * value,
    void * data)
    int	xmlRegExecPushString2		(xmlRegExecCtxtPtr exec, 
    const xmlChar * value,
    const xmlChar * value2,
    void * data)
    void	xmlRegFreeExecCtxt		(xmlRegExecCtxtPtr exec)
    void	xmlRegFreeRegexp		(xmlRegexpPtr regexp)
    xmlRegExecCtxtPtr	xmlRegNewExecCtxt	(xmlRegexpPtr comp, 
    xmlRegExecCallbacks callback,
    void * data)
    xmlRegexpPtr	xmlRegexpCompile	(const xmlChar * regexp)
    int	xmlRegexpExec			(xmlRegexpPtr comp, 
    const xmlChar * content)
    int	xmlRegexpIsDeterminist		(xmlRegexpPtr comp)
    void	xmlRegexpPrint			(FILE * output, 
    xmlRegexpPtr regexp)

    Description

    Structure xmlExpCtxt

    Structure xmlExpCtxt
    struct _xmlExpCtxt { The content of this structure is not made public by the API. }

    Structure xmlExpNode

    Structure xmlExpNode
    struct _xmlExpNode { The content of this structure is not made public by the API. }

    Enum xmlExpNodeType

    Enum xmlExpNodeType {
        XML_EXP_EMPTY = 0
        XML_EXP_FORBID = 1
        XML_EXP_ATOM = 2
        XML_EXP_SEQ = 3
        XML_EXP_OR = 4
        XML_EXP_COUNT = 5
    }
    

    Structure xmlRegExecCtxt

    Structure xmlRegExecCtxt
    struct _xmlRegExecCtxt { The content of this structure is not made public by the API. }
    A libxml progressive regular expression evaluation context

    Structure xmlRegexp

    Structure xmlRegexp
    struct _xmlRegexp { The content of this structure is not made public by the API. }
    A libxml regular expression, they can actually be far more complex thank the POSIX regex expressions.

    Function: xmlExpCtxtNbCons

    int	xmlExpCtxtNbCons		(xmlExpCtxtPtr ctxt)

    Debugging facility provides the number of allocated nodes over lifetime

    ctxt:an expression context
    Returns:the number of nodes ever allocated or -1 in case of error

    Function: xmlExpCtxtNbNodes

    int	xmlExpCtxtNbNodes		(xmlExpCtxtPtr ctxt)

    Debugging facility provides the number of allocated nodes at a that point

    ctxt:an expression context
    Returns:the number of nodes in use or -1 in case of error

    Function: xmlExpDump

    void	xmlExpDump			(xmlBufferPtr buf, 
    xmlExpNodePtr expr)

    Serialize the expression as compiled to the buffer

    buf:a buffer to receive the output
    expr:the compiled expression

    Function: xmlExpExpDerive

    xmlExpNodePtr	xmlExpExpDerive		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    xmlExpNodePtr sub)

    Evaluates the expression resulting from @exp consuming a sub expression @sub Based on algebraic derivation and sometimes direct Brzozowski derivation it usually tatkes less than linear time and can handle expressions generating infinite languages.

    ctxt:the expressions context
    exp:the englobing expression
    sub:the subexpression
    Returns:the resulting expression or NULL in case of internal error, the result must be freed

    Function: xmlExpFree

    void	xmlExpFree			(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp)

    Dereference the expression

    ctxt:the expression context
    exp:the expression

    Function: xmlExpFreeCtxt

    void	xmlExpFreeCtxt			(xmlExpCtxtPtr ctxt)

    Free an expression context

    ctxt:an expression context

    Function: xmlExpGetLanguage

    int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    const xmlChar ** langList,
    int len)

    Find all the strings used in @exp and store them in @list

    ctxt:the expression context
    exp:the expression
    langList:where to store the tokens
    len:the allocated lenght of @list
    Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

    Function: xmlExpGetStart

    int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    const xmlChar ** tokList,
    int len)

    Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]

    ctxt:the expression context
    exp:the expression
    tokList:where to store the tokens
    len:the allocated lenght of @list
    Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

    Function: xmlExpIsNillable

    int	xmlExpIsNillable		(xmlExpNodePtr exp)

    Finds if the expression is nillable, i.e. if it accepts the empty sequqnce

    exp:the expression
    Returns:1 if nillable, 0 if not and -1 in case of error

    Function: xmlExpMaxToken

    int	xmlExpMaxToken			(xmlExpNodePtr expr)

    Indicate the maximum number of input a expression can accept

    expr:a compiled expression
    Returns:the maximum length or -1 in case of error

    Function: xmlExpNewAtom

    xmlExpNodePtr	xmlExpNewAtom		(xmlExpCtxtPtr ctxt, 
    const xmlChar * name,
    int len)

    Get the atom associated to this name from that context

    ctxt:the expression context
    name:the atom name
    len:the atom name lenght in byte (or -1);
    Returns:the node or NULL in case of error

    Function: xmlExpNewCtxt

    xmlExpCtxtPtr	xmlExpNewCtxt		(int maxNodes, 
    xmlDictPtr dict)

    Creates a new context for manipulating expressions

    maxNodes:the maximum number of nodes
    dict:optional dictionnary to use internally
    Returns:the context or NULL in case of error

    Function: xmlExpNewOr

    xmlExpNodePtr	xmlExpNewOr		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr left,
    xmlExpNodePtr right)

    Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).

    ctxt:the expression context
    left:left expression
    right:right expression
    Returns:the node or NULL in case of error

    Function: xmlExpNewRange

    xmlExpNodePtr	xmlExpNewRange		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr subset,
    int min,
    int max)

    Get the atom associated to the range (@subset){@min, @max} Note that @subset is consumed in the operation, to keep an handle on it use xmlExpRef() and use xmlExpFree() to release it, this is true even in case of failure (unless ctxt == NULL).

    ctxt:the expression context
    subset:the expression to be repeated
    min:the lower bound for the repetition
    max:the upper bound for the repetition, -1 means infinite
    Returns:the node or NULL in case of error

    Function: xmlExpNewSeq

    xmlExpNodePtr	xmlExpNewSeq		(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr left,
    xmlExpNodePtr right)

    Get the atom associated to the sequence @left , @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).

    ctxt:the expression context
    left:left expression
    right:right expression
    Returns:the node or NULL in case of error

    Function: xmlExpParse

    xmlExpNodePtr	xmlExpParse		(xmlExpCtxtPtr ctxt, 
    const char * expr)

    Minimal parser for regexps, it understand the following constructs - string terminals - choice operator | - sequence operator , - subexpressions (...) - usual cardinality operators + * and ? - finite sequences { min, max } - infinite sequences { min, * } There is minimal checkings made especially no checking on strings values

    ctxt:the expressions context
    expr:the 0 terminated string
    Returns:a new expression or NULL in case of failure

    Function: xmlExpRef

    void	xmlExpRef			(xmlExpNodePtr exp)

    Increase the reference count of the expression

    exp:the expression

    Function: xmlExpStringDerive

    xmlExpNodePtr	xmlExpStringDerive	(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    const xmlChar * str,
    int len)

    Do one step of Brzozowski derivation of the expression @exp with respect to the input string

    ctxt:the expression context
    exp:the expression
    str:the string
    len:the string len in bytes if available
    Returns:the resulting expression or NULL in case of internal error

    Function: xmlExpSubsume

    int	xmlExpSubsume			(xmlExpCtxtPtr ctxt, 
    xmlExpNodePtr exp,
    xmlExpNodePtr sub)

    Check whether @exp accepts all the languages accexpted by @sub the input being a subexpression.

    ctxt:the expressions context
    exp:the englobing expression
    sub:the subexpression
    Returns:1 if true 0 if false and -1 in case of failure.

    Function type: xmlRegExecCallbacks

    Function type: xmlRegExecCallbacks
    void	xmlRegExecCallbacks		(xmlRegExecCtxtPtr exec, 
    const xmlChar * token,
    void * transdata,
    void * inputdata)

    Callback function when doing a transition in the automata

    exec:the regular expression context
    token:the current token string
    transdata:transition data
    inputdata:input data

    Function: xmlRegExecErrInfo

    int	xmlRegExecErrInfo		(xmlRegExecCtxtPtr exec, 
    const xmlChar ** string,
    int * nbval,
    int * nbneg,
    xmlChar ** values,
    int * terminal)

    Extract error informations from the regexp execution, the parameter @string will be updated with the value pushed and not accepted, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values

    exec:a regexp execution context generating an error
    string:return value for the error string
    nbval:pointer to the number of accepted values IN/OUT
    nbneg:return number of negative transitions
    values:pointer to the array of acceptable values
    terminal:return value if this was a terminal state
    Returns:will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.

    Function: xmlRegExecNextValues

    int	xmlRegExecNextValues		(xmlRegExecCtxtPtr exec, 
    int * nbval,
    int * nbneg,
    xmlChar ** values,
    int * terminal)

    Extract informations from the regexp execution, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values

    exec:a regexp execution context
    nbval:pointer to the number of accepted values IN/OUT
    nbneg:return number of negative transitions
    values:pointer to the array of acceptable values
    terminal:return value if this was a terminal state
    Returns:will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.

    Function: xmlRegExecPushString

    int	xmlRegExecPushString		(xmlRegExecCtxtPtr exec, 
    const xmlChar * value,
    void * data)

    Push one input token in the execution context

    exec:a regexp execution context or NULL to indicate the end
    value:a string token input
    data:data associated to the token to reuse in callbacks
    Returns:1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.

    Function: xmlRegExecPushString2

    int	xmlRegExecPushString2		(xmlRegExecCtxtPtr exec, 
    const xmlChar * value,
    const xmlChar * value2,
    void * data)

    Push one input token in the execution context

    exec:a regexp execution context or NULL to indicate the end
    value:the first string token input
    value2:the second string token input
    data:data associated to the token to reuse in callbacks
    Returns:1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.

    Function: xmlRegFreeExecCtxt

    void	xmlRegFreeExecCtxt		(xmlRegExecCtxtPtr exec)

    Free the structures associated to a regular expression evaulation context.

    exec:a regular expression evaulation context

    Function: xmlRegFreeRegexp

    void	xmlRegFreeRegexp		(xmlRegexpPtr regexp)

    Free a regexp

    regexp:the regexp

    Function: xmlRegNewExecCtxt

    xmlRegExecCtxtPtr	xmlRegNewExecCtxt	(xmlRegexpPtr comp, 
    xmlRegExecCallbacks callback,
    void * data)

    Build a context used for progressive evaluation of a regexp.

    comp:a precompiled regular expression
    callback:a callback function used for handling progresses in the automata matching phase
    data:the context data associated to the callback in this context
    Returns:the new context

    Function: xmlRegexpCompile

    xmlRegexpPtr	xmlRegexpCompile	(const xmlChar * regexp)

    Parses a regular expression conforming to XML Schemas Part 2 Datatype Appendix F and builds an automata suitable for testing strings against that regular expression

    regexp:a regular expression string
    Returns:the compiled expression or NULL in case of error

    Function: xmlRegexpExec

    int	xmlRegexpExec			(xmlRegexpPtr comp, 
    const xmlChar * content)

    Check if the regular expression generates the value

    comp:the compiled regular expression
    content:the value to check against the regular expression
    Returns:1 if it matches, 0 if not and a negative value in case of error

    Function: xmlRegexpIsDeterminist

    int	xmlRegexpIsDeterminist		(xmlRegexpPtr comp)

    Check if the regular expression is determinist

    comp:the compiled regular expression
    Returns:1 if it yes, 0 if not and a negative value in case of error

    Function: xmlRegexpPrint

    void	xmlRegexpPrint			(FILE * output, 
    xmlRegexpPtr regexp)

    Print the content of the compiled regular expression

    output:the file for the output debug
    regexp:the compiled regexp

    Daniel Veillard

    0707010002b226000081a40000000000000000000000014cb7d88500004d0d000000b500010002ffffffffffffffff0000004600000000root/usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xinclude.html Module xinclude from libxml2
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    Module xinclude from libxml2

    API Menu
    API Indexes
    Related links

    API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003

    Table of Contents

    #define XINCLUDE_FALLBACK
    #define XINCLUDE_HREF
    #define XINCLUDE_NODE
    #define XINCLUDE_NS
    #define XINCLUDE_OLD_NS
    #define XINCLUDE_PARSE
    #define XINCLUDE_PARSE_ENCODING
    #define XINCLUDE_PARSE_TEXT
    #define XINCLUDE_PARSE_XML
    #define XINCLUDE_PARSE_XPOINTER
    Structure xmlXIncludeCtxt
    struct _xmlXIncludeCtxt The content of this structure is not made public by the API.
    Typedef xmlXIncludeCtxt * xmlXIncludeCtxtPtr
    
    void	xmlXIncludeFreeContext		(xmlXIncludeCtxtPtr ctxt)
    xmlXIncludeCtxtPtr	xmlXIncludeNewContext	(xmlDocPtr doc)
    int	xmlXIncludeProcess		(xmlDocPtr doc)
    int	xmlXIncludeProcessFlags		(xmlDocPtr doc, 
    int flags)
    int	xmlXIncludeProcessFlagsData	(xmlDocPtr doc, 
    int flags,
    void * data)
    int	xmlXIncludeProcessNode		(xmlXIncludeCtxtPtr ctxt, 
    xmlNodePtr node)
    int	xmlXIncludeProcessTree		(xmlNodePtr tree)
    int	xmlXIncludeProcessTreeFlags	(xmlNodePtr tree, 
    int flags)
    int	xmlXIncludeProcessTreeFlagsData	(xmlNodePtr tree, 
    int flags,
    void * data)
    int	xmlXIncludeSetFlags		(xmlXIncludeCtxtPtr ctxt, 
    int flags)

    Description

    Macro: XINCLUDE_FALLBACK

    #define XINCLUDE_FALLBACK

    Macro defining "fallback"

    Macro: XINCLUDE_HREF

    #define XINCLUDE_HREF

    Macro defining "href"

    Macro: XINCLUDE_NODE

    #define XINCLUDE_NODE

    Macro defining "include"

    Macro: XINCLUDE_NS

    #define XINCLUDE_NS

    Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude

    Macro: XINCLUDE_OLD_NS

    #define XINCLUDE_OLD_NS

    Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude

    Macro: XINCLUDE_PARSE

    #define XINCLUDE_PARSE

    Macro defining "parse"

    Macro: XINCLUDE_PARSE_ENCODING

    #define XINCLUDE_PARSE_ENCODING

    Macro defining "encoding"

    Macro: XINCLUDE_PARSE_TEXT

    #define XINCLUDE_PARSE_TEXT

    Macro defining "text"

    Macro: XINCLUDE_PARSE_XML

    #define XINCLUDE_PARSE_XML

    Macro defining "xml"

    Macro: XINCLUDE_PARSE_XPOINTER

    #define XINCLUDE_PARSE_XPOINTER

    Macro defining "xpointer"

    Structure xmlXIncludeCtxt

    Structure xmlXIncludeCtxt
    struct _xmlXIncludeCtxt { The content of this structure is not made public by the API. }

    Function: xmlXIncludeFreeContext

    void	xmlXIncludeFreeContext		(xmlXIncludeCtxtPtr ctxt)

    Free an XInclude context

    ctxt:the XInclude context

    Function: xmlXIncludeNewContext

    xmlXIncludeCtxtPtr	xmlXIncludeNewContext	(xmlDocPtr doc)

    Creates a new XInclude context

    doc:an XML Document
    Returns:the new set

    Function: xmlXIncludeProcess

    int	xmlXIncludeProcess		(xmlDocPtr doc)

    Implement the XInclude substitution on the XML document @doc

    doc:an XML document
    Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

    Function: xmlXIncludeProcessFlags

    int	xmlXIncludeProcessFlags		(xmlDocPtr doc, 
    int flags)

    Implement the XInclude substitution on the XML document @doc

    doc:an XML document
    flags:a set of xmlParserOption used for parsing XML includes
    Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

    Function: xmlXIncludeProcessFlagsData

    int	xmlXIncludeProcessFlagsData	(xmlDocPtr doc, 
    int flags,
    void * data)

    Implement the XInclude substitution on the XML document @doc

    doc:an XML document
    flags:a set of xmlParserOption used for parsing XML includes
    data:application data that will be passed to the parser context in the _private field of the parser context(s)
    Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

    Function: xmlXIncludeProcessNode

    int	xmlXIncludeProcessNode		(xmlXIncludeCtxtPtr ctxt, 
    xmlNodePtr node)

    Implement the XInclude substitution for the given subtree reusing the informations and data coming from the given context.

    ctxt:an existing XInclude context
    node:a node in an XML document
    Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

    Function: xmlXIncludeProcessTree

    int	xmlXIncludeProcessTree		(xmlNodePtr tree)

    Implement the XInclude substitution for the given subtree

    tree:a node in an XML document
    Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

    Function: xmlXIncludeProcessTreeFlags

    int	xmlXIncludeProcessTreeFlags	(xmlNodePtr tree, 
    int flags)

    Implement the XInclude substitution for the given subtree

    tree:a node in an XML document
    flags:a set of xmlParserOption used for parsing XML includes
    Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

    Function: xmlXIncludeProcessTreeFlagsData

    int	xmlXIncludeProcessTreeFlagsData	(xmlNodePtr tree, 
    int flags,
    void * data)

    Implement the XInclude substitution on the XML node @tree

    tree:an XML node
    flags:a set of xmlParserOption used for parsing XML includes
    data:application data that will be passed to the parser context in the _private field of the parser context(s)
    Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

    Function: xmlXIncludeSetFlags

    int	xmlXIncludeSetFlags		(xmlXIncludeCtxtPtr ctxt, 
    int flags)

    Set the flags used for further processing of XML resources.

    ctxt:an XInclude processing context
    flags:a set of xmlParserOption used for parsing XML includes
    Returns:0 in case of success and -1 in case of error.

    Daniel Veillard

    0707010002b231000081a40000000000000000000000014cb7d8850000ac93000000b500010002ffffffffffffffff0000004800000000root/usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlschemas.html Module xmlschemas from libxml2
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    Module xmlschemas from libxml2

    API Menu
    API Indexes
    Related links

    interface to the XML Schemas handling and schema validity checking, it is incomplete right now.

    Table of Contents

    Structure xmlSchema
    struct _xmlSchema
    Structure xmlSchemaParserCtxt
    struct _xmlSchemaParserCtxt The content of this structure is not made public by the API.
    Typedef xmlSchemaParserCtxt * xmlSchemaParserCtxtPtr
    
    Typedef xmlSchema * xmlSchemaPtr
    
    Typedef xmlSchemaSAXPlugStruct * xmlSchemaSAXPlugPtr
    
    Structure xmlSchemaSAXPlugStruct
    struct _xmlSchemaSAXPlug The content of this structure is not made public by the API.
    Structure xmlSchemaValidCtxt
    struct _xmlSchemaValidCtxt The content of this structure is not made public by the API.
    Typedef xmlSchemaValidCtxt * xmlSchemaValidCtxtPtr
    
    Enum xmlSchemaValidError
    
    Enum xmlSchemaValidOption
    
    void	xmlSchemaDump			(FILE * output, 
    xmlSchemaPtr schema)
    void	xmlSchemaFree			(xmlSchemaPtr schema)
    void	xmlSchemaFreeParserCtxt		(xmlSchemaParserCtxtPtr ctxt)
    void	xmlSchemaFreeValidCtxt		(xmlSchemaValidCtxtPtr ctxt)
    int	xmlSchemaGetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
    xmlSchemaValidityErrorFunc * err,
    xmlSchemaValidityWarningFunc * warn,
    void ** ctx)
    int	xmlSchemaGetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
    xmlSchemaValidityErrorFunc * err,
    xmlSchemaValidityWarningFunc * warn,
    void ** ctx)
    int	xmlSchemaIsValid		(xmlSchemaValidCtxtPtr ctxt)
    xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(xmlDocPtr doc)
    xmlSchemaParserCtxtPtr	xmlSchemaNewMemParserCtxt	(const char * buffer, 
    int size)
    xmlSchemaParserCtxtPtr	xmlSchemaNewParserCtxt	(const char * URL)
    xmlSchemaValidCtxtPtr	xmlSchemaNewValidCtxt	(xmlSchemaPtr schema)
    xmlSchemaPtr	xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt)
    xmlSchemaSAXPlugPtr	xmlSchemaSAXPlug	(xmlSchemaValidCtxtPtr ctxt, 
    xmlSAXHandlerPtr * sax,
    void ** user_data)
    int	xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug)
    void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
    xmlSchemaValidityErrorFunc err,
    xmlSchemaValidityWarningFunc warn,
    void * ctx)
    void	xmlSchemaSetParserStructuredErrors	(xmlSchemaParserCtxtPtr ctxt, 
    xmlStructuredErrorFunc serror,
    void * ctx)
    void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
    xmlSchemaValidityErrorFunc err,
    xmlSchemaValidityWarningFunc warn,
    void * ctx)
    int	xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt, 
    int options)
    void	xmlSchemaSetValidStructuredErrors	(xmlSchemaValidCtxtPtr ctxt, 
    xmlStructuredErrorFunc serror,
    void * ctx)
    int	xmlSchemaValidCtxtGetOptions	(xmlSchemaValidCtxtPtr ctxt)
    xmlParserCtxtPtr	xmlSchemaValidCtxtGetParserCtxt	(xmlSchemaValidCtxtPtr ctxt)
    int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
    xmlDocPtr doc)
    int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
    const char * filename,
    int options)
    int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
    xmlNodePtr elem)
    int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
    xmlParserInputBufferPtr input,
    xmlCharEncoding enc,
    xmlSAXHandlerPtr sax,
    void * user_data)
    Function type: xmlSchemaValidityErrorFunc
    void	xmlSchemaValidityErrorFunc	(void * ctx, 
    const char * msg,
    ... ...)
    Function type: xmlSchemaValidityWarningFunc
    void	xmlSchemaValidityWarningFunc	(void * ctx, 
    const char * msg,
    ... ...)

    Description

    Structure xmlSchema

    Structure xmlSchema
    struct _xmlSchema { const xmlChar * name : schema name const xmlChar * targetNamespace : the target namespace const xmlChar * version const xmlChar * id : Obsolete xmlDocPtr doc xmlSchemaAnnotPtr annot int flags xmlHashTablePtr typeDecl xmlHashTablePtr attrDecl xmlHashTablePtr attrgrpDecl xmlHashTablePtr elemDecl xmlHashTablePtr notaDecl xmlHashTablePtr schemasImports void * _private : unused by the library for users or bind xmlHashTablePtr groupDecl xmlDictPtr dict void * includes : the includes, this is opaque for now int preserve : whether to free the document int counter : used to give ononymous components uniqu xmlHashTablePtr idcDef : All identity-constraint defs. void * volatiles : Obsolete }

    Structure xmlSchemaParserCtxt

    Structure xmlSchemaParserCtxt
    struct _xmlSchemaParserCtxt { The content of this structure is not made public by the API. }

    Structure xmlSchemaSAXPlugStruct

    Structure xmlSchemaSAXPlugStruct
    struct _xmlSchemaSAXPlug { The content of this structure is not made public by the API. }

    Structure xmlSchemaValidCtxt

    Structure xmlSchemaValidCtxt
    struct _xmlSchemaValidCtxt { The content of this structure is not made public by the API. }

    Enum xmlSchemaValidError

    Enum xmlSchemaValidError {
        XML_SCHEMAS_ERR_OK = 0
        XML_SCHEMAS_ERR_NOROOT = 1
        XML_SCHEMAS_ERR_UNDECLAREDELEM = 2
        XML_SCHEMAS_ERR_NOTTOPLEVEL = 3
        XML_SCHEMAS_ERR_MISSING = 4
        XML_SCHEMAS_ERR_WRONGELEM = 5
        XML_SCHEMAS_ERR_NOTYPE = 6
        XML_SCHEMAS_ERR_NOROLLBACK = 7
        XML_SCHEMAS_ERR_ISABSTRACT = 8
        XML_SCHEMAS_ERR_NOTEMPTY = 9
        XML_SCHEMAS_ERR_ELEMCONT = 10
        XML_SCHEMAS_ERR_HAVEDEFAULT = 11
        XML_SCHEMAS_ERR_NOTNILLABLE = 12
        XML_SCHEMAS_ERR_EXTRACONTENT = 13
        XML_SCHEMAS_ERR_INVALIDATTR = 14
        XML_SCHEMAS_ERR_INVALIDELEM = 15
        XML_SCHEMAS_ERR_NOTDETERMINIST = 16
        XML_SCHEMAS_ERR_CONSTRUCT = 17
        XML_SCHEMAS_ERR_INTERNAL = 18
        XML_SCHEMAS_ERR_NOTSIMPLE = 19
        XML_SCHEMAS_ERR_ATTRUNKNOWN = 20
        XML_SCHEMAS_ERR_ATTRINVALID = 21
        XML_SCHEMAS_ERR_VALUE = 22
        XML_SCHEMAS_ERR_FACET = 23
        XML_SCHEMAS_ERR_ = 24
        XML_SCHEMAS_ERR_XXX = 25
    }
    

    Enum xmlSchemaValidOption

    Enum xmlSchemaValidOption {
        XML_SCHEMA_VAL_VC_I_CREATE = 1 : Default/fixed: create an attribute node * or an element's text node on the instance. *
    }
    

    Function: xmlSchemaDump

    void	xmlSchemaDump			(FILE * output, 
    xmlSchemaPtr schema)

    Dump a Schema structure.

    output:the file output
    schema:a schema structure

    Function: xmlSchemaFree

    void	xmlSchemaFree			(xmlSchemaPtr schema)

    Deallocate a Schema structure.

    schema:a schema structure

    Function: xmlSchemaFreeParserCtxt

    void	xmlSchemaFreeParserCtxt		(xmlSchemaParserCtxtPtr ctxt)

    Free the resources associated to the schema parser context

    ctxt:the schema parser context

    Function: xmlSchemaFreeValidCtxt

    void	xmlSchemaFreeValidCtxt		(xmlSchemaValidCtxtPtr ctxt)

    Free the resources associated to the schema validation context

    ctxt:the schema validation context

    Function: xmlSchemaGetParserErrors

    int	xmlSchemaGetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
    xmlSchemaValidityErrorFunc * err,
    xmlSchemaValidityWarningFunc * warn,
    void ** ctx)

    Get the callback information used to handle errors for a parser context

    ctxt:a XMl-Schema parser context
    err:the error callback result
    warn:the warning callback result
    ctx:contextual data for the callbacks result
    Returns:-1 in case of failure, 0 otherwise

    Function: xmlSchemaGetValidErrors

    int	xmlSchemaGetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
    xmlSchemaValidityErrorFunc * err,
    xmlSchemaValidityWarningFunc * warn,
    void ** ctx)

    Get the error and warning callback informations

    ctxt:a XML-Schema validation context
    err:the error function result
    warn:the warning function result
    ctx:the functions context result
    Returns:-1 in case of error and 0 otherwise

    Function: xmlSchemaIsValid

    int	xmlSchemaIsValid		(xmlSchemaValidCtxtPtr ctxt)

    Check if any error was detected during validation.

    ctxt:the schema validation context
    Returns:1 if valid so far, 0 if errors were detected, and -1 in case of internal error.

    Function: xmlSchemaNewDocParserCtxt

    xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(xmlDocPtr doc)

    Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.

    doc:a preparsed document tree
    Returns:the parser context or NULL in case of error

    Function: xmlSchemaNewMemParserCtxt

    xmlSchemaParserCtxtPtr	xmlSchemaNewMemParserCtxt	(const char * buffer, 
    int size)

    Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.

    buffer:a pointer to a char array containing the schemas
    size:the size of the array
    Returns:the parser context or NULL in case of error

    Function: xmlSchemaNewParserCtxt

    xmlSchemaParserCtxtPtr	xmlSchemaNewParserCtxt	(const char * URL)

    Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.

    URL:the location of the schema
    Returns:the parser context or NULL in case of error

    Function: xmlSchemaNewValidCtxt

    xmlSchemaValidCtxtPtr	xmlSchemaNewValidCtxt	(xmlSchemaPtr schema)

    Create an XML Schemas validation context based on the given schema.

    schema:a precompiled XML Schemas
    Returns:the validation context or NULL in case of error

    Function: xmlSchemaParse

    xmlSchemaPtr	xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt)

    parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.

    ctxt:a schema validation context
    Returns:the internal XML Schema structure built from the resource or NULL in case of error

    Function: xmlSchemaSAXPlug

    xmlSchemaSAXPlugPtr	xmlSchemaSAXPlug	(xmlSchemaValidCtxtPtr ctxt, 
    xmlSAXHandlerPtr * sax,
    void ** user_data)

    Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.

    ctxt:a schema validation context
    sax:a pointer to the original xmlSAXHandlerPtr
    user_data:a pointer to the original SAX user data pointer
    Returns:a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.

    Function: xmlSchemaSAXUnplug

    int	xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug)

    Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.

    plug:a data structure returned by xmlSchemaSAXPlug
    Returns:0 in case of success and -1 in case of failure.

    Function: xmlSchemaSetParserErrors

    void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
    xmlSchemaValidityErrorFunc err,
    xmlSchemaValidityWarningFunc warn,
    void * ctx)

    Set the callback functions used to handle errors for a validation context

    ctxt:a schema validation context
    err:the error callback
    warn:the warning callback
    ctx:contextual data for the callbacks

    Function: xmlSchemaSetParserStructuredErrors

    void	xmlSchemaSetParserStructuredErrors	(xmlSchemaParserCtxtPtr ctxt, 
    xmlStructuredErrorFunc serror,
    void * ctx)

    Set the structured error callback

    ctxt:a schema parser context
    serror:the structured error function
    ctx:the functions context

    Function: xmlSchemaSetValidErrors

    void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
    xmlSchemaValidityErrorFunc err,
    xmlSchemaValidityWarningFunc warn,
    void * ctx)

    Set the error and warning callback informations

    ctxt:a schema validation context
    err:the error function
    warn:the warning function
    ctx:the functions context

    Function: xmlSchemaSetValidOptions

    int	xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt, 
    int options)

    Sets the options to be used during the validation.

    ctxt:a schema validation context
    options:a combination of xmlSchemaValidOption
    Returns:0 in case of success, -1 in case of an API error.

    Function: xmlSchemaSetValidStructuredErrors

    void	xmlSchemaSetValidStructuredErrors	(xmlSchemaValidCtxtPtr ctxt, 
    xmlStructuredErrorFunc serror,
    void * ctx)

    Set the structured error callback

    ctxt:a schema validation context
    serror:the structured error function
    ctx:the functions context

    Function: xmlSchemaValidCtxtGetOptions

    int	xmlSchemaValidCtxtGetOptions	(xmlSchemaValidCtxtPtr ctxt)

    Get the validation context options.

    ctxt:a schema validation context
    Returns:the option combination or -1 on error.

    Function: xmlSchemaValidCtxtGetParserCtxt

    xmlParserCtxtPtr	xmlSchemaValidCtxtGetParserCtxt	(xmlSchemaValidCtxtPtr ctxt)

    allow access to the parser context of the schema validation context

    ctxt:a schema validation context
    Returns:the parser context of the schema validation context or NULL in case of error.

    Function: xmlSchemaValidateDoc

    int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
    xmlDocPtr doc)

    Validate a document tree in memory.

    ctxt:a schema validation context
    doc:a parsed document tree
    Returns:0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

    Function: xmlSchemaValidateFile

    int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
    const char * filename,
    int options)

    Do a schemas validation of the given resource, it will use the SAX streamable validation internally.

    ctxt:a schema validation context
    filename:the URI of the instance
    options:a future set of options, currently unused
    Returns:0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.

    Function: xmlSchemaValidateOneElement

    int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
    xmlNodePtr elem)

    Validate a branch of a tree, starting with the given @elem.

    ctxt:a schema validation context
    elem:an element node
    Returns:0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.

    Function: xmlSchemaValidateStream

    int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
    xmlParserInputBufferPtr input,
    xmlCharEncoding enc,
    xmlSAXHandlerPtr sax,
    void * user_data)

    Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.

    ctxt:a schema validation context
    input:the input to use for reading the data
    enc:an optional encoding information
    sax:a SAX handler for the resulting events
    user_data:the context to provide to the SAX handler.
    Returns:0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

    Function type: xmlSchemaValidityErrorFunc

    Function type: xmlSchemaValidityErrorFunc
    void	xmlSchemaValidityErrorFunc	(void * ctx, 
    const char * msg,
    ... ...)

    Signature of an error callback from an XSD validation

    ctx:the validation context
    msg:the message
    ...:extra arguments

    Function type: xmlSchemaValidityWarningFunc

    Function type: xmlSchemaValidityWarningFunc
    void	xmlSchemaValidityWarningFunc	(void * ctx, 
    const char * msg,
    ... ...)

    Signature of a warning callback from an XSD validation

    ctx:the validation context
    msg:the message
    ...:extra arguments

    Daniel Veillard

    0707010002b20c000081a40000000000000000000000014cb7d88500006fcc000000b500010002ffffffffffffffff0000004600000000root/usr/local/share/doc/libxml2-2.7.7/html/html/libxml-HTMLtree.html Module HTMLtree from libxml2
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    Module HTMLtree from libxml2

    API Menu
    API Indexes
    Related links

    this module implements a few function needed to process tree in an HTML specific way.

    Table of Contents

    #define HTML_COMMENT_NODE
    #define HTML_ENTITY_REF_NODE
    #define HTML_PI_NODE
    #define HTML_PRESERVE_NODE
    #define HTML_TEXT_NODE
    void	htmlDocContentDumpFormatOutput	(xmlOutputBufferPtr buf, 
    xmlDocPtr cur,
    const char * encoding,
    int format)
    void	htmlDocContentDumpOutput	(xmlOutputBufferPtr buf, 
    xmlDocPtr cur,
    const char * encoding)
    int	htmlDocDump			(FILE * f, 
    xmlDocPtr cur)
    void	htmlDocDumpMemory		(xmlDocPtr cur, 
    xmlChar ** mem,
    int * size)
    void	htmlDocDumpMemoryFormat		(xmlDocPtr cur, 
    xmlChar ** mem,
    int * size,
    int format)
    const xmlChar *	htmlGetMetaEncoding	(htmlDocPtr doc)
    int	htmlIsBooleanAttr		(const xmlChar * name)
    htmlDocPtr	htmlNewDoc		(const xmlChar * URI, 
    const xmlChar * ExternalID)
    htmlDocPtr	htmlNewDocNoDtD		(const xmlChar * URI, 
    const xmlChar * ExternalID)
    int	htmlNodeDump			(xmlBufferPtr buf, 
    xmlDocPtr doc,
    xmlNodePtr cur)
    void	htmlNodeDumpFile		(FILE * out, 
    xmlDocPtr doc,
    xmlNodePtr cur)
    int	htmlNodeDumpFileFormat		(FILE * out, 
    xmlDocPtr doc,
    xmlNodePtr cur,
    const char * encoding,
    int format)
    void	htmlNodeDumpFormatOutput	(xmlOutputBufferPtr buf, 
    xmlDocPtr doc,
    xmlNodePtr cur,
    const char * encoding,
    int format)
    void	htmlNodeDumpOutput		(xmlOutputBufferPtr buf, 
    xmlDocPtr doc,
    xmlNodePtr cur,
    const char * encoding)
    int	htmlSaveFile			(const char * filename, 
    xmlDocPtr cur)
    int	htmlSaveFileEnc			(const char * filename, 
    xmlDocPtr cur,
    const char * encoding)
    int	htmlSaveFileFormat		(const char * filename, 
    xmlDocPtr cur,
    const char * encoding,
    int format)
    int	htmlSetMetaEncoding		(htmlDocPtr doc, 
    const xmlChar * encoding)

    Description

    Macro: HTML_COMMENT_NODE

    #define HTML_COMMENT_NODE

    Macro. A comment in a HTML document is really implemented the same way as a comment in an XML document.

    Macro: HTML_ENTITY_REF_NODE

    #define HTML_ENTITY_REF_NODE

    Macro. An entity reference in a HTML document is really implemented the same way as an entity reference in an XML document.

    Macro: HTML_PI_NODE

    #define HTML_PI_NODE

    Macro. A processing instruction in a HTML document is really implemented the same way as a processing instruction in an XML document.

    Macro: HTML_PRESERVE_NODE

    #define HTML_PRESERVE_NODE

    Macro. A preserved node in a HTML document is really implemented the same way as a CDATA section in an XML document.

    Macro: HTML_TEXT_NODE

    #define HTML_TEXT_NODE

    Macro. A text node in a HTML document is really implemented the same way as a text node in an XML document.

    Function: htmlDocContentDumpFormatOutput

    void	htmlDocContentDumpFormatOutput	(xmlOutputBufferPtr buf, 
    xmlDocPtr cur,
    const char * encoding,
    int format)

    Dump an HTML document.

    buf:the HTML buffer output
    cur:the document
    encoding:the encoding string
    format:should formatting spaces been added

    Function: htmlDocContentDumpOutput

    void	htmlDocContentDumpOutput	(xmlOutputBufferPtr buf, 
    xmlDocPtr cur,
    const char * encoding)

    Dump an HTML document. Formating return/spaces are added.

    buf:the HTML buffer output
    cur:the document
    encoding:the encoding string

    Function: htmlDocDump

    int	htmlDocDump			(FILE * f, 
    xmlDocPtr cur)

    Dump an HTML document to an open FILE.

    f:the FILE*
    cur:the document
    Returns:the number of byte written or -1 in case of failure.

    Function: htmlDocDumpMemory

    void	htmlDocDumpMemory		(xmlDocPtr cur, 
    xmlChar ** mem,
    int * size)

    Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

    cur:the document
    mem:OUT: the memory pointer
    size:OUT: the memory length

    Function: htmlDocDumpMemoryFormat

    void	htmlDocDumpMemoryFormat		(xmlDocPtr cur, 
    xmlChar ** mem,
    int * size,
    int format)

    Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

    cur:the document
    mem:OUT: the memory pointer
    size:OUT: the memory length
    format:should formatting spaces been added

    Function: htmlGetMetaEncoding

    const xmlChar *	htmlGetMetaEncoding	(htmlDocPtr doc)

    Encoding definition lookup in the Meta tags

    doc:the document
    Returns:the current encoding as flagged in the HTML source

    Function: htmlIsBooleanAttr

    int	htmlIsBooleanAttr		(const xmlChar * name)

    Determine if a given attribute is a boolean attribute.

    name:the name of the attribute to check
    Returns:false if the attribute is not boolean, true otherwise.

    Function: htmlNewDoc

    htmlDocPtr	htmlNewDoc		(const xmlChar * URI, 
    const xmlChar * ExternalID)

    Creates a new HTML document

    URI:URI for the dtd, or NULL
    ExternalID:the external ID of the DTD, or NULL
    Returns:a new document

    Function: htmlNewDocNoDtD

    htmlDocPtr	htmlNewDocNoDtD		(const xmlChar * URI, 
    const xmlChar * ExternalID)

    Creates a new HTML document without a DTD node if @URI and @ExternalID are NULL

    URI:URI for the dtd, or NULL
    ExternalID:the external ID of the DTD, or NULL
    Returns:a new document, do not initialize the DTD if not provided

    Function: htmlNodeDump

    int	htmlNodeDump			(xmlBufferPtr buf, 
    xmlDocPtr doc,
    xmlNodePtr cur)

    Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.

    buf:the HTML buffer output
    doc:the document
    cur:the current node
    Returns:the number of byte written or -1 in case of error

    Function: htmlNodeDumpFile

    void	htmlNodeDumpFile		(FILE * out, 
    xmlDocPtr doc,
    xmlNodePtr cur)

    Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.

    out:the FILE pointer
    doc:the document
    cur:the current node

    Function: htmlNodeDumpFileFormat

    int	htmlNodeDumpFileFormat		(FILE * out, 
    xmlDocPtr doc,
    xmlNodePtr cur,
    const char * encoding,
    int format)

    Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding

    out:the FILE pointer
    doc:the document
    cur:the current node
    encoding:the document encoding
    format:should formatting spaces been added
    Returns:the number of byte written or -1 in case of failure.

    Function: htmlNodeDumpFormatOutput

    void	htmlNodeDumpFormatOutput	(xmlOutputBufferPtr buf, 
    xmlDocPtr doc,
    xmlNodePtr cur,
    const char * encoding,
    int format)

    Dump an HTML node, recursive behaviour,children are printed too.

    buf:the HTML buffer output
    doc:the document
    cur:the current node
    encoding:the encoding string
    format:should formatting spaces been added

    Function: htmlNodeDumpOutput

    void	htmlNodeDumpOutput		(xmlOutputBufferPtr buf, 
    xmlDocPtr doc,
    xmlNodePtr cur,
    const char * encoding)

    Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added.

    buf:the HTML buffer output
    doc:the document
    cur:the current node
    encoding:the encoding string

    Function: htmlSaveFile

    int	htmlSaveFile			(const char * filename, 
    xmlDocPtr cur)

    Dump an HTML document to a file. If @filename is "-" the stdout file is used.

    filename:the filename (or URL)
    cur:the document
    Returns:the number of byte written or -1 in case of failure.

    Function: htmlSaveFileEnc

    int	htmlSaveFileEnc			(const char * filename, 
    xmlDocPtr cur,
    const char * encoding)

    Dump an HTML document to a file using a given encoding and formatting returns/spaces are added.

    filename:the filename
    cur:the document
    encoding:the document encoding
    Returns:the number of byte written or -1 in case of failure.

    Function: htmlSaveFileFormat

    int	htmlSaveFileFormat		(const char * filename, 
    xmlDocPtr cur,
    const char * encoding,
    int format)

    Dump an HTML document to a file using a given encoding.

    filename:the filename
    cur:the document
    encoding:the document encoding
    format:should formatting spaces been added
    Returns:the number of byte written or -1 in case of failure.

    Function: htmlSetMetaEncoding

    int	htmlSetMetaEncoding		(htmlDocPtr doc, 
    const xmlChar * encoding)

    Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.

    doc:the document
    encoding:the encoding string
    Returns:0 in case of success and -1 in case of error

    Daniel Veillard

    0707010002b233000081a40000000000000000000000014cb7d88500009993000000b500010002ffffffffffffffff0000004700000000root/usr/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlstring.html Module xmlstring from libxml2
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    Module xmlstring from libxml2

    API Menu
    API Indexes
    Related links

    type and interfaces needed for the internal string handling of the library, especially UTF8 processing.

    Table of Contents

    #define BAD_CAST
    Typedef unsigned char xmlChar
    
    xmlChar *	xmlCharStrdup		(const char * cur)
    xmlChar *	xmlCharStrndup		(const char * cur, 
    int len)
    int	xmlCheckUTF8			(const unsigned char * utf)
    int	xmlGetUTF8Char			(const unsigned char * utf, 
    int * len)
    int	xmlStrEqual			(const xmlChar * str1, 
    const xmlChar * str2)
    int	xmlStrPrintf			(xmlChar * buf, 
    int len,
    const xmlChar * msg,
    ... ...)
    int	xmlStrQEqual			(const xmlChar * pref, 
    const xmlChar * name,
    const xmlChar * str)
    int	xmlStrVPrintf			(xmlChar * buf, 
    int len,
    const xmlChar * msg,
    va_list ap)
    int	xmlStrcasecmp			(const xmlChar * str1, 
    const xmlChar * str2)
    const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
    const xmlChar * val)
    xmlChar *	xmlStrcat		(xmlChar * cur, 
    const xmlChar * add)
    const xmlChar *	xmlStrchr		(const xmlChar * str, 
    xmlChar val)
    int	xmlStrcmp			(const xmlChar * str1, 
    const xmlChar * str2)
    xmlChar *	xmlStrdup		(const xmlChar * cur)
    int	xmlStrlen			(const xmlChar * str)
    int	xmlStrncasecmp			(const xmlChar * str1, 
    const xmlChar * str2,
    int len)
    xmlChar *	xmlStrncat		(xmlChar * cur, 
    const xmlChar * add,
    int len)
    xmlChar *	xmlStrncatNew		(const xmlChar * str1, 
    const xmlChar * str2,
    int len)
    int	xmlStrncmp			(const xmlChar * str1, 
    const xmlChar * str2,
    int len)
    xmlChar *	xmlStrndup		(const xmlChar * cur, 
    int len)
    const xmlChar *	xmlStrstr		(const xmlChar * str, 
    const xmlChar * val)
    xmlChar *	xmlStrsub		(const xmlChar * str, 
    int start,
    int len)
    int	xmlUTF8Charcmp			(const xmlChar * utf1, 
    const xmlChar * utf2)
    int	xmlUTF8Size			(const xmlChar * utf)
    int	xmlUTF8Strlen			(const xmlChar * utf)
    int	xmlUTF8Strloc			(const xmlChar * utf, 
    const xmlChar * utfchar)
    xmlChar *	xmlUTF8Strndup		(const xmlChar * utf, 
    int len)
    const xmlChar *	xmlUTF8Strpos		(const xmlChar * utf, 
    int pos)
    int	xmlUTF8Strsize			(const xmlChar * utf, 
    int len)
    xmlChar *	xmlUTF8Strsub		(const xmlChar * utf, 
    int start,
    int len)

    Description

    Macro: BAD_CAST

    #define BAD_CAST

    Macro to cast a string to an xmlChar * when one know its safe.

    This is a basic byte in an UTF-8 encoded string. It's unsigned allowing to pinpoint case where char * are assigned to xmlChar * (possibly making serialization back impossible).

    Function: xmlCharStrdup

    xmlChar *	xmlCharStrdup		(const char * cur)

    a strdup for char's to xmlChar's

    cur:the input char *
    Returns:a new xmlChar * or NULL

    Function: xmlCharStrndup

    xmlChar *	xmlCharStrndup		(const char * cur, 
    int len)

    a strndup for char's to xmlChar's

    cur:the input char *
    len:the len of @cur
    Returns:a new xmlChar * or NULL

    Function: xmlCheckUTF8

    int	xmlCheckUTF8			(const unsigned char * utf)

    Checks @utf for being valid UTF-8. @utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer UTF-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value.

    utf:Pointer to putative UTF-8 encoded string.
    Returns:value: true if @utf is valid.

    Function: xmlGetUTF8Char

    int	xmlGetUTF8Char			(const unsigned char * utf, 
    int * len)

    Read the first UTF8 character from @utf

    utf:a sequence of UTF-8 encoded bytes
    len:a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.
    Returns:the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)

    Function: xmlStrEqual

    int	xmlStrEqual			(const xmlChar * str1, 
    const xmlChar * str2)

    Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()

    str1:the first xmlChar *
    str2:the second xmlChar *
    Returns:1 if they are equal, 0 if they are different

    Function: xmlStrPrintf

    int	xmlStrPrintf			(xmlChar * buf, 
    int len,
    const xmlChar * msg,
    ... ...)

    Formats @msg and places result into @buf.

    buf:the result buffer.
    len:the result buffer length.
    msg:the message with printf formatting.
    ...:extra parameters for the message.
    Returns:the number of characters written to @buf or -1 if an error occurs.

    Function: xmlStrQEqual

    int	xmlStrQEqual			(const xmlChar * pref, 
    const xmlChar * name,
    const xmlChar * str)

    Check if a QName is Equal to a given string

    pref:the prefix of the QName
    name:the localname of the QName
    str:the second xmlChar *
    Returns:1 if they are equal, 0 if they are different

    Function: xmlStrVPrintf

    int	xmlStrVPrintf			(xmlChar * buf, 
    int len,
    const xmlChar * msg,
    va_list ap)

    Formats @msg and places result into @buf.

    buf:the result buffer.
    len:the result buffer length.
    msg:the message with printf formatting.
    ap:extra parameters for the message.
    Returns:the number of characters written to @buf or -1 if an error occurs.

    Function: xmlStrcasecmp

    int	xmlStrcasecmp			(const xmlChar * str1, 
    const xmlChar * str2)

    a strcasecmp for xmlChar's

    str1:the first xmlChar *
    str2:the second xmlChar *
    Returns:the integer result of the comparison

    Function: xmlStrcasestr

    const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
    const xmlChar * val)

    a case-ignoring strstr for xmlChar's

    str:the xmlChar * array (haystack)
    val:the xmlChar to search (needle)
    Returns:the xmlChar * for the first occurrence or NULL.

    Function: xmlStrcat

    xmlChar *	xmlStrcat		(xmlChar * cur, 
    const xmlChar * add)

    a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

    cur:the original xmlChar * array
    add:the xmlChar * array added
    Returns:a new xmlChar * containing the concatenated string.

    Function: xmlStrchr

    const xmlChar *	xmlStrchr		(const xmlChar * str, 
    xmlChar val)

    a strchr for xmlChar's

    str:the xmlChar * array
    val:the xmlChar to search
    Returns:the xmlChar * for the first occurrence or NULL.

    Function: xmlStrcmp

    int	xmlStrcmp			(const xmlChar * str1, 
    const xmlChar * str2)

    a strcmp for xmlChar's

    str1:the first xmlChar *
    str2:the second xmlChar *
    Returns:the integer result of the comparison

    Function: xmlStrdup

    xmlChar *	xmlStrdup		(const xmlChar * cur)

    a strdup for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

    cur:the input xmlChar *
    Returns:a new xmlChar * or NULL

    Function: xmlStrlen

    int	xmlStrlen			(const xmlChar * str)

    length of a xmlChar's string

    str:the xmlChar * array
    Returns:the number of xmlChar contained in the ARRAY.

    Function: xmlStrncasecmp

    int	xmlStrncasecmp			(const xmlChar * str1, 
    const xmlChar * str2,
    int len)

    a strncasecmp for xmlChar's

    str1:the first xmlChar *
    str2:the second xmlChar *
    len:the max comparison length
    Returns:the integer result of the comparison

    Function: xmlStrncat

    xmlChar *	xmlStrncat		(xmlChar * cur, 
    const xmlChar * add,
    int len)

    a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len < 0 then this is an API error and NULL will be returned.

    cur:the original xmlChar * array
    add:the xmlChar * array added
    len:the length of @add
    Returns:a new xmlChar *, the original @cur is reallocated if needed and should not be freed

    Function: xmlStrncatNew

    xmlChar *	xmlStrncatNew		(const xmlChar * str1, 
    const xmlChar * str2,
    int len)

    same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is < 0 then the length will be calculated automatically.

    str1:first xmlChar string
    str2:second xmlChar string
    len:the len of @str2 or < 0
    Returns:a new xmlChar * or NULL

    Function: xmlStrncmp

    int	xmlStrncmp			(const xmlChar * str1, 
    const xmlChar * str2,
    int len)

    a strncmp for xmlChar's

    str1:the first xmlChar *
    str2:the second xmlChar *
    len:the max comparison length
    Returns:the integer result of the comparison

    Function: xmlStrndup

    xmlChar *	xmlStrndup		(const xmlChar * cur, 
    int len)

    a strndup for array of xmlChar's

    cur:the input xmlChar *
    len:the len of @cur
    Returns:a new xmlChar * or NULL

    Function: xmlStrstr

    const xmlChar *	xmlStrstr		(const xmlChar * str, 
    const xmlChar * val)

    a strstr for xmlChar's

    str:the xmlChar * array (haystack)
    val:the xmlChar to search (needle)
    Returns:the xmlChar * for the first occurrence or NULL.

    Function: xmlStrsub

    xmlChar *	xmlStrsub		(const xmlChar * str, 
    int start,
    int len)

    Extract a substring of a given string

    str:the xmlChar * array (haystack)
    start:the index of the first char (zero based)
    len:the length of the substring
    Returns:the xmlChar * for the first occurrence or NULL.

    Function: xmlUTF8Charcmp

    int	xmlUTF8Charcmp			(const xmlChar * utf1, 
    const xmlChar * utf2)

    compares the two UCS4 values

    utf1:pointer to first UTF8 char
    utf2:pointer to second UTF8 char
    Returns:result of the compare as with xmlStrncmp

    Function: xmlUTF8Size

    int	xmlUTF8Size			(const xmlChar * utf)

    calculates the internal size of a UTF8 character

    utf:pointer to the UTF8 character
    Returns:the numbers of bytes in the character, -1 on format error

    Function: xmlUTF8Strlen

    int	xmlUTF8Strlen			(const xmlChar * utf)

    compute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string.

    utf:a sequence of UTF-8 encoded bytes
    Returns:the number of characters in the string or -1 in case of error

    Function: xmlUTF8Strloc

    int	xmlUTF8Strloc			(const xmlChar * utf, 
    const xmlChar * utfchar)

    a function to provide the relative location of a UTF8 char

    utf:the input UTF8 *
    utfchar:the UTF8 character to be found
    Returns:the relative character position of the desired char or -1 if not found

    Function: xmlUTF8Strndup

    xmlChar *	xmlUTF8Strndup		(const xmlChar * utf, 
    int len)

    a strndup for array of UTF8's

    utf:the input UTF8 *
    len:the len of @utf (in chars)
    Returns:a new UTF8 * or NULL

    Function: xmlUTF8Strpos

    const xmlChar *	xmlUTF8Strpos		(const xmlChar * utf, 
    int pos)

    a function to provide the equivalent of fetching a character from a string array

    utf:the input UTF8 *
    pos:the position of the desired UTF8 char (in chars)
    Returns:a pointer to the UTF8 character or NULL

    Function: xmlUTF8Strsize

    int	xmlUTF8Strsize			(const xmlChar * utf, 
    int len)

    storage size of an UTF8 string the behaviour is not garanteed if the input string is not UTF-8

    utf:a sequence of UTF-8 encoded bytes
    len:the number of characters in the array
    Returns:the storage size of the first 'len' characters of ARRAY

    Function: xmlUTF8Strsub

    xmlChar *	xmlUTF8Strsub		(const xmlChar * utf, 
    int start,
    int len)

    Create a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars

    utf:a sequence of UTF-8 encoded bytes
    start:relative pos of first char
    len:total number to copy
    Returns:a pointer to a newly created string or NULL if any problem

    Daniel Veillard

    0707010002b210000081a40000000000000000000000014cb7d8850000a04f000000b500010002ffffffffffffffff0000004500000000root/usr/local/share/doc/libxml2-2.7.7/html/html/libxml-catalog.html Module catalog from libxml2
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    Module catalog from libxml2

    API Menu
    API Indexes
    Related links

    the catalog module implements the support for XML Catalogs and SGML catalogs

    Table of Contents

    #define XML_CATALOGS_NAMESPACE
    #define XML_CATALOG_PI
    Structure xmlCatalog
    struct _xmlCatalog The content of this structure is not made public by the API.
    Enum xmlCatalogAllow
    
    Enum xmlCatalogPrefer
    
    Typedef xmlCatalog * xmlCatalogPtr
    
    int	xmlACatalogAdd			(xmlCatalogPtr catal, 
    const xmlChar * type,
    const xmlChar * orig,
    const xmlChar * replace)
    void	xmlACatalogDump			(xmlCatalogPtr catal, 
    FILE * out)
    int	xmlACatalogRemove		(xmlCatalogPtr catal, 
    const xmlChar * value)
    xmlChar *	xmlACatalogResolve	(xmlCatalogPtr catal, 
    const xmlChar * pubID,
    const xmlChar * sysID)
    xmlChar *	xmlACatalogResolvePublic	(xmlCatalogPtr catal, 
    const xmlChar * pubID)
    xmlChar *	xmlACatalogResolveSystem	(xmlCatalogPtr catal, 
    const xmlChar * sysID)
    xmlChar *	xmlACatalogResolveURI	(xmlCatalogPtr catal, 
    const xmlChar * URI)
    int	xmlCatalogAdd			(const xmlChar * type, 
    const xmlChar * orig,
    const xmlChar * replace)
    void *	xmlCatalogAddLocal		(void * catalogs, 
    const xmlChar * URL)
    void	xmlCatalogCleanup		(void)
    int	xmlCatalogConvert		(void)
    void	xmlCatalogDump			(FILE * out)
    void	xmlCatalogFreeLocal		(void * catalogs)
    xmlCatalogAllow	xmlCatalogGetDefaults	(void)
    const xmlChar *	xmlCatalogGetPublic	(const xmlChar * pubID)
    const xmlChar *	xmlCatalogGetSystem	(const xmlChar * sysID)
    int	xmlCatalogIsEmpty		(xmlCatalogPtr catal)
    xmlChar *	xmlCatalogLocalResolve	(void * catalogs, 
    const xmlChar * pubID,
    const xmlChar * sysID)
    xmlChar *	xmlCatalogLocalResolveURI	(void * catalogs, 
    const xmlChar * URI)
    int	xmlCatalogRemove		(const xmlChar * value)
    xmlChar *	xmlCatalogResolve	(const xmlChar * pubID, 
    const xmlChar * sysID)
    xmlChar *	xmlCatalogResolvePublic	(const xmlChar * pubID)
    xmlChar *	xmlCatalogResolveSystem	(const xmlChar * sysID)
    xmlChar *	xmlCatalogResolveURI	(const xmlChar * URI)
    int	xmlCatalogSetDebug		(int level)
    xmlCatalogPrefer	xmlCatalogSetDefaultPrefer	(xmlCatalogPrefer prefer)
    void	xmlCatalogSetDefaults		(xmlCatalogAllow allow)
    int	xmlConvertSGMLCatalog		(xmlCatalogPtr catal)
    void	xmlFreeCatalog			(xmlCatalogPtr catal)
    void	xmlInitializeCatalog		(void)
    xmlCatalogPtr	xmlLoadACatalog		(const char * filename)
    int	xmlLoadCatalog			(const char * filename)
    void	xmlLoadCatalogs			(const char * pathss)
    xmlCatalogPtr	xmlLoadSGMLSuperCatalog	(const char * filename)
    xmlCatalogPtr	xmlNewCatalog		(int sgml)
    xmlDocPtr	xmlParseCatalogFile	(const char * filename)

    Description

    Macro: XML_CATALOGS_NAMESPACE

    #define XML_CATALOGS_NAMESPACE

    The namespace for the XML Catalogs elements.

    Macro: XML_CATALOG_PI

    #define XML_CATALOG_PI

    The specific XML Catalog Processing Instuction name.

    Structure xmlCatalog

    Structure xmlCatalog
    struct _xmlCatalog { The content of this structure is not made public by the API. }

    Enum xmlCatalogAllow

    Enum xmlCatalogAllow {
        XML_CATA_ALLOW_NONE = 0
        XML_CATA_ALLOW_GLOBAL = 1
        XML_CATA_ALLOW_DOCUMENT = 2
        XML_CATA_ALLOW_ALL = 3
    }
    

    Enum xmlCatalogPrefer

    Enum xmlCatalogPrefer {
        XML_CATA_PREFER_NONE = 0
        XML_CATA_PREFER_PUBLIC = 1
        XML_CATA_PREFER_SYSTEM = 2
    }
    

    Function: xmlACatalogAdd

    int	xmlACatalogAdd			(xmlCatalogPtr catal, 
    const xmlChar * type,
    const xmlChar * orig,
    const xmlChar * replace)

    Add an entry in the catalog, it may overwrite existing but different entries.

    catal:a Catalog
    type:the type of record to add to the catalog
    orig:the system, public or prefix to match
    replace:the replacement value for the match
    Returns:0 if successful, -1 otherwise

    Function: xmlACatalogDump

    void	xmlACatalogDump			(xmlCatalogPtr catal, 
    FILE * out)

    Dump the given catalog to the given file.

    catal:a Catalog
    out:the file.

    Function: xmlACatalogRemove

    int	xmlACatalogRemove		(xmlCatalogPtr catal, 
    const xmlChar * value)

    Remove an entry from the catalog

    catal:a Catalog
    value:the value to remove
    Returns:the number of entries removed if successful, -1 otherwise

    Function: xmlACatalogResolve

    xmlChar *	xmlACatalogResolve	(xmlCatalogPtr catal, 
    const xmlChar * pubID,
    const xmlChar * sysID)

    Do a complete resolution lookup of an External Identifier

    catal:a Catalog
    pubID:the public ID string
    sysID:the system ID string
    Returns:the URI of the resource or NULL if not found, it must be freed by the caller.

    Function: xmlACatalogResolvePublic

    xmlChar *	xmlACatalogResolvePublic	(xmlCatalogPtr catal, 
    const xmlChar * pubID)

    Try to lookup the catalog local reference associated to a public ID in that catalog

    catal:a Catalog
    pubID:the public ID string
    Returns:the local resource if found or NULL otherwise, the value returned must be freed by the caller.

    Function: xmlACatalogResolveSystem

    xmlChar *	xmlACatalogResolveSystem	(xmlCatalogPtr catal, 
    const xmlChar * sysID)

    Try to lookup the catalog resource for a system ID

    catal:a Catalog
    sysID:the system ID string
    Returns:the resource if found or NULL otherwise, the value returned must be freed by the caller.

    Function: xmlACatalogResolveURI

    xmlChar *	xmlACatalogResolveURI	(xmlCatalogPtr catal, 
    const xmlChar * URI)

    Do a complete resolution lookup of an URI

    catal:a Catalog
    URI:the URI
    Returns:the URI of the resource or NULL if not found, it must be freed by the caller.

    Function: xmlCatalogAdd

    int	xmlCatalogAdd			(const xmlChar * type, 
    const xmlChar * orig,
    const xmlChar * replace)

    Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog();

    type:the type of record to add to the catalog
    orig:the system, public or prefix to match
    replace:the replacement value for the match
    Returns:0 if successful, -1 otherwise

    Function: xmlCatalogAddLocal

    void *	xmlCatalogAddLocal		(void * catalogs, 
    const xmlChar * URL)

    Add the new entry to the catalog list

    catalogs:a document's list of catalogs
    URL:the URL to a new local catalog
    Returns:the updated list

    Function: xmlCatalogCleanup

    void	xmlCatalogCleanup		(void)

    Free up all the memory associated with catalogs

    Function: xmlCatalogConvert

    int	xmlCatalogConvert		(void)

    Convert all the SGML catalog entries as XML ones

    Returns:the number of entries converted if successful, -1 otherwise

    Function: xmlCatalogDump

    void	xmlCatalogDump			(FILE * out)

    Dump all the global catalog content to the given file.

    out:the file.

    Function: xmlCatalogFreeLocal

    void	xmlCatalogFreeLocal		(void * catalogs)

    Free up the memory associated to the catalog list

    catalogs:a document's list of catalogs

    Function: xmlCatalogGetDefaults

    xmlCatalogAllow	xmlCatalogGetDefaults	(void)

    Used to get the user preference w.r.t. to what catalogs should be accepted

    Returns:the current xmlCatalogAllow value

    Function: xmlCatalogGetPublic

    const xmlChar *	xmlCatalogGetPublic	(const xmlChar * pubID)

    Try to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()

    pubID:the public ID string
    Returns:the resource if found or NULL otherwise.

    Function: xmlCatalogGetSystem

    const xmlChar *	xmlCatalogGetSystem	(const xmlChar * sysID)

    Try to lookup the catalog reference associated to a system ID DEPRECATED, use xmlCatalogResolveSystem()

    sysID:the system ID string
    Returns:the resource if found or NULL otherwise.

    Function: xmlCatalogIsEmpty

    int	xmlCatalogIsEmpty		(xmlCatalogPtr catal)

    Check is a catalog is empty

    catal:should this create an SGML catalog
    Returns:1 if the catalog is empty, 0 if not, amd -1 in case of error.

    Function: xmlCatalogLocalResolve

    xmlChar *	xmlCatalogLocalResolve	(void * catalogs, 
    const xmlChar * pubID,
    const xmlChar * sysID)

    Do a complete resolution lookup of an External Identifier using a document's private catalog list

    catalogs:a document's list of catalogs
    pubID:the public ID string
    sysID:the system ID string
    Returns:the URI of the resource or NULL if not found, it must be freed by the caller.

    Function: xmlCatalogLocalResolveURI

    xmlChar *	xmlCatalogLocalResolveURI	(void * catalogs, 
    const xmlChar * URI)

    Do a complete resolution lookup of an URI using a document's private catalog list

    catalogs:a document's list of catalogs
    URI:the URI
    Returns:the URI of the resource or NULL if not found, it must be freed by the caller.

    Function: xmlCatalogRemove

    int	xmlCatalogRemove		(const xmlChar * value)

    Remove an entry from the catalog

    value:the value to remove
    Returns:the number of entries removed if successful, -1 otherwise

    Function: xmlCatalogResolve

    xmlChar *	xmlCatalogResolve	(const xmlChar * pubID, 
    const xmlChar * sysID)

    Do a complete resolution lookup of an External Identifier

    pubID:the public ID string
    sysID:the system ID string
    Returns:the URI of the resource or NULL if not found, it must be freed by the caller.

    Function: xmlCatalogResolvePublic

    xmlChar *	xmlCatalogResolvePublic	(const xmlChar * pubID)

    Try to lookup the catalog reference associated to a public ID

    pubID:the public ID string
    Returns:the resource if found or NULL otherwise, the value returned must be freed by the caller.

    Function: xmlCatalogResolveSystem

    xmlChar *	xmlCatalogResolveSystem	(const xmlChar * sysID)

    Try to lookup the catalog resource for a system ID

    sysID:the system ID string
    Returns:the resource if found or NULL otherwise, the value returned must be freed by the caller.

    Function: xmlCatalogResolveURI

    xmlChar *	xmlCatalogResolveURI	(const xmlChar * URI)

    Do a complete resolution lookup of an URI

    URI:the URI
    Returns:the URI of the resource or NULL if not found, it must be freed by the caller.

    Function: xmlCatalogSetDebug

    int	xmlCatalogSetDebug		(int level)

    Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it

    level:the debug level of catalogs required
    Returns:the previous value of the catalog debugging level

    Function: xmlCatalogSetDefaultPrefer

    xmlCatalogPrefer	xmlCatalogSetDefaultPrefer	(xmlCatalogPrefer prefer)

    Allows to set the preference between public and system for deletion in XML Catalog resolution. C.f. section 4.1.1 of the spec Values accepted are XML_CATA_PREFER_PUBLIC or XML_CATA_PREFER_SYSTEM

    prefer:the default preference for delegation
    Returns:the previous value of the default preference for delegation

    Function: xmlCatalogSetDefaults

    void	xmlCatalogSetDefaults		(xmlCatalogAllow allow)

    Used to set the user preference w.r.t. to what catalogs should be accepted

    allow:what catalogs should be accepted

    Function: xmlConvertSGMLCatalog

    int	xmlConvertSGMLCatalog		(xmlCatalogPtr catal)

    Convert all the SGML catalog entries as XML ones

    catal:the catalog
    Returns:the number of entries converted if successful, -1 otherwise

    Function: xmlFreeCatalog

    void	xmlFreeCatalog			(xmlCatalogPtr catal)

    Free the memory allocated to a Catalog

    catal:a Catalog

    Function: xmlInitializeCatalog

    void	xmlInitializeCatalog		(void)

    Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup

    Function: xmlLoadACatalog

    xmlCatalogPtr	xmlLoadACatalog		(const char * filename)

    Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.

    filename:a file path
    Returns:the catalog parsed or NULL in case of error

    Function: xmlLoadCatalog

    int	xmlLoadCatalog			(const char * filename)

    Load the catalog and makes its definitions effective for the default external entity loader. It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup

    filename:a file path
    Returns:0 in case of success -1 in case of error

    Function: xmlLoadCatalogs

    void	xmlLoadCatalogs			(const char * pathss)

    Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup

    pathss:a list of directories separated by a colon or a space.

    Function: xmlLoadSGMLSuperCatalog

    xmlCatalogPtr	xmlLoadSGMLSuperCatalog	(const char * filename)

    Load an SGML super catalog. It won't expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries.

    filename:a file path
    Returns:the catalog parsed or NULL in case of error

    Function: xmlNewCatalog

    xmlCatalogPtr	xmlNewCatalog		(int sgml)

    create a new Catalog.

    sgml:should this create an SGML catalog
    Returns:the xmlCatalogPtr or NULL in case of error

    Function: xmlParseCat