doc: Remove tutorial

The tutorial was moved to the Wiki:

https://gitlab.gnome.org/GNOME/libxml2/-/wikis/Tutorial
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a4e8c0e..6148082 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -289,7 +289,7 @@
 pages:
   script:
     - mkdir -p public
-    - cp -r doc/devhelp doc/tutorial doc/xmllint.html doc/xmlcatalog.html public
+    - cp -r doc/devhelp doc/xmllint.html doc/xmlcatalog.html public
   artifacts:
     paths:
       - public
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 577bb34..aebad07 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,55 +2,6 @@
 SUBDIRS = . devhelp
 
 nobase_dist_doc_DATA = \
-	tutorial/apa.html \
-	tutorial/apb.html \
-	tutorial/apc.html \
-	tutorial/apd.html \
-	tutorial/ape.html \
-	tutorial/apf.html \
-	tutorial/apg.html \
-	tutorial/aph.html \
-	tutorial/api.html \
-	tutorial/ar01s02.html \
-	tutorial/ar01s03.html \
-	tutorial/ar01s04.html \
-	tutorial/ar01s05.html \
-	tutorial/ar01s06.html \
-	tutorial/ar01s07.html \
-	tutorial/ar01s08.html \
-	tutorial/ar01s09.html \
-	tutorial/images/blank.png \
-	tutorial/images/callouts/1.png \
-	tutorial/images/callouts/10.png \
-	tutorial/images/callouts/2.png \
-	tutorial/images/callouts/3.png \
-	tutorial/images/callouts/4.png \
-	tutorial/images/callouts/5.png \
-	tutorial/images/callouts/6.png \
-	tutorial/images/callouts/7.png \
-	tutorial/images/callouts/8.png \
-	tutorial/images/callouts/9.png \
-	tutorial/images/caution.png \
-	tutorial/images/draft.png \
-	tutorial/images/home.png \
-	tutorial/images/important.png \
-	tutorial/images/next.png \
-	tutorial/images/note.png \
-	tutorial/images/prev.png \
-	tutorial/images/tip.png \
-	tutorial/images/toc-blank.png \
-	tutorial/images/toc-minus.png \
-	tutorial/images/toc-plus.png \
-	tutorial/images/up.png \
-	tutorial/images/warning.png \
-	tutorial/includeaddattribute.c \
-	tutorial/includeaddkeyword.c \
-	tutorial/includeconvert.c \
-	tutorial/includegetattribute.c \
-	tutorial/includekeyword.c \
-	tutorial/includexpath.c \
-	tutorial/index.html \
-	tutorial/ix01.html \
 	xmlcatalog.html \
 	xmllint.html
 
diff --git a/doc/meson.build b/doc/meson.build
index cf8e879..1ae3ecc 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -10,4 +10,3 @@
 install_data(tutorial_files, install_dir: dir_doc)
 
 subdir('devhelp')
-subdir('tutorial')
diff --git a/doc/tutorial/apa.html b/doc/tutorial/apa.html
deleted file mode 100644
index 964e15f..0000000
--- a/doc/tutorial/apa.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>A. Compilation</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s09.html" title="Encoding Conversion"><link rel="next" href="apb.html" title="B. Sample Document"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">A. Compilation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s09.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apb.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="compilation"></a>A. Compilation</h2></div></div><div></div></div><p><a class="indexterm" name="id2587670"></a>
-      <span class="application">Libxml</span> includes a script,
-    <span class="application">xml2-config</span>, that can be used to generate
-    flags for compilation and linking of programs written with the
-      library. For pre-processor and compiler flags, use <b class="command">xml2-config
-	--cflags</b>. For library linking flags, use <b class="command">xml2-config
-	--libs</b>. Other options are available using <b class="command">xml2-config
-    --help</b>.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s09.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apb.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Encoding Conversion </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> B. Sample Document</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apb.html b/doc/tutorial/apb.html
deleted file mode 100644
index ef14066..0000000
--- a/doc/tutorial/apb.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>B. Sample Document</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apa.html" title="A. Compilation"><link rel="next" href="apc.html" title="C. Code for Keyword Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">B. Sample Document</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apa.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apc.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="sampledoc"></a>B. Sample Document</h2></div></div><div></div></div><pre class="programlisting">
-&lt;?xml version="1.0"?&gt;
-&lt;story&gt;
-  &lt;storyinfo&gt;
-    &lt;author&gt;John Fleck&lt;/author&gt;
-    &lt;datewritten&gt;June 2, 2002&lt;/datewritten&gt;
-    &lt;keyword&gt;example keyword&lt;/keyword&gt;
-  &lt;/storyinfo&gt;
-  &lt;body&gt;
-    &lt;headline&gt;This is the headline&lt;/headline&gt;
-    &lt;para&gt;This is the body text.&lt;/para&gt;
-  &lt;/body&gt;
-&lt;/story&gt;
-</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apa.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apc.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">A. Compilation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> C. Code for Keyword Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apc.html b/doc/tutorial/apc.html
deleted file mode 100644
index f8d9911..0000000
--- a/doc/tutorial/apc.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>C. Code for Keyword Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apb.html" title="B. Sample Document"><link rel="next" href="apd.html" title="D. Code for XPath Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">C. Code for Keyword Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apb.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apd.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="keywordappendix"></a>C. Code for Keyword Example</h2></div></div><div></div></div><p>
-      </p><pre class="programlisting">
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;libxml/xmlmemory.h&gt;
-#include &lt;libxml/parser.h&gt;
-
-void
-parseStory (xmlDocPtr doc, xmlNodePtr cur) {
-
-	xmlChar *key;
-	cur = cur-&gt;xmlChildrenNode;
-	while (cur != NULL) {
-	    if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"keyword"))) {
-		    key = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
-		    printf("keyword: %s\n", key);
-		    xmlFree(key);
- 	    }
-	cur = cur-&gt;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-&gt;name, (const xmlChar *) "story")) {
-		fprintf(stderr,"document of the wrong type, root node != story");
-		xmlFreeDoc(doc);
-		return;
-	}
-	
-	cur = cur-&gt;xmlChildrenNode;
-	while (cur != NULL) {
-		if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"storyinfo"))){
-			parseStory (doc, cur);
-		}
-		 
-	cur = cur-&gt;next;
-	}
-	
-	xmlFreeDoc(doc);
-	return;
-}
-
-int
-main(int argc, char **argv) {
-
-	char *docname;
-		
-	if (argc &lt;= 1) {
-		printf("Usage: %s docname\n", argv[0]);
-		return(0);
-	}
-
-	docname = argv[1];
-	parseDoc (docname);
-
-	return (1);
-}
-
-</pre><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apb.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apd.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">B. Sample Document </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> D. Code for XPath Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apd.html b/doc/tutorial/apd.html
deleted file mode 100644
index 8f9618d..0000000
--- a/doc/tutorial/apd.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>D. Code for XPath Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apc.html" title="C. Code for Keyword Example"><link rel="next" href="ape.html" title="E. Code for Add Keyword Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">D. Code for XPath Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apc.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ape.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="xpathappendix"></a>D. Code for XPath Example</h2></div></div><div></div></div><p>
-      </p><pre class="programlisting">
-#include &lt;libxml/parser.h&gt;
-#include &lt;libxml/xpath.h&gt;
-
-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-&gt;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 &lt;= 1) {
-		printf("Usage: %s docname\n", argv[0]);
-		return(0);
-	}
-
-	docname = argv[1];
-	doc = getdoc(docname);
-	result = getnodeset (doc, xpath);
-	if (result) {
-		nodeset = result-&gt;nodesetval;
-		for (i=0; i &lt; nodeset-&gt;nodeNr; i++) {
-			keyword = xmlNodeListGetString(doc, nodeset-&gt;nodeTab[i]-&gt;xmlChildrenNode, 1);
-		printf("keyword: %s\n", keyword);
-		xmlFree(keyword);
-		}
-		xmlXPathFreeObject (result);
-	}
-	xmlFreeDoc(doc);
-	xmlCleanupParser();
-	return (1);
-}
-</pre><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ape.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">C. Code for Keyword Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> E. Code for Add Keyword Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ape.html b/doc/tutorial/ape.html
deleted file mode 100644
index 200319a..0000000
--- a/doc/tutorial/ape.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>E. Code for Add Keyword Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apd.html" title="D. Code for XPath Example"><link rel="next" href="apf.html" title="F. Code for Add Attribute Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">E. Code for Add Keyword Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apd.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apf.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="addkeywordappendix"></a>E. Code for Add Keyword Example</h2></div></div><div></div></div><p>
-      </p><pre class="programlisting">
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;libxml/xmlmemory.h&gt;
-#include &lt;libxml/parser.h&gt;
-
-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-&gt;name, (const xmlChar *) "story")) {
-		fprintf(stderr,"document of the wrong type, root node != story");
-		xmlFreeDoc(doc);
-		return (NULL);
-	}
-	
-	cur = cur-&gt;xmlChildrenNode;
-	while (cur != NULL) {
-		if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"storyinfo"))){
-			parseStory (doc, cur, keyword);
-		}
-		 
-	cur = cur-&gt;next;
-	}
-	return(doc);
-}
-
-int
-main(int argc, char **argv) {
-
-	char *docname;
-	char *keyword;
-	xmlDocPtr doc;
-
-	if (argc &lt;= 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);
-}
-
-</pre><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apd.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apf.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">D. Code for XPath Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> F. Code for Add Attribute Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apf.html b/doc/tutorial/apf.html
deleted file mode 100644
index 4848cdb..0000000
--- a/doc/tutorial/apf.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>F. Code for Add Attribute Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ape.html" title="E. Code for Add Keyword Example"><link rel="next" href="apg.html" title="G. Code for Retrieving Attribute Value Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">F. Code for Add Attribute Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ape.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apg.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="addattributeappendix"></a>F. Code for Add Attribute Example</h2></div></div><div></div></div><p>
-      </p><pre class="programlisting">
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;libxml/xmlmemory.h&gt;
-#include &lt;libxml/parser.h&gt;
-
-
-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-&gt;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 &lt;= 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);
-}
-
-</pre><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ape.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apg.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">E. Code for Add Keyword Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> G. Code for Retrieving Attribute Value Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apg.html b/doc/tutorial/apg.html
deleted file mode 100644
index fffa0ee..0000000
--- a/doc/tutorial/apg.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>G. Code for Retrieving Attribute Value Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apf.html" title="F. Code for Add Attribute Example"><link rel="next" href="aph.html" title="H. Code for Encoding Conversion Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">G. Code for Retrieving Attribute Value Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apf.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="aph.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="getattributeappendix"></a>G. Code for Retrieving Attribute Value Example</h2></div></div><div></div></div><p>
-      </p><pre class="programlisting">
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;libxml/xmlmemory.h&gt;
-#include &lt;libxml/parser.h&gt;
-
-void
-getReference (xmlDocPtr doc, xmlNodePtr cur) {
-
-	xmlChar *uri;
-	cur = cur-&gt;xmlChildrenNode;
-	while (cur != NULL) {
-	    if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"reference"))) {
-		    uri = xmlGetProp(cur, "uri");
-		    printf("uri: %s\n", uri);
-		    xmlFree(uri);
-	    }
-	    cur = cur-&gt;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-&gt;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 &lt;= 1) {
-		printf("Usage: %s docname\n", argv[0]);
-		return(0);
-	}
-
-	docname = argv[1];
-	parseDoc (docname);
-	
-	return (1);
-}
-
-</pre><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apf.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="aph.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">F. Code for Add Attribute Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> H. Code for Encoding Conversion Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/aph.html b/doc/tutorial/aph.html
deleted file mode 100644
index ef46605..0000000
--- a/doc/tutorial/aph.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>H. Code for Encoding Conversion Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apg.html" title="G. Code for Retrieving Attribute Value Example"><link rel="next" href="api.html" title="I. Acknowledgements"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">H. Code for Encoding Conversion Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apg.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="convertappendix"></a>H. Code for Encoding Conversion Example</h2></div></div><div></div></div><p>
-      </p><pre class="programlisting">
-#include &lt;string.h&gt;
-#include &lt;libxml/parser.h&gt;
-
-
-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-&gt;input(out, &amp;out_size, in, &amp;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 &lt;= 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);
-}
-
-</pre><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apg.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">G. Code for Retrieving Attribute Value Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> I. Acknowledgements</td></tr></table></div></body></html>
diff --git a/doc/tutorial/api.html b/doc/tutorial/api.html
deleted file mode 100644
index 16e7981..0000000
--- a/doc/tutorial/api.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>I. Acknowledgements</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="aph.html" title="H. Code for Encoding Conversion Example"><link rel="next" href="ix01.html" title="Index"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">I. Acknowledgements</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="aph.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ix01.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2588597"></a>I. Acknowledgements</h2></div></div><div></div></div><p>A number of people have generously offered feedback, code and
-    suggested improvements to this tutorial. In no particular order:
-      <span class="simplelist">Daniel Veillard, Marcus Labib Iskander, Christopher R. Harris, Igor Zlatkovic, Niraj Tolia, David Turover</span>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="aph.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ix01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">H. Code for Encoding Conversion Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Index</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s02.html b/doc/tutorial/ar01s02.html
deleted file mode 100644
index 8aebcec..0000000
--- a/doc/tutorial/ar01s02.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Data Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="index.html" title="Libxml Tutorial"><link rel="next" href="ar01s03.html" title="Parsing the file"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Data Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s03.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialdatatypes"></a>Data Types</h2></div></div><div></div></div><p><span class="application">Libxml</span> 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.</p><p>
-      </p><div class="variablelist"><dl><dt><span class="term"><a class="indexterm" name="id2526186"></a>
-<a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLCHAR" target="_top">xmlChar</a></span></dt><dd><p>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 <span class="application">libxml's</span>
-	      functions. More information on encoding is available on the <a href="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/Encodings-support" target="_top"><span class="application">libxml</span> encoding support web page</a>.</p></dd><dt><span class="term"><a class="indexterm" name="id2526232"></a>
-	    <a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLDOC" target="_top">xmlDoc</a></span></dt><dd><p>A structure containing the tree created by a parsed doc. <a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLDOCPTR" target="_top">xmlDocPtr</a>
-	  is a pointer to the structure.</p></dd><dt><span class="term"><a class="indexterm" name="id2526266"></a>
-<a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNODEPTR" target="_top">xmlNodePtr</a>
-	    and <a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNODE" target="_top">xmlNode</a></span></dt><dd><p>A structure containing a single node. <a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNODEPTR" target="_top">xmlNodePtr</a>
-	  is a pointer to the structure, and is used in traversing the document tree.</p></dd></dl></div><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Libxml Tutorial </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Parsing the file</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s03.html b/doc/tutorial/ar01s03.html
deleted file mode 100644
index cd28fff..0000000
--- a/doc/tutorial/ar01s03.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Parsing the file</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s02.html" title="Data Types"><link rel="next" href="ar01s04.html" title="Retrieving Element Content"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Parsing the file</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s02.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s04.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialparsing"></a>Parsing the file</h2></div></div><div></div></div><p><a class="indexterm" name="fileparsing"></a>
-Parsing the file requires only the name of the file and a single
-      function call, plus error checking. Full code: <a href="apc.html" title="C. Code for Keyword Example">Appendix C, <i>Code for Keyword Example</i></a></p><p>
-    </p><pre class="programlisting">
-        <a name="declaredoc"></a><img src="images/callouts/1.png" alt="1" border="0"> xmlDocPtr doc;
-	<a name="declarenode"></a><img src="images/callouts/2.png" alt="2" border="0"> xmlNodePtr cur;
-
-	<a name="parsefile"></a><img src="images/callouts/3.png" alt="3" border="0"> doc = xmlParseFile(docname);
-	
-	<a name="checkparseerror"></a><img src="images/callouts/4.png" alt="4" border="0"> if (doc == NULL ) {
-		fprintf(stderr,"Document not parsed successfully. \n");
-		return;
-	}
-
-	<a name="getrootelement"></a><img src="images/callouts/5.png" alt="5" border="0"> cur = xmlDocGetRootElement(doc);
-	
-	<a name="checkemptyerror"></a><img src="images/callouts/6.png" alt="6" border="0"> if (cur == NULL) {
-		fprintf(stderr,"empty document\n");
-		xmlFreeDoc(doc);
-		return;
-	}
-	
-	<a name="checkroottype"></a><img src="images/callouts/7.png" alt="7" border="0"> if (xmlStrcmp(cur-&gt;name, (const xmlChar *) "story")) {
-		fprintf(stderr,"document of the wrong type, root node != story");
-		xmlFreeDoc(doc);
-		return;
-	}
-
-    </pre><p>
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#declaredoc"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>Declare the pointer that will point to your parsed document.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#declarenode"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>Declare a node pointer (you'll need this in order to
-	  interact with individual nodes).</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#checkparseerror"><img src="images/callouts/4.png" alt="4" border="0"></a> </td><td valign="top" align="left"><p>Check to see that the document was successfully parsed. If it
-	    was not, <span class="application">libxml</span> will at this point
-	    register an error and stop. 
-	    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p><a class="indexterm" name="id2525337"></a>
-One common example of an error at this point is improper
-	    handling of encoding. The <span class="acronym">XML</span> 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, <span class="application">libxml</span> will
-	    automatically perform the necessary conversion to UTF-8 for
-		you. More information on <span class="acronym">XML's</span> encoding
-		requirements is contained in the <a href="http://www.w3.org/TR/REC-xml#charencoding" target="_top">standard</a>.</p></td></tr></table></div><p>
-	  </p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#getrootelement"><img src="images/callouts/5.png" alt="5" border="0"></a> </td><td valign="top" align="left"><p>Retrieve the document's root element.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#checkemptyerror"><img src="images/callouts/6.png" alt="6" border="0"></a> </td><td valign="top" align="left"><p>Check to make sure the document actually contains something.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#checkroottype"><img src="images/callouts/7.png" alt="7" border="0"></a> </td><td valign="top" align="left"><p>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.</p></td></tr></table></div><p>
-      <a class="indexterm" name="id2525415"></a>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Data Types </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Retrieving Element Content</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s04.html b/doc/tutorial/ar01s04.html
deleted file mode 100644
index 1acad38..0000000
--- a/doc/tutorial/ar01s04.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Retrieving Element Content</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s03.html" title="Parsing the file"><link rel="next" href="ar01s05.html" title="Using XPath to Retrieve Element Content"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Retrieving Element Content</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s05.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialgettext"></a>Retrieving Element Content</h2></div></div><div></div></div><p><a class="indexterm" name="id2525439"></a>
-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 <tt class="varname">doc</tt>
-    and an xmlNodPtr called <tt class="varname">cur</tt>.</p><p>
-      </p><pre class="programlisting">
-	<a name="getchildnode"></a><img src="images/callouts/1.png" alt="1" border="0">cur = cur-&gt;xmlChildrenNode;
-	<a name="huntstoryinfo"></a><img src="images/callouts/2.png" alt="2" border="0">while (cur != NULL) {
-		if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"storyinfo"))){
-			parseStory (doc, cur);
-		}
-		 
-	cur = cur-&gt;next;
-	}
-      </pre><p>
-
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#getchildnode"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>Get the first child node of <tt class="varname">cur</tt>. At this
-	    point, <tt class="varname">cur</tt> points at the document root, which is
-	    the element "story".</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#huntstoryinfo"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>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 <span class="application">libxml</span> string
-	  comparison
-	    function, <tt class="function"><a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-parser.html#XMLSTRCMP" target="_top">xmlStrcmp</a></tt>. If there is a match, it calls the function <tt class="function">parseStory</tt>.</p></td></tr></table></div><p>
-    </p><p>
-      </p><pre class="programlisting">
-void
-parseStory (xmlDocPtr doc, xmlNodePtr cur) {
-
-	xmlChar *key;
-	<a name="anothergetchild"></a><img src="images/callouts/1.png" alt="1" border="0"> cur = cur-&gt;xmlChildrenNode;
-	<a name="findkeyword"></a><img src="images/callouts/2.png" alt="2" border="0"> while (cur != NULL) {
-	    if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"keyword"))) {
-	<a name="foundkeyword"></a><img src="images/callouts/3.png" alt="3" border="0">	    key = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
-		    printf("keyword: %s\n", key);
-		    xmlFree(key);
- 	    }
-	cur = cur-&gt;next;
-	}
-    return;
-}
-      </pre><p>
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#anothergetchild"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>Again we get the first child node.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#findkeyword"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>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".</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#foundkeyword"><img src="images/callouts/3.png" alt="3" border="0"></a> </td><td valign="top" align="left"><p>When we find the "keyword" element, we need to print
-	    its contents. Remember that in <span class="acronym">XML</span>, the text
-	    contained within an element is a child node of that element, so we
-	    turn to <tt class="varname">cur-&gt;xmlChildrenNode</tt>. To retrieve it, we
-	    use the function <tt class="function"><a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNODELISTGETSTRING" target="_top">xmlNodeListGetString</a></tt>, which also takes the <tt class="varname">doc</tt> pointer as an argument. In this case, we just print it out.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p>Because <tt class="function">xmlNodeListGetString</tt> allocates
-	      memory for the string it returns, you must use
-	      <tt class="function">xmlFree</tt> to free it.</p></td></tr></table></div></td></tr></table></div><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Parsing the file </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Using XPath to Retrieve Element Content</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s05.html b/doc/tutorial/ar01s05.html
deleted file mode 100644
index 919d454..0000000
--- a/doc/tutorial/ar01s05.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Using XPath to Retrieve Element Content</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s04.html" title="Retrieving Element Content"><link rel="next" href="ar01s06.html" title="Writing element content"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using XPath to Retrieve Element Content</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s04.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s06.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialxpath"></a>Using XPath to Retrieve Element Content</h2></div></div><div></div></div><p>In addition to walking the document tree to find an element,
-    <span class="application">Libxml2</span> includes support for
-      use of <span class="application">XPath</span> expressions to retrieve sets of
-      nodes that match a specified criteria. Full documentation of the
-      <span class="application">XPath</span> <span class="acronym">API</span> is <a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-xpath.html" target="_top">here</a>.
-    </p><p><span class="application">XPath</span> 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 <tt class="varname">keyword</tt>
-    elements.
-      </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p>A full discussion of <span class="application">XPath</span> is beyond
-	  the scope of this document. For details on its use, see the <a href="http://www.w3.org/TR/xpath" target="_top">XPath specification</a>.</p></td></tr></table></div><p>
-      Full code for this example is at <a href="apd.html" title="D. Code for XPath Example">Appendix D, <i>Code for XPath Example</i></a>.
-    </p><p>Using <span class="application">XPath</span> requires setting up an
-      xmlXPathContext and then supplying the <span class="application">XPath</span>
-      expression and the context to the
-      <tt class="function">xmlXPathEvalExpression</tt> function. The function returns
-      an xmlXPathObjectPtr, which includes the set of nodes satisfying the
-      <span class="application">XPath</span> expression.</p><p>
-      </p><pre class="programlisting">
-	xmlXPathObjectPtr
-	getnodeset (xmlDocPtr doc, xmlChar *xpath){
-	
-	<a name="cocontext"></a><img src="images/callouts/1.png" alt="1" border="0">xmlXPathContextPtr context;
-	xmlXPathObjectPtr result;
-
-	<a name="cocreatecontext"></a><img src="images/callouts/2.png" alt="2" border="0">context = xmlXPathNewContext(doc);
-	<a name="corunxpath"></a><img src="images/callouts/3.png" alt="3" border="0">result = xmlXPathEvalExpression(xpath, context);
-	<a name="cocheckxpathresult"></a><img src="images/callouts/4.png" alt="4" border="0">if(xmlXPathNodeSetIsEmpty(result-&gt;nodesetval)){
-		xmlXPathFreeObject(result);
-                printf("No result\n");
-		return NULL;
-      </pre><p>
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#cocontext"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>First we declare our variables.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#cocreatecontext"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>Initialize the <tt class="varname">context</tt> variable.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#corunxpath"><img src="images/callouts/3.png" alt="3" border="0"></a> </td><td valign="top" align="left"><p>Apply the <span class="application">XPath</span> expression.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#cocheckxpathresult"><img src="images/callouts/4.png" alt="4" border="0"></a> </td><td valign="top" align="left"><p>Check the result and free the memory allocated to
-	    <tt class="varname">result</tt> if no result is found.</p></td></tr></table></div><p>
-    </p><p>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
-    <tt class="varname">xmlXPathObjectPtr</tt>. We use it to print the contents of
-      <tt class="varname">keyword</tt> nodes in our document. The node set object
-      includes the number of elements in the set (<tt class="varname">nodeNr</tt>) and
-      an array of nodes (<tt class="varname">nodeTab</tt>):
-      </p><pre class="programlisting">
-	<a name="conodesetcounter"></a><img src="images/callouts/1.png" alt="1" border="0">for (i=0; i &lt; nodeset-&gt;nodeNr; i++) {
-	<a name="coprintkeywords"></a><img src="images/callouts/2.png" alt="2" border="0">keyword = xmlNodeListGetString(doc, nodeset-&gt;nodeTab[i]-&gt;xmlChildrenNode, 1);
-		printf("keyword: %s\n", keyword);
-	        xmlFree(keyword);
-	}
-      </pre><p>
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#conodesetcounter"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>The value of <tt class="varname">nodeset-&gt;Nr</tt> holds the number of
-	  elements in the node set. Here we use it to iterate through the array.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#coprintkeywords"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>Here we print the contents of each of the nodes returned.
-	    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p>Note that we are printing the child node of the node that is
-		returned, because the contents of the <tt class="varname">keyword</tt>
-		element are a child text node.</p></td></tr></table></div><p>
-	  </p></td></tr></table></div><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Retrieving Element Content </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Writing element content</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s06.html b/doc/tutorial/ar01s06.html
deleted file mode 100644
index c710b98..0000000
--- a/doc/tutorial/ar01s06.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Writing element content</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s05.html" title="Using XPath to Retrieve Element Content"><link rel="next" href="ar01s07.html" title="Writing Attribute"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing element content</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s05.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s07.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialwritingcontent"></a>Writing element content</h2></div></div><div></div></div><p><a class="indexterm" name="id2586968"></a>
-      Writing element content uses many of the same steps we used above
-      &#8212; 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:
-      <a href="ape.html" title="E. Code for Add Keyword Example">Appendix E, <i>Code for Add Keyword Example</i></a></p><p>
-      The main difference in this example is in
-      <tt class="function">parseStory</tt>:
-
-      </p><pre class="programlisting">
-void
-parseStory (xmlDocPtr doc, xmlNodePtr cur, char *keyword) {
-
-	<a name="addkeyword"></a><img src="images/callouts/1.png" alt="1" border="0"> xmlNewTextChild (cur, NULL, "keyword", keyword);
-    return;
-}
-      </pre><p>
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#addkeyword"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>The <tt class="function"><a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNEWTEXTCHILD" target="_top">xmlNewTextChild</a></tt>
-				     function adds a new child element at the
-				     current node pointer's location in the
-	    tree, specified by <tt class="varname">cur</tt>.</p></td></tr></table></div><p>
-         </p><p>
-      <a class="indexterm" name="id2587052"></a>
-      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.
-      </p><pre class="programlisting">
-	xmlSaveFormatFile (docname, doc, 1);
-      </pre><p>
-      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.
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using XPath to Retrieve Element Content </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Writing Attribute</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s07.html b/doc/tutorial/ar01s07.html
deleted file mode 100644
index 89e0bdb..0000000
--- a/doc/tutorial/ar01s07.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Writing Attribute</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s06.html" title="Writing element content"><link rel="next" href="ar01s08.html" title="Retrieving Attributes"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing Attribute</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s06.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s08.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialwritingattribute"></a>Writing Attribute</h2></div></div><div></div></div><p><a class="indexterm" name="id2587093"></a>
-Writing an attribute is similar to writing text to a new element. In
-      this case, we'll add a reference <span class="acronym">URI</span> to our
-      document. Full code:<a href="apf.html" title="F. Code for Add Attribute Example">Appendix F, <i>Code for Add Attribute Example</i></a>.</p><p>
-      A <tt class="sgmltag-element">reference</tt> is a child of the <tt class="sgmltag-element">story</tt>
-      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
-      <tt class="function">parseDoc</tt>, 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:
-      </p><pre class="programlisting">
-	xmlAttrPtr newattr;
-      </pre><p>
-      We also need an extra xmlNodePtr:
-      </p><pre class="programlisting">
-	xmlNodePtr newnode;
-      </pre><p>
-    </p><p>
-      The rest of <tt class="function">parseDoc</tt> is the same as before until we
-      check to see if our root element is <tt class="sgmltag-element">story</tt>. If it is,
-      then we know we are at the right spot to add our element:
-
-      </p><pre class="programlisting">
-	<a name="addreferencenode"></a><img src="images/callouts/1.png" alt="1" border="0"> newnode = xmlNewTextChild (cur, NULL, "reference", NULL);
-	<a name="addattributenode"></a><img src="images/callouts/2.png" alt="2" border="0"> newattr = xmlNewProp (newnode, "uri", uri);	
-      </pre><p>
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#addreferencenode"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>First we add a new node at the location of the current node
-	    pointer, <tt class="varname">cur.</tt> using the <a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNEWTEXTCHILD" target="_top">xmlNewTextChild</a> function.</p></td></tr></table></div><p>
-   </p><p>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.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Writing element content </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Retrieving Attributes</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s08.html b/doc/tutorial/ar01s08.html
deleted file mode 100644
index d0f227e..0000000
--- a/doc/tutorial/ar01s08.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Retrieving Attributes</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s07.html" title="Writing Attribute"><link rel="next" href="ar01s09.html" title="Encoding Conversion"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Retrieving Attributes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s07.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s09.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialattribute"></a>Retrieving Attributes</h2></div></div><div></div></div><p><a class="indexterm" name="id2587236"></a>
-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 <span class="acronym">URI</span> we added in the previous
-      section. Full code: <a href="apg.html" title="G. Code for Retrieving Attribute Value Example">Appendix G, <i>Code for Retrieving Attribute Value Example</i></a>.</p><p>
-      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
-      <tt class="function">getReference</tt>:
-      </p><pre class="programlisting">
-void
-getReference (xmlDocPtr doc, xmlNodePtr cur) {
-
-	xmlChar *uri;
-	cur = cur-&gt;xmlChildrenNode;
-	while (cur != NULL) {
-	    if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"reference"))) {
-		   <a name="getattributevalue"></a><img src="images/callouts/1.png" alt="1" border="0"> uri = xmlGetProp(cur, "uri");
-		    printf("uri: %s\n", uri);
-		    xmlFree(uri);
-	    }
-	    cur = cur-&gt;next;
-	}
-	return;
-}
-      </pre><p>
-    
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#getattributevalue"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>
-	    The key function is <tt class="function"><a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLGETPROP" target="_top">xmlGetProp</a></tt>, which returns an
-      <tt class="varname">xmlChar</tt> containing the attribute's value. In this case,
-					   we just print it out.
-      </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p>
-	  If you are using a <span class="acronym">DTD</span> that declares a fixed or
-	  default value for the attribute, this function will retrieve it.
-	</p></td></tr></table></div><p>
-	  </p></td></tr></table></div><p>
-     
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s07.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s09.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Writing Attribute </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Encoding Conversion</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s09.html b/doc/tutorial/ar01s09.html
deleted file mode 100644
index 2987add..0000000
--- a/doc/tutorial/ar01s09.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Encoding Conversion</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s08.html" title="Retrieving Attributes"><link rel="next" href="apa.html" title="A. Compilation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Encoding Conversion</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s08.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apa.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialconvert"></a>Encoding Conversion</h2></div></div><div></div></div><p><a class="indexterm" name="id2587348"></a>
-Data encoding compatibility problems are one of the most common
-      difficulties encountered by programmers new to <span class="acronym">XML</span> in
-      general and <span class="application">libxml</span> in particular. Thinking
-      through the design of your application in light of this issue will help
-      avoid difficulties later. Internally, <span class="application">libxml</span>
-      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 <span class="application">libxml</span>
-      functions. If you want your program's output in an encoding other than
-      UTF-8, you also must convert it.</p><p><span class="application">Libxml</span> uses
-      <span class="application">iconv</span> if it is available to convert
-    data. Without <span class="application">iconv</span>, only UTF-8, UTF-16 and
-    ISO-8859-1 can be used as external formats. With
-    <span class="application">iconv</span>, any format can be used provided
-    <span class="application">iconv</span> is able to convert it to and from
-    UTF-8. Currently <span class="application">iconv</span> 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
-    <span class="application">iconv</span> implementation is almost guaranteed to
-    support every format anyone has ever heard of.</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left">Warning</th></tr><tr><td colspan="2" align="left" valign="top"><p>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
-	<span class="application">libxml</span>, 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.
-      </p></td></tr></table></div><p>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 <tt class="filename">stdout</tt> 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: <a href="aph.html" title="H. Code for Encoding Conversion Example">Appendix H, <i>Code for Encoding Conversion Example</i></a></p><p>The conversion, encapsulated in the example code in the
-      <tt class="function">convert</tt> function, uses
-      <span class="application">libxml's</span>
-    <tt class="function">xmlFindCharEncodingHandler</tt> function:
-      </p><pre class="programlisting">
-	<a name="handlerdatatype"></a><img src="images/callouts/1.png" alt="1" border="0">xmlCharEncodingHandlerPtr handler;
-        <a name="calcsize"></a><img src="images/callouts/2.png" alt="2" border="0">size = (int)strlen(in)+1; 
-        out_size = size*2-1; 
-        out = malloc((size_t)out_size); 
-
-&#8230;
-	<a name="findhandlerfunction"></a><img src="images/callouts/3.png" alt="3" border="0">handler = xmlFindCharEncodingHandler(encoding);
-&#8230;
-	<a name="callconversionfunction"></a><img src="images/callouts/4.png" alt="4" border="0">handler-&gt;input(out, &amp;out_size, in, &amp;temp);
-&#8230;	
-	<a name="outputencoding"></a><img src="images/callouts/5.png" alt="5" border="0">xmlSaveFormatFileEnc("-", doc, encoding, 1);
-      </pre><p>
-      </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#handlerdatatype"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p><tt class="varname">handler</tt> is declared as a pointer to an
-	    <tt class="function">xmlCharEncodingHandler</tt> function.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#calcsize"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>The <tt class="function">xmlCharEncodingHandler</tt> function needs
-	  to be given the size of the input and output strings, which are
-	    calculated here for strings <tt class="varname">in</tt> and
-	  <tt class="varname">out</tt>.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#findhandlerfunction"><img src="images/callouts/3.png" alt="3" border="0"></a> </td><td valign="top" align="left"><p><tt class="function">xmlFindCharEncodingHandler</tt> takes as its
-	    argument the data's initial encoding and searches
-	    <span class="application">libxml's</span> built-in set of conversion
-	    handlers, returning a pointer to the function or NULL if none is
-	    found.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#callconversionfunction"><img src="images/callouts/4.png" alt="4" border="0"></a> </td><td valign="top" align="left"><p>The conversion function identified by <tt class="varname">handler</tt>
-	  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.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#outputencoding"><img src="images/callouts/5.png" alt="5" border="0"></a> </td><td valign="top" align="left"><p>To output in a specified encoding rather than UTF-8, we use
-	    <tt class="function">xmlSaveFormatFileEnc</tt>, specifying the
-	    encoding.</p></td></tr></table></div><p>
-    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s08.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apa.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Retrieving Attributes </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> A. Compilation</td></tr></table></div></body></html>
diff --git a/doc/tutorial/customfo.xsl b/doc/tutorial/customfo.xsl
deleted file mode 100644
index 1ea8247..0000000
--- a/doc/tutorial/customfo.xsl
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
-
-  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.61.2/fo/docbook.xsl" />
-
-<!-- don't display ulink targets in main text -->
-<xsl:param name="ulink.show">0</xsl:param>
-
-<!-- don't use graphics for callouts -->
-<xsl:param name="callout.unicode">1</xsl:param>
-<xsl:param name="callout.graphics">0</xsl:param>
-
-<!-- tighter margins -->
-<xsl:param name="page.margin.inner">2in</xsl:param>
-<xsl:param name="page.margin.outer">2in</xsl:param>
-
-<!-- enable pdf bookmarks -->
-<xsl:param name="fop.extensions">1</xsl:param>
-
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/doc/tutorial/customhtml.xsl b/doc/tutorial/customhtml.xsl
deleted file mode 100644
index 4837468..0000000
--- a/doc/tutorial/customhtml.xsl
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
-
-<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.61.2/html/chunk.xsl" />
-
-<!-- use callout graphics -->
-<xsl:param name="callout.graphics">1</xsl:param>
-
-<!-- use admonition graphics -->
-<xsl:param name="admon.graphics">1</xsl:param>
-<xsl:template match="revhistory"></xsl:template>
-<xsl:template match="revision"></xsl:template>
-<xsl:template match="revnumber"></xsl:template>
-
-<xsl:template match="revremark"></xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/doc/tutorial/images/blank.png b/doc/tutorial/images/blank.png
deleted file mode 100644
index 764bf4f..0000000
--- a/doc/tutorial/images/blank.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/1.png b/doc/tutorial/images/callouts/1.png
deleted file mode 100644
index 7d47343..0000000
--- a/doc/tutorial/images/callouts/1.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/10.png b/doc/tutorial/images/callouts/10.png
deleted file mode 100644
index 997bbc8..0000000
--- a/doc/tutorial/images/callouts/10.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/2.png b/doc/tutorial/images/callouts/2.png
deleted file mode 100644
index 5d09341..0000000
--- a/doc/tutorial/images/callouts/2.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/3.png b/doc/tutorial/images/callouts/3.png
deleted file mode 100644
index ef7b700..0000000
--- a/doc/tutorial/images/callouts/3.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/4.png b/doc/tutorial/images/callouts/4.png
deleted file mode 100644
index adb8364..0000000
--- a/doc/tutorial/images/callouts/4.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/5.png b/doc/tutorial/images/callouts/5.png
deleted file mode 100644
index 4d7eb46..0000000
--- a/doc/tutorial/images/callouts/5.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/6.png b/doc/tutorial/images/callouts/6.png
deleted file mode 100644
index 0ba694a..0000000
--- a/doc/tutorial/images/callouts/6.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/7.png b/doc/tutorial/images/callouts/7.png
deleted file mode 100644
index 472e96f..0000000
--- a/doc/tutorial/images/callouts/7.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/8.png b/doc/tutorial/images/callouts/8.png
deleted file mode 100644
index 5e60973..0000000
--- a/doc/tutorial/images/callouts/8.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/callouts/9.png b/doc/tutorial/images/callouts/9.png
deleted file mode 100644
index a0676d2..0000000
--- a/doc/tutorial/images/callouts/9.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/caution.png b/doc/tutorial/images/caution.png
deleted file mode 100644
index 5b7809c..0000000
--- a/doc/tutorial/images/caution.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/draft.png b/doc/tutorial/images/draft.png
deleted file mode 100644
index 0084708..0000000
--- a/doc/tutorial/images/draft.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/home.png b/doc/tutorial/images/home.png
deleted file mode 100644
index cbb711d..0000000
--- a/doc/tutorial/images/home.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/important.png b/doc/tutorial/images/important.png
deleted file mode 100644
index 12c90f6..0000000
--- a/doc/tutorial/images/important.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/next.png b/doc/tutorial/images/next.png
deleted file mode 100644
index 45835bf..0000000
--- a/doc/tutorial/images/next.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/note.png b/doc/tutorial/images/note.png
deleted file mode 100644
index d0c3c64..0000000
--- a/doc/tutorial/images/note.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/prev.png b/doc/tutorial/images/prev.png
deleted file mode 100644
index cf24654..0000000
--- a/doc/tutorial/images/prev.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/tip.png b/doc/tutorial/images/tip.png
deleted file mode 100644
index 5c4aab3..0000000
--- a/doc/tutorial/images/tip.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/toc-blank.png b/doc/tutorial/images/toc-blank.png
deleted file mode 100644
index 6ffad17..0000000
--- a/doc/tutorial/images/toc-blank.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/toc-minus.png b/doc/tutorial/images/toc-minus.png
deleted file mode 100644
index abbb020..0000000
--- a/doc/tutorial/images/toc-minus.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/toc-plus.png b/doc/tutorial/images/toc-plus.png
deleted file mode 100644
index 941312c..0000000
--- a/doc/tutorial/images/toc-plus.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/up.png b/doc/tutorial/images/up.png
deleted file mode 100644
index 07634de..0000000
--- a/doc/tutorial/images/up.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/images/warning.png b/doc/tutorial/images/warning.png
deleted file mode 100644
index 1c33db8..0000000
--- a/doc/tutorial/images/warning.png
+++ /dev/null
Binary files differ
diff --git a/doc/tutorial/includeaddattribute.c b/doc/tutorial/includeaddattribute.c
deleted file mode 100644
index bb6a18b..0000000
--- a/doc/tutorial/includeaddattribute.c
+++ /dev/null
@@ -1,64 +0,0 @@
-<![CDATA[
-#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);
-}
-]]>
diff --git a/doc/tutorial/includeaddkeyword.c b/doc/tutorial/includeaddkeyword.c
deleted file mode 100644
index 975168d..0000000
--- a/doc/tutorial/includeaddkeyword.c
+++ /dev/null
@@ -1,75 +0,0 @@
-<![CDATA[
-#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);
-}
-]]>
diff --git a/doc/tutorial/includeconvert.c b/doc/tutorial/includeconvert.c
deleted file mode 100644
index 482e56f..0000000
--- a/doc/tutorial/includeconvert.c
+++ /dev/null
@@ -1,73 +0,0 @@
-<![CDATA[
-#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);
-}
-]]>
diff --git a/doc/tutorial/includegetattribute.c b/doc/tutorial/includegetattribute.c
deleted file mode 100644
index b2b7471..0000000
--- a/doc/tutorial/includegetattribute.c
+++ /dev/null
@@ -1,72 +0,0 @@
-<![CDATA[
-#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);
-}
-]]>
diff --git a/doc/tutorial/includekeyword.c b/doc/tutorial/includekeyword.c
deleted file mode 100644
index e9bb467..0000000
--- a/doc/tutorial/includekeyword.c
+++ /dev/null
@@ -1,79 +0,0 @@
-<![CDATA[
-#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);
-}
-]]>
diff --git a/doc/tutorial/includestory.xml b/doc/tutorial/includestory.xml
deleted file mode 100644
index 2a22c89..0000000
--- a/doc/tutorial/includestory.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<![CDATA[
-<?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>
-]]>
\ No newline at end of file
diff --git a/doc/tutorial/includexpath.c b/doc/tutorial/includexpath.c
deleted file mode 100644
index 6b66e60..0000000
--- a/doc/tutorial/includexpath.c
+++ /dev/null
@@ -1,74 +0,0 @@
-<![CDATA[
-#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);
-}
-]]>
\ No newline at end of file
diff --git a/doc/tutorial/index.html b/doc/tutorial/index.html
deleted file mode 100644
index 8fb5897..0000000
--- a/doc/tutorial/index.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Libxml Tutorial</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="next" href="ar01s02.html" title="Data Types"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Libxml Tutorial</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s02.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2473660"></a>Libxml Tutorial</h1></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="surname">Fleck</span></h3></div></div><div><p class="copyright">Copyright © 2002, 2003 John Fleck</p></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="2"><b>Revision History</b></th></tr><tr><td align="left">Revision 1</td><td align="left">June 4, 2002</td></tr><tr><td align="left" colspan="2">Initial draft</td></tr><tr><td align="left">Revision 2</td><td align="left">June 12, 2002</td></tr><tr><td align="left" colspan="2">retrieving attribute value added</td></tr><tr><td align="left">Revision 3</td><td align="left">Aug. 31, 2002</td></tr><tr><td align="left" colspan="2">freeing memory fix</td></tr><tr><td align="left">Revision 4</td><td align="left">Nov. 10, 2002</td></tr><tr><td align="left" colspan="2">encoding discussion added</td></tr><tr><td align="left">Revision 5</td><td align="left">Dec. 15, 2002</td></tr><tr><td align="left" colspan="2">more memory freeing changes</td></tr><tr><td align="left">Revision 6</td><td align="left">Jan. 26. 2003</td></tr><tr><td align="left" colspan="2">add index</td></tr><tr><td align="left">Revision 7</td><td align="left">April 25, 2003</td></tr><tr><td align="left" colspan="2">add compilation appendix</td></tr><tr><td align="left">Revision 8</td><td align="left">July 24, 2003</td></tr><tr><td align="left" colspan="2">add XPath example</td></tr><tr><td align="left">Revision 9</td><td align="left">Feb. 14, 2004</td></tr><tr><td align="left" colspan="2">Fix bug in XPath example</td></tr><tr><td align="left">Revision 7</td><td align="left">Aug. 24, 2004</td></tr><tr><td align="left" colspan="2">Fix another bug in XPath example</td></tr></table></div></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="index.html#introduction">Introduction</a></dt><dt><a href="ar01s02.html">Data Types</a></dt><dt><a href="ar01s03.html">Parsing the file</a></dt><dt><a href="ar01s04.html">Retrieving Element Content</a></dt><dt><a href="ar01s05.html">Using XPath to Retrieve Element Content</a></dt><dt><a href="ar01s06.html">Writing element content</a></dt><dt><a href="ar01s07.html">Writing Attribute</a></dt><dt><a href="ar01s08.html">Retrieving Attributes</a></dt><dt><a href="ar01s09.html">Encoding Conversion</a></dt><dt>A. <a href="apa.html">Compilation</a></dt><dt>B. <a href="apb.html">Sample Document</a></dt><dt>C. <a href="apc.html">Code for Keyword Example</a></dt><dt>D. <a href="apd.html">Code for XPath Example</a></dt><dt>E. <a href="ape.html">Code for Add Keyword Example</a></dt><dt>F. <a href="apf.html">Code for Add Attribute Example</a></dt><dt>G. <a href="apg.html">Code for Retrieving Attribute Value Example</a></dt><dt>H. <a href="aph.html">Code for Encoding Conversion Example</a></dt><dt>I. <a href="api.html">Acknowledgements</a></dt></dl></div><div class="abstract"><p class="title"><b>Abstract</b></p><p>Libxml is a freely licensed C language library for handling
-    <span class="acronym">XML</span>, portable across a large number of platforms. This
-    tutorial provides examples of its basic functions.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introduction"></a>Introduction</h2></div></div><div></div></div><p>Libxml is a C language library implementing functions for reading,
-      creating and manipulating <span class="acronym">XML</span> data. This tutorial
-    provides example code and explanations of its basic functionality.</p><p>Libxml and more details about its use are available on <a href="https://gitlab.gnome.org/GNOME/libxml2" target="_top">the project home page</a>. Included there is complete <a href="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/general.html" target="_top">
-	<span class="acronym">API</span> documentation</a>. 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.
-
-</p><p>The tutorial is based on a simple <span class="acronym">XML</span> application I
-    use for articles I write. The format includes metadata and the body
-    of the article.</p><p>The example code in this tutorial demonstrates how to:
-      </p><div class="itemizedlist"><ul type="disc"><li><p>Parse the document.</p></li><li><p>Extract the text within a specified element.</p></li><li><p>Add an element and its content.</p></li><li><p>Add an attribute.</p></li><li><p>Extract the value of an attribute.</p></li></ul></div><p>
-    </p><p>Full code for the examples is included in the appendices.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Data Types</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ix01.html b/doc/tutorial/ix01.html
deleted file mode 100644
index fca9d42..0000000
--- a/doc/tutorial/ix01.html
+++ /dev/null
@@ -1 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Index</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="api.html" title="I. Acknowledgements"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Index</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a name="id2588704"></a>Index</h2></div></div><div></div></div><div class="index"><div class="indexdiv"><h3>A</h3><dl><dt>attribute</dt><dd><dl><dt>retrieving value, <a href="ar01s08.html">Retrieving Attributes</a></dt><dt>writing, <a href="ar01s07.html">Writing Attribute</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>C</h3><dl><dt>compiler flags, <a href="apa.html">Compilation</a></dt></dl></div><div class="indexdiv"><h3>E</h3><dl><dt>element</dt><dd><dl><dt>retrieving content, <a href="ar01s04.html">Retrieving Element Content</a></dt><dt>writing content, <a href="ar01s06.html">Writing element content</a></dt></dl></dd><dt>encoding, <a href="ar01s03.html">Parsing the file</a>, <a href="ar01s09.html">Encoding Conversion</a></dt></dl></div><div class="indexdiv"><h3>F</h3><dl><dt>file</dt><dd><dl><dt>parsing, <a href="ar01s03.html">Parsing the file</a>-<a href="ar01s03.html">Parsing the file</a></dt><dt>saving, <a href="ar01s06.html">Writing element content</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>X</h3><dl><dt>xmlChar, <a href="ar01s02.html">Data Types</a></dt><dt>xmlDoc, <a href="ar01s02.html">Data Types</a></dt><dt>xmlNodePtr, <a href="ar01s02.html">Data Types</a></dt></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">I. Acknowledgements </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/doc/tutorial/meson.build b/doc/tutorial/meson.build
deleted file mode 100644
index 96349d2..0000000
--- a/doc/tutorial/meson.build
+++ /dev/null
@@ -1,82 +0,0 @@
-
-tutorial_files = files(
-    'apa.html',
-    'apb.html',
-    'apc.html',
-    'apd.html',
-    'ape.html',
-    'apf.html',
-    'apg.html',
-    'aph.html',
-    'api.html',
-    'ar01s02.html',
-    'ar01s03.html',
-    'ar01s04.html',
-    'ar01s05.html',
-    'ar01s06.html',
-    'ar01s07.html',
-    'ar01s08.html',
-    'ar01s09.html',
-    'includeaddattribute.c',
-    'includeaddkeyword.c',
-    'includeconvert.c',
-    'includegetattribute.c',
-    'includekeyword.c',
-    'includexpath.c',
-    'index.html',
-    'ix01.html',
-)
-
-install_data(tutorial_files, install_dir: dir_doc / 'tutorial')
-
-tutorial_image_files = files(
-    'images/blank.png',
-    'images/caution.png',
-    'images/draft.png',
-    'images/home.png',
-    'images/important.png',
-    'images/next.png',
-    'images/note.png',
-    'images/prev.png',
-    'images/tip.png',
-    'images/toc-blank.png',
-    'images/toc-minus.png',
-    'images/toc-plus.png',
-    'images/up.png',
-    'images/warning.png',
-)
-
-install_data(tutorial_image_files, install_dir: dir_doc / 'tutorial' / 'images')
-
-tutorial_image_files = files(
-    'images/blank.png',
-    'images/caution.png',
-    'images/draft.png',
-    'images/home.png',
-    'images/important.png',
-    'images/next.png',
-    'images/note.png',
-    'images/prev.png',
-    'images/tip.png',
-    'images/toc-blank.png',
-    'images/toc-minus.png',
-    'images/toc-plus.png',
-    'images/up.png',
-    'images/warning.png',
-)
-
-install_data(tutorial_image_files, install_dir: dir_doc / 'tutorial' / 'images')
-tutorial_image_files = files(
-    'images/callouts/1.png',
-    'images/callouts/10.png',
-    'images/callouts/2.png',
-    'images/callouts/3.png',
-    'images/callouts/4.png',
-    'images/callouts/5.png',
-    'images/callouts/6.png',
-    'images/callouts/7.png',
-    'images/callouts/8.png',
-    'images/callouts/9.png',
-)
-
-install_data(tutorial_image_files, install_dir: dir_doc / 'tutorial' / 'images' / 'callouts')
diff --git a/doc/tutorial/xmltutorial.xml b/doc/tutorial/xmltutorial.xml
deleted file mode 100644
index 08bcd5b..0000000
--- a/doc/tutorial/xmltutorial.xml
+++ /dev/null
@@ -1,747 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
-<!ENTITY KEYWORD SYSTEM "includekeyword.c">
-<!ENTITY XPATH SYSTEM "includexpath.c">
-<!ENTITY STORY SYSTEM "includestory.xml">
-<!ENTITY ADDKEYWORD SYSTEM "includeaddkeyword.c">
-<!ENTITY ADDATTRIBUTE SYSTEM "includeaddattribute.c">
-<!ENTITY GETATTRIBUTE SYSTEM "includegetattribute.c">
-<!ENTITY CONVERT SYSTEM "includeconvert.c">
-]>
-<article lang="en">
-  <articleinfo>
-    <title>Libxml Tutorial</title>
-    <author>
-      <firstname>John</firstname>
-      <surname>Fleck</surname>
-      <email>jfleck@inkstain.net</email>
-    </author>
-    <copyright>
-      <year>2002, 2003</year>
-      <holder>John Fleck</holder>
-    </copyright>
-    <revhistory>
-      <revision>
-	<revnumber>1</revnumber>
-	<date>June 4, 2002</date>
-	<revremark>Initial draft</revremark>
-      </revision>
-      <revision>
-	<revnumber>2</revnumber>
-	<date>June 12, 2002</date>
-	<revremark>retrieving attribute value added</revremark>
-      </revision>
-      <revision>
-	<revnumber>3</revnumber>
-	<date>Aug. 31, 2002</date>
-	<revremark>freeing memory fix</revremark>
-      </revision>
-      <revision>
-	<revnumber>4</revnumber>
-	<date>Nov. 10, 2002</date>
-	<revremark>encoding discussion added</revremark>
-      </revision>
-      <revision>
-	<revnumber>5</revnumber>
-	<date>Dec. 15, 2002</date>
-	<revremark>more memory freeing changes</revremark>
-      </revision>
-      <revision>
-	<revnumber>6</revnumber>
-	<date>Jan. 26. 2003</date>
-	<revremark>add index</revremark>
-      </revision>
-      <revision>
-	<revnumber>7</revnumber>
-	<date>April 25, 2003</date>
-	<revremark>add compilation appendix</revremark>
-      </revision>
-      <revision>
-	<revnumber>8</revnumber>
-	<date>July 24, 2003</date>
-	<revremark>add XPath example</revremark>
-      </revision>
-      <revision>
-	<revnumber>9</revnumber>
-	<date>Feb. 14, 2004</date>
-	<revremark>Fix bug in XPath example</revremark>
-      </revision>
-      <revision>
-	<revnumber>7</revnumber>
-	<date>Aug. 24, 2004</date>
-	<revremark>Fix another bug in XPath example</revremark>
-      </revision>
-    </revhistory>
-  </articleinfo>
-  <abstract>
-    <para>Libxml is a freely licensed C language library for handling
-    <acronym>XML</acronym>, portable across a large number of platforms. This
-    tutorial provides examples of its basic functions.</para>
-  </abstract>
-  <sect1 id="introduction">
-    <title>Introduction</title>
-    <para>Libxml is a C language library implementing functions for reading,
-      creating and manipulating <acronym>XML</acronym> data. This tutorial
-    provides example code and explanations of its basic functionality.</para>
-    <para>Libxml and more details about its use are available on <ulink
-									url="https://gitlab.gnome.org/GNOME/libxml2">the project home page</ulink>. Included there is complete <ulink url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/general.html">
-	<acronym>API</acronym> documentation</ulink>. 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.
-<!--
- Links to
-      other resources can be found in <xref linkend="furtherresources" />.
--->
-</para>
-    <para>The tutorial is based on a simple <acronym>XML</acronym> application I
-    use for articles I write. The format includes metadata and the body
-    of the article.</para>
-    <para>The example code in this tutorial demonstrates how to:
-      <itemizedlist>
-	<listitem>
-	  <para>Parse the document.</para>
-	</listitem>
-	<listitem>
-	  <para>Extract the text within a specified element.</para>
-	</listitem>
-	<listitem>
-	  <para>Add an element and its content.</para>
-	</listitem>
-	<listitem>
-	  <para>Add an attribute.</para>
-	</listitem>      
-	<listitem>
-	  <para>Extract the value of an attribute.</para>
-	</listitem>
-      </itemizedlist>
-    </para>
-    <para>Full code for the examples is included in the appendices.</para>
-
-  </sect1>
-
-  <sect1 id="xmltutorialdatatypes">
-    <title>Data Types</title>
-    <para><application>Libxml</application> 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.</para>
-    <para>
-      <variablelist>
-	<varlistentry>
-	  <term><indexterm>
-	      <primary>xmlChar</primary>
-	    </indexterm>
-<ulink
-	  url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLCHAR">xmlChar</ulink></term>
-	  <listitem>
-	    <para>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 <application>libxml's</application>
-	      functions. More information on encoding is available on the <ulink
-		url="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/Encodings-support"><application>libxml</application> encoding support web page</ulink>.</para>
-	  </listitem>
-	</varlistentry>
-	<varlistentry>
-	  <term><indexterm>
-	      <primary>xmlDoc</primary>
-	    </indexterm>
-	    <ulink url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLDOC">xmlDoc</ulink></term>
-	  <listitem>
-	    <para>A structure containing the tree created by a parsed doc. <ulink
-	  url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLDOCPTR">xmlDocPtr</ulink>
-	  is a pointer to the structure.</para>
-	  </listitem>
-	</varlistentry>
-	<varlistentry>
-	  <term><indexterm>
-	      <primary>xmlNodePtr</primary>
-	    </indexterm>
-<ulink
-	  url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNODEPTR">xmlNodePtr</ulink>
-	    and <ulink url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNODE">xmlNode</ulink></term>
-	  <listitem>
-	    <para>A structure containing a single node. <ulink
-	  url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNODEPTR">xmlNodePtr</ulink>
-	  is a pointer to the structure, and is used in traversing the document tree.</para>
-	  </listitem>
-	</varlistentry>
-      </variablelist>
-    </para>
-
-  </sect1>
-
-  <sect1 id="xmltutorialparsing">
-    <title>Parsing the file</title>
-    <para><indexterm id="fileparsing" class="startofrange">
-	<primary>file</primary>
-	<secondary>parsing</secondary>
-      </indexterm>
-Parsing the file requires only the name of the file and a single
-      function call, plus error checking. Full code: <xref
-    linkend="keywordappendix" /></para>
-    <para>
-    <programlisting>
-        <co id="declaredoc" /> xmlDocPtr doc;
-	<co id="declarenode" /> xmlNodePtr cur;
-
-	<co id="parsefile" /> doc = xmlParseFile(docname);
-	
-	<co id="checkparseerror" /> if (doc == NULL ) {
-		fprintf(stderr,"Document not parsed successfully. \n");
-		return;
-	}
-
-	<co id="getrootelement" /> cur = xmlDocGetRootElement(doc);
-	
-	<co id="checkemptyerror" /> if (cur == NULL) {
-		fprintf(stderr,"empty document\n");
-		xmlFreeDoc(doc);
-		return;
-	}
-	
-	<co id="checkroottype" /> if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
-		fprintf(stderr,"document of the wrong type, root node != story");
-		xmlFreeDoc(doc);
-		return;
-	}
-
-    </programlisting>
-      <calloutlist>
-	<callout arearefs="declaredoc">
-	  <para>Declare the pointer that will point to your parsed document.</para>
-	</callout>
-	<callout arearefs="declarenode">
-	  <para>Declare a node pointer (you'll need this in order to
-	  interact with individual nodes).</para>
-	</callout>
-	<callout arearefs="checkparseerror">
-	  <para>Check to see that the document was successfully parsed. If it
-	    was not, <application>libxml</application> will at this point
-	    register an error and stop. 
-	    <note>
-	      <para><indexterm>
-		  <primary>encoding</primary>
-		</indexterm>
-One common example of an error at this point is improper
-	    handling of encoding. The <acronym>XML</acronym> 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, <application>libxml</application> will
-	    automatically perform the necessary conversion to UTF-8 for
-		you. More information on <acronym>XML's</acronym> encoding
-		requirements is contained in the <ulink
-		  url="http://www.w3.org/TR/REC-xml#charencoding">standard</ulink>.</para>
-	    </note>
-	  </para>
-	</callout>
-	<callout arearefs="getrootelement">
-	  <para>Retrieve the document's root element.</para>
-	</callout>
-	<callout arearefs="checkemptyerror">
-	  <para>Check to make sure the document actually contains something.</para>
-	</callout>
-	<callout arearefs="checkroottype">
-	  <para>In our case, we need to make sure the document is the right
-	  type. &quot;story&quot; is the root type of the documents used in this
-	  tutorial.</para>
-	</callout>
-      </calloutlist>
-      <indexterm startref="fileparsing" class="endofrange" />
-    </para>
-  </sect1>
-
-  <sect1 id="xmltutorialgettext">
-    <title>Retrieving Element Content</title>
-    <para><indexterm>
-	<primary>element</primary>
-	<secondary>retrieving content</secondary>
-      </indexterm>
-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 &quot;keyword&quot; contained within element called &quot;story&quot;. The
-    process to find the node we are interested in involves tediously walking the
-    tree. We assume you already have an xmlDocPtr called <varname>doc</varname>
-    and an xmlNodPtr called <varname>cur</varname>.</para>
-
-    <para>
-      <programlisting>
-	<co id="getchildnode" />cur = cur->xmlChildrenNode;
-	<co id="huntstoryinfo" />while (cur != NULL) {
-		if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){
-			parseStory (doc, cur);
-		}
-		 
-	cur = cur->next;
-	}
-      </programlisting>
-
-      <calloutlist>
-	<callout arearefs="getchildnode">
-	  <para>Get the first child node of <varname>cur</varname>. At this
-	    point, <varname>cur</varname> points at the document root, which is
-	    the element &quot;story&quot;.</para>
-	</callout>
-	<callout arearefs="huntstoryinfo">
-	  <para>This loop iterates through the elements that are children of
-	  &quot;story&quot;, looking for one called &quot;storyinfo&quot;. That
-	  is the element that will contain the &quot;keywords&quot; we are
-	    looking for. It uses the <application>libxml</application> string
-	  comparison
-	    function, <function><ulink
-				       url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-parser.html#XMLSTRCMP">xmlStrcmp</ulink></function>. If there is a match, it calls the function <function>parseStory</function>.</para>
-	</callout>
-      </calloutlist>
-    </para>
-
-    <para>
-      <programlisting>
-void
-parseStory (xmlDocPtr doc, xmlNodePtr cur) {
-
-	xmlChar *key;
-	<co id="anothergetchild" /> cur = cur->xmlChildrenNode;
-	<co id="findkeyword" /> while (cur != NULL) {
-	    if ((!xmlStrcmp(cur->name, (const xmlChar *)"keyword"))) {
-	<co id="foundkeyword" />	    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-		    printf("keyword: %s\n", key);
-		    xmlFree(key);
- 	    }
-	cur = cur->next;
-	}
-    return;
-}
-      </programlisting>
-      <calloutlist>
-	<callout arearefs="anothergetchild">
-	  <para>Again we get the first child node.</para>
-	</callout>
-	<callout arearefs="findkeyword">
-	  <para>Like the loop above, we then iterate through the nodes, looking
-	  for one that matches the element we're interested in, in this case
-	  &quot;keyword&quot;.</para>
-	</callout>
-	<callout arearefs="foundkeyword">
-	  <para>When we find the &quot;keyword&quot; element, we need to print
-	    its contents. Remember that in <acronym>XML</acronym>, the text
-	    contained within an element is a child node of that element, so we
-	    turn to <varname>cur-&gt;xmlChildrenNode</varname>. To retrieve it, we
-	    use the function <function><ulink
-					      url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNODELISTGETSTRING">xmlNodeListGetString</ulink></function>, which also takes the <varname>doc</varname> pointer as an argument. In this case, we just print it out.</para>
-	  <note>
-	    <para>Because <function>xmlNodeListGetString</function> allocates
-	      memory for the string it returns, you must use
-	      <function>xmlFree</function> to free it.</para>
-	  </note>
-	</callout>
-      </calloutlist>
-    </para>
-
-  </sect1>
-  <sect1 id="xmltutorialxpath">
-    <title>Using XPath to Retrieve Element Content</title>
-    <para>In addition to walking the document tree to find an element,
-    <application>Libxml2</application> includes support for
-      use of <application>XPath</application> expressions to retrieve sets of
-      nodes that match a specified criteria. Full documentation of the
-      <application>XPath</application> <acronym>API</acronym> is <ulink
-	url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-xpath.html">here</ulink>.
-    </para>
-    <para><application>XPath</application> 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 <varname>keyword</varname>
-    elements.
-      <note>
-	<para>A full discussion of <application>XPath</application> is beyond
-	  the scope of this document. For details on its use, see the <ulink
-	    url="http://www.w3.org/TR/xpath">XPath specification</ulink>.</para>
-      </note>
-      Full code for this example is at <xref linkend="xpathappendix" />.
-    </para>
-    <para>Using <application>XPath</application> requires setting up an
-      xmlXPathContext and then supplying the <application>XPath</application>
-      expression and the context to the
-      <function>xmlXPathEvalExpression</function> function. The function returns
-      an xmlXPathObjectPtr, which includes the set of nodes satisfying the
-      <application>XPath</application> expression.</para>
-    <para>
-      <programlisting>
-	xmlXPathObjectPtr
-	getnodeset (xmlDocPtr doc, xmlChar *xpath){
-	
-	<co id="cocontext" />xmlXPathContextPtr context;
-	xmlXPathObjectPtr result;
-
-	<co id="cocreatecontext" />context = xmlXPathNewContext(doc);
-	<co id="corunxpath" />result = xmlXPathEvalExpression(xpath, context);
-	<co id="cocheckxpathresult" />if(xmlXPathNodeSetIsEmpty(result->nodesetval)){
-		xmlXPathFreeObject(result);
-                printf("No result\n");
-		return NULL;
-      </programlisting>
-      <calloutlist>
-	<callout arearefs="cocontext">
-	  <para>First we declare our variables.</para>
-	</callout>
-	<callout arearefs="cocreatecontext">
-	  <para>Initialize the <varname>context</varname> variable.</para>
-	</callout>
-	<callout arearefs="corunxpath">
-	  <para>Apply the <application>XPath</application> expression.</para>
-	</callout>
-	<callout arearefs="cocheckxpathresult">
-	  <para>Check the result and free the memory allocated to
-	    <varname>result</varname> if no result is found.</para>
-	</callout>
-      </calloutlist>
-    </para>
-    <para>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
-    <varname>xmlXPathObjectPtr</varname>. We use it to print the contents of
-      <varname>keyword</varname> nodes in our document. The node set object
-      includes the number of elements in the set (<varname>nodeNr</varname>) and
-      an array of nodes (<varname>nodeTab</varname>):
-      <programlisting>
-	<co id="conodesetcounter" />for (i=0; i &lt; nodeset->nodeNr; i++) {
-	<co id="coprintkeywords" />keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode, 1);
-		printf("keyword: %s\n", keyword);
-	        xmlFree(keyword);
-	}
-      </programlisting>
-      <calloutlist>
-	<callout arearefs="conodesetcounter">
-	  <para>The value of <varname>nodeset->Nr</varname> holds the number of
-	  elements in the node set. Here we use it to iterate through the array.</para>
-	</callout>
-	<callout arearefs="coprintkeywords">
-	  <para>Here we print the contents of each of the nodes returned.
-	    <note>
-	      <para>Note that we are printing the child node of the node that is
-		returned, because the contents of the <varname>keyword</varname>
-		element are a child text node.</para>
-	    </note>
-	  </para>
-	</callout>
-      </calloutlist>
-    </para>
-  </sect1>
-<sect1 id="xmltutorialwritingcontent">
-    <title>Writing element content</title>
-    <para><indexterm>
-	<primary>element</primary>
-	<secondary>writing content</secondary>
-      </indexterm>
-      Writing element content uses many of the same steps we used above
-      &mdash; 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 &quot;storyinfo&quot; element and
-      this time insert a keyword. Then we'll write the file to disk. Full code:
-      <xref linkend="addkeywordappendix" /></para>
-    <para>
-      The main difference in this example is in
-      <function>parseStory</function>:
-
-      <programlisting>
-void
-parseStory (xmlDocPtr doc, xmlNodePtr cur, char *keyword) {
-
-	<co id="addkeyword" /> xmlNewTextChild (cur, NULL, "keyword", keyword);
-    return;
-}
-      </programlisting>
-      <calloutlist>
-	<callout arearefs="addkeyword">
-	  <para>The <function><ulink
-				     url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNEWTEXTCHILD">xmlNewTextChild</ulink></function>
-				     function adds a new child element at the
-				     current node pointer's location in the
-	    tree, specified by <varname>cur</varname>.</para>
-	</callout>
-      </calloutlist>
-         </para>
-
-    <para>
-      <indexterm>
-	<primary>file</primary>
-	<secondary>saving</secondary>
-      </indexterm>
-      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.
-      <programlisting>
-	xmlSaveFormatFile (docname, doc, 1);
-      </programlisting>
-      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.
-    </para>
-  </sect1>
-
-  <sect1 id="xmltutorialwritingattribute">
-    <title>Writing Attribute</title>
-    <para><indexterm>
-	<primary>attribute</primary>
-	<secondary>writing</secondary>
-      </indexterm>
-Writing an attribute is similar to writing text to a new element. In
-      this case, we'll add a reference <acronym>URI</acronym> to our
-      document. Full code:<xref linkend="addattributeappendix" />.</para>
-    <para>
-      A <sgmltag>reference</sgmltag> is a child of the <sgmltag>story</sgmltag>
-      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
-      <function>parseDoc</function>, 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:
-      <programlisting>
-	xmlAttrPtr newattr;
-      </programlisting>
-      We also need an extra xmlNodePtr:
-      <programlisting>
-	xmlNodePtr newnode;
-      </programlisting>
-    </para>
-    <para>
-      The rest of <function>parseDoc</function> is the same as before until we
-      check to see if our root element is <sgmltag>story</sgmltag>. If it is,
-      then we know we are at the right spot to add our element:
-
-      <programlisting>
-	<co id="addreferencenode" /> newnode = xmlNewTextChild (cur, NULL, "reference", NULL);
-	<co id="addattributenode" /> newattr = xmlNewProp (newnode, "uri", uri);	
-      </programlisting>
-      <calloutlist>
-	<callout arearefs="addreferencenode">
-	  <para>First we add a new node at the location of the current node
-	    pointer, <varname>cur.</varname> using the <ulink
-							      url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNEWTEXTCHILD">xmlNewTextChild</ulink> function.</para>
-	</callout>
-      </calloutlist>
-   </para>
-
-    <para>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.</para>
-
-  </sect1>
-
-  <sect1 id="xmltutorialattribute">
-    <title>Retrieving Attributes</title>
-    <para><indexterm>
-	<primary>attribute</primary>
-	<secondary>retrieving value</secondary>
-      </indexterm>
-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 <acronym>URI</acronym> we added in the previous
-      section. Full code: <xref linkend="getattributeappendix" />.</para>
-    <para>
-      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
-      <function>getReference</function>:
-      <programlisting>
-void
-getReference (xmlDocPtr doc, xmlNodePtr cur) {
-
-	xmlChar *uri;
-	cur = cur->xmlChildrenNode;
-	while (cur != NULL) {
-	    if ((!xmlStrcmp(cur->name, (const xmlChar *)"reference"))) {
-		   <co id="getattributevalue" /> uri = xmlGetProp(cur, "uri");
-		    printf("uri: %s\n", uri);
-		    xmlFree(uri);
-	    }
-	    cur = cur->next;
-	}
-	return;
-}
-      </programlisting>
-    
-      <calloutlist>
-	<callout arearefs="getattributevalue">
-	  <para>
-	    The key function is <function><ulink
-					   url="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLGETPROP">xmlGetProp</ulink></function>, which returns an
-      <varname>xmlChar</varname> containing the attribute's value. In this case,
-					   we just print it out.
-      <note>
-	<para>
-	  If you are using a <acronym>DTD</acronym> that declares a fixed or
-	  default value for the attribute, this function will retrieve it.
-	</para>
-	    </note>
-	  </para>
-	</callout>
-      </calloutlist>
-     
-    </para>
-  </sect1>
-
-  <sect1 id="xmltutorialconvert">
-    <title>Encoding Conversion</title>
-
-    <para><indexterm>
-	<primary>encoding</primary>
-      </indexterm>
-Data encoding compatibility problems are one of the most common
-      difficulties encountered by programmers new to <acronym>XML</acronym> in
-      general and <application>libxml</application> in particular. Thinking
-      through the design of your application in light of this issue will help
-      avoid difficulties later. Internally, <application>libxml</application>
-      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 <application>libxml</application>
-      functions. If you want your program's output in an encoding other than
-      UTF-8, you also must convert it.</para>
-
-      <para><application>Libxml</application> uses
-      <application>iconv</application> if it is available to convert
-    data. Without <application>iconv</application>, only UTF-8, UTF-16 and
-    ISO-8859-1 can be used as external formats. With
-    <application>iconv</application>, any format can be used provided
-    <application>iconv</application> is able to convert it to and from
-    UTF-8. Currently <application>iconv</application> 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
-    <application>iconv</application> implementation is almost guaranteed to
-    support every format anyone has ever heard of.</para>
-
-    <warning>
-      <para>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
-	<application>libxml</application>, 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.
-      </para>
-    </warning>
-
-    <para>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 <filename>stdout</filename> 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: <xref
-    linkend="convertappendix" /></para>
-
-    <para>The conversion, encapsulated in the example code in the
-      <function>convert</function> function, uses
-      <application>libxml's</application>
-    <function>xmlFindCharEncodingHandler</function> function:
-      <programlisting>
-	<co id="handlerdatatype" />xmlCharEncodingHandlerPtr handler;
-        <co id="calcsize" />size = (int)strlen(in)+1; 
-        out_size = size*2-1; 
-        out = malloc((size_t)out_size); 
-
-&hellip;
-	<co id="findhandlerfunction" />handler = xmlFindCharEncodingHandler(encoding);
-&hellip;
-	<co id="callconversionfunction" />handler->input(out, &amp;out_size, in, &amp;temp);
-&hellip;	
-	<co id="outputencoding" />xmlSaveFormatFileEnc("-", doc, encoding, 1);
-      </programlisting>
-      <calloutlist>
-	<callout arearefs="handlerdatatype">
-	  <para><varname>handler</varname> is declared as a pointer to an
-	    <function>xmlCharEncodingHandler</function> function.</para>
-	</callout>
-	<callout arearefs="calcsize">
-	  <para>The <function>xmlCharEncodingHandler</function> function needs
-	  to be given the size of the input and output strings, which are
-	    calculated here for strings <varname>in</varname> and
-	  <varname>out</varname>.</para>
-	</callout>
-	<callout arearefs="findhandlerfunction">
-	  <para><function>xmlFindCharEncodingHandler</function> takes as its
-	    argument the data's initial encoding and searches
-	    <application>libxml's</application> built-in set of conversion
-	    handlers, returning a pointer to the function or NULL if none is
-	    found.</para>
-	</callout>
-	<callout arearefs="callconversionfunction">
-	  <para>The conversion function identified by <varname>handler</varname>
-	  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.</para>
-	</callout>
-	<callout arearefs="outputencoding">
-	  <para>To output in a specified encoding rather than UTF-8, we use
-	    <function>xmlSaveFormatFileEnc</function>, specifying the
-	    encoding.</para>
-	</callout>
-      </calloutlist>
-    </para>
-  </sect1>
-
-  <appendix id="compilation">
-    <title>Compilation</title>
-    <para><indexterm>
-	<primary>compiler flags</primary>
-      </indexterm>
-      <application>Libxml</application> includes a script,
-    <application>xml2-config</application>, that can be used to generate
-    flags for compilation and linking of programs written with the
-      library. For pre-processor and compiler flags, use <command>xml2-config
-	--cflags</command>. For library linking flags, use <command>xml2-config
-	--libs</command>. Other options are available using <command>xml2-config
-    --help</command>.</para>   
-  </appendix>
-
-  <appendix id="sampledoc">
-    <title>Sample Document</title>
-    <programlisting>&STORY;</programlisting>
-  </appendix>
-  <appendix id="keywordappendix">
-    <title>Code for Keyword Example</title>
-    <para>
-      <programlisting>&KEYWORD;</programlisting>
-    </para>
-  </appendix>
-  <appendix id="xpathappendix">
-    <title>Code for XPath Example</title>
-    <para>
-      <programlisting>&XPATH;</programlisting>
-    </para>
-  </appendix>
-<appendix id="addkeywordappendix">
-    <title>Code for Add Keyword Example</title>
-    <para>
-      <programlisting>&ADDKEYWORD;</programlisting>
-    </para>
-  </appendix>
-<appendix id="addattributeappendix">
-    <title>Code for Add Attribute Example</title>
-    <para>
-      <programlisting>&ADDATTRIBUTE;</programlisting>
-    </para>
-  </appendix>
-<appendix id="getattributeappendix">
-    <title>Code for Retrieving Attribute Value Example</title>
-    <para>
-      <programlisting>&GETATTRIBUTE;</programlisting>
-    </para>
-  </appendix>
-  <appendix id="convertappendix">
-    <title>Code for Encoding Conversion Example</title>
-    <para>
-      <programlisting>&CONVERT;</programlisting>
-    </para>
-  </appendix>
-  <appendix>
-    <title>Acknowledgements</title>
-    <para>A number of people have generously offered feedback, code and
-    suggested improvements to this tutorial. In no particular order:
-      <simplelist type="inline">
-	<member>Daniel Veillard</member>
-	<member>Marcus Labib Iskander</member>
-	<member>Christopher R. Harris</member>
-	<member>Igor Zlatkovic</member>
-	<member>Niraj Tolia</member>
-	<member>David Turover</member>
-      </simplelist>
-    </para>
-  </appendix>
-  <index />
-</article>