diff options
Diffstat (limited to 'libxml2/doc/tutorial')
54 files changed, 3405 insertions, 0 deletions
diff --git a/libxml2/doc/tutorial/apa.html b/libxml2/doc/tutorial/apa.html new file mode 100644 index 0000000..964e15f --- /dev/null +++ b/libxml2/doc/tutorial/apa.html @@ -0,0 +1,8 @@ +<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/libxml2/doc/tutorial/apb.html b/libxml2/doc/tutorial/apb.html new file mode 100644 index 0000000..ef14066 --- /dev/null +++ b/libxml2/doc/tutorial/apb.html @@ -0,0 +1,14 @@ +<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"> +<?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> +</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/libxml2/doc/tutorial/apc.html b/libxml2/doc/tutorial/apc.html new file mode 100644 index 0000000..f8d9911 --- /dev/null +++ b/libxml2/doc/tutorial/apc.html @@ -0,0 +1,82 @@ +<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 <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); +} + +</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/libxml2/doc/tutorial/apd.html b/libxml2/doc/tutorial/apd.html new file mode 100644 index 0000000..8f9618d --- /dev/null +++ b/libxml2/doc/tutorial/apd.html @@ -0,0 +1,76 @@ +<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 <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); +} +</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/libxml2/doc/tutorial/ape.html b/libxml2/doc/tutorial/ape.html new file mode 100644 index 0000000..200319a --- /dev/null +++ b/libxml2/doc/tutorial/ape.html @@ -0,0 +1,78 @@ +<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 <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); +} + +</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/libxml2/doc/tutorial/apf.html b/libxml2/doc/tutorial/apf.html new file mode 100644 index 0000000..4848cdb --- /dev/null +++ b/libxml2/doc/tutorial/apf.html @@ -0,0 +1,67 @@ +<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 <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); +} + +</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/libxml2/doc/tutorial/apg.html b/libxml2/doc/tutorial/apg.html new file mode 100644 index 0000000..fffa0ee --- /dev/null +++ b/libxml2/doc/tutorial/apg.html @@ -0,0 +1,75 @@ +<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 <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); +} + +</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/libxml2/doc/tutorial/aph.html b/libxml2/doc/tutorial/aph.html new file mode 100644 index 0000000..ef46605 --- /dev/null +++ b/libxml2/doc/tutorial/aph.html @@ -0,0 +1,76 @@ +<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 <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); +} + +</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/libxml2/doc/tutorial/api.html b/libxml2/doc/tutorial/api.html new file mode 100644 index 0000000..16e7981 --- /dev/null +++ b/libxml2/doc/tutorial/api.html @@ -0,0 +1,4 @@ +<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/libxml2/doc/tutorial/ar01s02.html b/libxml2/doc/tutorial/ar01s02.html new file mode 100644 index 0000000..1e30a98 --- /dev/null +++ b/libxml2/doc/tutorial/ar01s02.html @@ -0,0 +1,14 @@ +<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="http://xmlsoft.org/html/libxml-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="http://www.xmlsoft.org/encoding.html" 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="http://xmlsoft.org/html/libxml-tree.html#XMLDOC" target="_top">xmlDoc</a></span></dt><dd><p>A structure containing the tree created by a parsed doc. <a href="http://xmlsoft.org/html/libxml-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="http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR" target="_top">xmlNodePtr</a> + and <a href="http://xmlsoft.org/html/libxml-tree.html#XMLNODE" target="_top">xmlNode</a></span></dt><dd><p>A structure containing a single node. <a href="http://xmlsoft.org/html/libxml-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/libxml2/doc/tutorial/ar01s03.html b/libxml2/doc/tutorial/ar01s03.html new file mode 100644 index 0000000..cd28fff --- /dev/null +++ b/libxml2/doc/tutorial/ar01s03.html @@ -0,0 +1,47 @@ +<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->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/libxml2/doc/tutorial/ar01s04.html b/libxml2/doc/tutorial/ar01s04.html new file mode 100644 index 0000000..11492eb --- /dev/null +++ b/libxml2/doc/tutorial/ar01s04.html @@ -0,0 +1,54 @@ +<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->xmlChildrenNode; + <a name="huntstoryinfo"></a><img src="images/callouts/2.png" alt="2" border="0">while (cur != NULL) { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){ + parseStory (doc, cur); + } + + cur = cur->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="http://xmlsoft.org/html/libxml-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->xmlChildrenNode; + <a name="findkeyword"></a><img src="images/callouts/2.png" alt="2" border="0"> while (cur != NULL) { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"keyword"))) { + <a name="foundkeyword"></a><img src="images/callouts/3.png" alt="3" border="0"> key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + printf("keyword: %s\n", key); + xmlFree(key); + } + cur = cur->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->xmlChildrenNode</tt>. To retrieve it, we + use the function <tt class="function"><a href="http://xmlsoft.org/html/libxml-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/libxml2/doc/tutorial/ar01s05.html b/libxml2/doc/tutorial/ar01s05.html new file mode 100644 index 0000000..1c40925 --- /dev/null +++ b/libxml2/doc/tutorial/ar01s05.html @@ -0,0 +1,55 @@ +<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="http://xmlsoft.org/html/libxml-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->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 < nodeset->nodeNr; i++) { + <a name="coprintkeywords"></a><img src="images/callouts/2.png" alt="2" border="0">keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->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->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/libxml2/doc/tutorial/ar01s06.html b/libxml2/doc/tutorial/ar01s06.html new file mode 100644 index 0000000..c09e6ef --- /dev/null +++ b/libxml2/doc/tutorial/ar01s06.html @@ -0,0 +1,35 @@ +<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 + — 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="http://xmlsoft.org/html/libxml-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/libxml2/doc/tutorial/ar01s07.html b/libxml2/doc/tutorial/ar01s07.html new file mode 100644 index 0000000..fd5c4dd --- /dev/null +++ b/libxml2/doc/tutorial/ar01s07.html @@ -0,0 +1,30 @@ +<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="http://xmlsoft.org/html/libxml-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/libxml2/doc/tutorial/ar01s08.html b/libxml2/doc/tutorial/ar01s08.html new file mode 100644 index 0000000..758f811 --- /dev/null +++ b/libxml2/doc/tutorial/ar01s08.html @@ -0,0 +1,38 @@ +<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->xmlChildrenNode; + while (cur != NULL) { + if ((!xmlStrcmp(cur->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->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="http://xmlsoft.org/html/libxml-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/libxml2/doc/tutorial/ar01s09.html b/libxml2/doc/tutorial/ar01s09.html new file mode 100644 index 0000000..2987add --- /dev/null +++ b/libxml2/doc/tutorial/ar01s09.html @@ -0,0 +1,63 @@ +<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); + +… + <a name="findhandlerfunction"></a><img src="images/callouts/3.png" alt="3" border="0">handler = xmlFindCharEncodingHandler(encoding); +… + <a name="callconversionfunction"></a><img src="images/callouts/4.png" alt="4" border="0">handler->input(out, &out_size, in, &temp); +… + <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/libxml2/doc/tutorial/customfo.xsl b/libxml2/doc/tutorial/customfo.xsl new file mode 100644 index 0000000..1ea8247 --- /dev/null +++ b/libxml2/doc/tutorial/customfo.xsl @@ -0,0 +1,22 @@ +<?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/libxml2/doc/tutorial/customhtml.xsl b/libxml2/doc/tutorial/customhtml.xsl new file mode 100644 index 0000000..4837468 --- /dev/null +++ b/libxml2/doc/tutorial/customhtml.xsl @@ -0,0 +1,18 @@ +<?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/libxml2/doc/tutorial/images/blank.png b/libxml2/doc/tutorial/images/blank.png Binary files differnew file mode 100644 index 0000000..764bf4f --- /dev/null +++ b/libxml2/doc/tutorial/images/blank.png diff --git a/libxml2/doc/tutorial/images/callouts/1.png b/libxml2/doc/tutorial/images/callouts/1.png Binary files differnew file mode 100644 index 0000000..7d47343 --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/1.png diff --git a/libxml2/doc/tutorial/images/callouts/10.png b/libxml2/doc/tutorial/images/callouts/10.png Binary files differnew file mode 100644 index 0000000..997bbc8 --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/10.png diff --git a/libxml2/doc/tutorial/images/callouts/2.png b/libxml2/doc/tutorial/images/callouts/2.png Binary files differnew file mode 100644 index 0000000..5d09341 --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/2.png diff --git a/libxml2/doc/tutorial/images/callouts/3.png b/libxml2/doc/tutorial/images/callouts/3.png Binary files differnew file mode 100644 index 0000000..ef7b700 --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/3.png diff --git a/libxml2/doc/tutorial/images/callouts/4.png b/libxml2/doc/tutorial/images/callouts/4.png Binary files differnew file mode 100644 index 0000000..adb8364 --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/4.png diff --git a/libxml2/doc/tutorial/images/callouts/5.png b/libxml2/doc/tutorial/images/callouts/5.png Binary files differnew file mode 100644 index 0000000..4d7eb46 --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/5.png diff --git a/libxml2/doc/tutorial/images/callouts/6.png b/libxml2/doc/tutorial/images/callouts/6.png Binary files differnew file mode 100644 index 0000000..0ba694a --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/6.png diff --git a/libxml2/doc/tutorial/images/callouts/7.png b/libxml2/doc/tutorial/images/callouts/7.png Binary files differnew file mode 100644 index 0000000..472e96f --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/7.png diff --git a/libxml2/doc/tutorial/images/callouts/8.png b/libxml2/doc/tutorial/images/callouts/8.png Binary files differnew file mode 100644 index 0000000..5e60973 --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/8.png diff --git a/libxml2/doc/tutorial/images/callouts/9.png b/libxml2/doc/tutorial/images/callouts/9.png Binary files differnew file mode 100644 index 0000000..a0676d2 --- /dev/null +++ b/libxml2/doc/tutorial/images/callouts/9.png diff --git a/libxml2/doc/tutorial/images/caution.png b/libxml2/doc/tutorial/images/caution.png Binary files differnew file mode 100644 index 0000000..5b7809c --- /dev/null +++ b/libxml2/doc/tutorial/images/caution.png diff --git a/libxml2/doc/tutorial/images/draft.png b/libxml2/doc/tutorial/images/draft.png Binary files differnew file mode 100644 index 0000000..0084708 --- /dev/null +++ b/libxml2/doc/tutorial/images/draft.png diff --git a/libxml2/doc/tutorial/images/home.png b/libxml2/doc/tutorial/images/home.png Binary files differnew file mode 100644 index 0000000..cbb711d --- /dev/null +++ b/libxml2/doc/tutorial/images/home.png diff --git a/libxml2/doc/tutorial/images/important.png b/libxml2/doc/tutorial/images/important.png Binary files differnew file mode 100644 index 0000000..12c90f6 --- /dev/null +++ b/libxml2/doc/tutorial/images/important.png diff --git a/libxml2/doc/tutorial/images/next.png b/libxml2/doc/tutorial/images/next.png Binary files differnew file mode 100644 index 0000000..45835bf --- /dev/null +++ b/libxml2/doc/tutorial/images/next.png diff --git a/libxml2/doc/tutorial/images/note.png b/libxml2/doc/tutorial/images/note.png Binary files differnew file mode 100644 index 0000000..d0c3c64 --- /dev/null +++ b/libxml2/doc/tutorial/images/note.png diff --git a/libxml2/doc/tutorial/images/prev.png b/libxml2/doc/tutorial/images/prev.png Binary files differnew file mode 100644 index 0000000..cf24654 --- /dev/null +++ b/libxml2/doc/tutorial/images/prev.png diff --git a/libxml2/doc/tutorial/images/tip.png b/libxml2/doc/tutorial/images/tip.png Binary files differnew file mode 100644 index 0000000..5c4aab3 --- /dev/null +++ b/libxml2/doc/tutorial/images/tip.png diff --git a/libxml2/doc/tutorial/images/toc-blank.png b/libxml2/doc/tutorial/images/toc-blank.png Binary files differnew file mode 100644 index 0000000..6ffad17 --- /dev/null +++ b/libxml2/doc/tutorial/images/toc-blank.png diff --git a/libxml2/doc/tutorial/images/toc-minus.png b/libxml2/doc/tutorial/images/toc-minus.png Binary files differnew file mode 100644 index 0000000..abbb020 --- /dev/null +++ b/libxml2/doc/tutorial/images/toc-minus.png diff --git a/libxml2/doc/tutorial/images/toc-plus.png b/libxml2/doc/tutorial/images/toc-plus.png Binary files differnew file mode 100644 index 0000000..941312c --- /dev/null +++ b/libxml2/doc/tutorial/images/toc-plus.png diff --git a/libxml2/doc/tutorial/images/up.png b/libxml2/doc/tutorial/images/up.png Binary files differnew file mode 100644 index 0000000..07634de --- /dev/null +++ b/libxml2/doc/tutorial/images/up.png diff --git a/libxml2/doc/tutorial/images/warning.png b/libxml2/doc/tutorial/images/warning.png Binary files differnew file mode 100644 index 0000000..1c33db8 --- /dev/null +++ b/libxml2/doc/tutorial/images/warning.png diff --git a/libxml2/doc/tutorial/includeaddattribute.c b/libxml2/doc/tutorial/includeaddattribute.c new file mode 100644 index 0000000..bb6a18b --- /dev/null +++ b/libxml2/doc/tutorial/includeaddattribute.c @@ -0,0 +1,64 @@ +<![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/libxml2/doc/tutorial/includeaddkeyword.c b/libxml2/doc/tutorial/includeaddkeyword.c new file mode 100644 index 0000000..975168d --- /dev/null +++ b/libxml2/doc/tutorial/includeaddkeyword.c @@ -0,0 +1,75 @@ +<![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/libxml2/doc/tutorial/includeconvert.c b/libxml2/doc/tutorial/includeconvert.c new file mode 100644 index 0000000..482e56f --- /dev/null +++ b/libxml2/doc/tutorial/includeconvert.c @@ -0,0 +1,73 @@ +<![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/libxml2/doc/tutorial/includegetattribute.c b/libxml2/doc/tutorial/includegetattribute.c new file mode 100644 index 0000000..b2b7471 --- /dev/null +++ b/libxml2/doc/tutorial/includegetattribute.c @@ -0,0 +1,72 @@ +<![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/libxml2/doc/tutorial/includekeyword.c b/libxml2/doc/tutorial/includekeyword.c new file mode 100644 index 0000000..e9bb467 --- /dev/null +++ b/libxml2/doc/tutorial/includekeyword.c @@ -0,0 +1,79 @@ +<![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/libxml2/doc/tutorial/includestory.xml b/libxml2/doc/tutorial/includestory.xml new file mode 100644 index 0000000..2a22c89 --- /dev/null +++ b/libxml2/doc/tutorial/includestory.xml @@ -0,0 +1,14 @@ +<![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/libxml2/doc/tutorial/includexpath.c b/libxml2/doc/tutorial/includexpath.c new file mode 100644 index 0000000..6b66e60 --- /dev/null +++ b/libxml2/doc/tutorial/includexpath.c @@ -0,0 +1,74 @@ +<![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/libxml2/doc/tutorial/index.html b/libxml2/doc/tutorial/index.html new file mode 100644 index 0000000..51fd481 --- /dev/null +++ b/libxml2/doc/tutorial/index.html @@ -0,0 +1,14 @@ +<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="http://www.xmlsoft.org/" target="_top">the project home page</a>. Included there is complete <a href="http://xmlsoft.org/html/libxml-lib.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/libxml2/doc/tutorial/ix01.html b/libxml2/doc/tutorial/ix01.html new file mode 100644 index 0000000..fca9d42 --- /dev/null +++ b/libxml2/doc/tutorial/ix01.html @@ -0,0 +1 @@ +<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/libxml2/doc/tutorial/xmltutorial.pdf b/libxml2/doc/tutorial/xmltutorial.pdf new file mode 100644 index 0000000..967d445 --- /dev/null +++ b/libxml2/doc/tutorial/xmltutorial.pdf @@ -0,0 +1,1336 @@ +%PDF-1.3 +%ª«¬ +4 0 obj +<< /Type /Info +/Producer (FOP 0.20.5) >> +endobj +5 0 obj +<< /Length 1748 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gb"/*>Edeu'RnB3cso,c'tRV<@2QG"Te1sI,sZ*n#KKlNVMQ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X;g2g1^GaWe,."f<Z*X"^Ya?i2%8I6fN9J#r2iKGoom91+Os`\R'=pEQOgA/h`u^U<s$,"p=U^Ksck/%*3sYDJpf-S,B8":bJs5_!krpr44uPMaD:C7&(hPhHQK_IG&[@W\]@:&U2`1u#r9:g`-]8n7b@-u@A9iV6?&#s[;]5e"4UdB6qSXPPL-l/,L"L$5aSa]?LYMN6(@@R"?A<n+G]^6)SF=NJP[6=s^W9lnL6L`-nZBNPTB3?F\8$LUEQ74;&(dRT7AE8hase`F5)b<2_e;\1Wr/aMUVD@N9hgS$\LF(ih:9EQGof$TjN*3M0mi9'Hh;7*B_XM"3,n.tf,m:'pMB[[p%hS0kCZq^%2W]_E6<1X4H)h+#J.A0kOpYtT3`f4"ks8Wg2IK9F/SBsr*be4ce7Bq,]SL214R->\E*6Km3M;^8S1^,jb5M4kL$muHb\#!ZDs2A'bm;94ZWTnMuE=%!9!G)bJEiSMujhEeJoj\[m_?-@s8c*.C1268G+TV1+An"dq!66BOQ/uWk*6"Zr]hpdqsAYX6mH:4q,p%/mN/clgm6_*Vk"=D&P?A)R&GV[-;l5h5dH^[E8!6^<odeltSHSZbE8>O+q)a!Ngs^]Q]QTYaG>BGrFu<d3N?cpcWuA;ji)u%bdDTfKSgY^PE!j~> +endstream +endobj +6 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 5 0 R +/Annots 7 0 R +>> +endobj +7 0 obj +[ +8 0 R +10 0 R +12 0 R +14 0 R +16 0 R +18 0 R +20 0 R +22 0 R +24 0 R +26 0 R +28 0 R +30 0 R +32 0 R +34 0 R +36 0 R +38 0 R +40 0 R +42 0 R +] +endobj +8 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 336.111 193.44 326.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 9 0 R +/H /I +>> +endobj +10 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 325.111 189.82 315.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 11 0 R +/H /I +>> +endobj +12 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 314.111 204.55 304.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 13 0 R +/H /I +>> +endobj +14 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 303.111 256.22 293.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 15 0 R +/H /I +>> +endobj +16 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 292.111 312.05 282.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 17 0 R +/H /I +>> +endobj +18 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 281.111 241.21 271.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 19 0 R +/H /I +>> +endobj +20 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 270.111 213.72 260.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 21 0 R +/H /I +>> +endobj +22 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 259.111 228.72 249.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 23 0 R +/H /I +>> +endobj +24 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 248.111 230.94 238.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 25 0 R +/H /I +>> +endobj +26 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 237.111 206.23 227.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 27 0 R +/H /I +>> +endobj +28 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 226.111 229.83 216.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 29 0 R +/H /I +>> +endobj +30 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 215.111 268.7 205.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 31 0 R +/H /I +>> +endobj +32 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 204.111 257.04 194.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 33 0 R +/H /I +>> +endobj +34 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 193.111 287.86 183.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 35 0 R +/H /I +>> +endobj +36 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 182.111 286.21 172.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 37 0 R +/H /I +>> +endobj +38 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 171.111 339.25 161.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 39 0 R +/H /I +>> +endobj +40 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 160.111 318.98 150.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 41 0 R +/H /I +>> +endobj +42 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 149.111 231.76 139.111 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 43 0 R +/H /I +>> +endobj +44 0 obj +<< /Length 1970 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat=,=c_>r%"@)@iO:/L`pnKL/_:&.,f(7`!X7:ABPbqR$=B([4oTk@OWIA+4)'QU(?B+bQUm"&pP5fY2lRStIc)5A=+PRF'mbH1$b\5c1meN1+6MFRp&93T.bTmCC[Xt;`dSL&60,^g0&&(*cX!K=g*;q:et62rBUCjRZ5n?05Ff\bT:/_4"`%09AcElf^08^P=?A?TFKJcGeUf"b7J5C3b<,X-$:\'NQXH>\Y#;"_As:Kf[l:Q."b%M*F!R*3AN'##69g9!fQc."g"2G@I+`7q@&5U'r$"^?k@\d^C1kkf4S(@Gq.OJSaUa\R=EctaF!:u9N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<.P9r>ZAaTcL,fGt;[+lkrH>\r;ljeq11PAF>FXedJZ;>Z&l)EkXRIf\Ha:#=XgB)1-Z]&q+"bP*.A&V'C_X"L7PlNNX?lVp91%H1n=Yn]oa#3@,Ib&J[LZUmFMg?jPE<d\/1a1,)43pUJL'!U:k-5^fU2O7aeW0H30-qo@UJVU".\R_(kJpt5t[X9Qu^t[YHu=Ta@'0d/9)ao#T9=,6WZ[Q=kXMZ<o\djdkLDl=l>Da2sgp0db=<KQVs1c:5sYfk;k$^]N@cO.^D)43q]@B:%2`rBYI!)kcdh`L:nWGam!h[g7/>,c^&1/*9LC9rV/n?;UW_\>iXRc"`1qPj8u)8'H'Dq?7ZQ\j`KtH<>V9O@M`ZPm(VaoFUW4Y&A;KK>o#o*Rsd0gnWrK?R;#r`((7;dH8YnLcA1=o[9G:t<a.Y&L@7IY_(GP_(D-Bt^-#/@,`r<3,*+QK*ghjUf0g0<',[`X_M8_Pl%i$4Y8B9;GIB2!SBeR,"O$R653oR^1?-dAl6#f['7TFEF>*4EBVooVn0Ia'=2/(T5?Q`5l'GhY<u.-0"78nd$4`D8_j1dLI/Igr\aBIoS`qLM5I,n?"VGl9*r~> +endstream +endobj +45 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 44 0 R +/Annots 46 0 R +>> +endobj +46 0 obj +[ +47 0 R +48 0 R +49 0 R +50 0 R +51 0 R +52 0 R +53 0 R +54 0 R +55 0 R +56 0 R +57 0 R +] +endobj +47 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 384.46 600.674 473.05 590.674 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://www.xmlsoft.org/) +/S /URI >> +/H /I +>> +endobj +48 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 253.694 589.674 331.744 579.674 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-lib.html) +/S /URI >> +/H /I +>> +endobj +49 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 251.348 179.0 241.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLCHAR) +/S /URI >> +/H /I +>> +endobj +50 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 352.782 207.348 469.722 197.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://www.xmlsoft.org/encoding.html) +/S /URI >> +/H /I +>> +endobj +51 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 264.0 196.348 282.88 186.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://www.xmlsoft.org/encoding.html) +/S /URI >> +/H /I +>> +endobj +52 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 175.348 176.22 165.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLDOC) +/S /URI >> +/H /I +>> +endobj +53 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 283.44 164.348 327.33 154.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLDOCPTR) +/S /URI >> +/H /I +>> +endobj +54 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 143.348 192.89 133.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR) +/S /URI >> +/H /I +>> +endobj +55 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 212.33 143.348 231.22 133.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODE) +/S /URI >> +/H /I +>> +endobj +56 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 132.348 165.66 122.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODE) +/S /URI >> +/H /I +>> +endobj +57 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 424.512 143.348 473.402 133.348 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR) +/S /URI >> +/H /I +>> +endobj +58 0 obj +<< /Length 2255 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat$:CN%rcn9]V<QS2'gK[]h'@0>)f)7lYMf=BOaGonl2NeL#u91a,^@K1brQZuE0=@IajGN?FZ4NajnBA_M>$dU!$+"`eJ1M:]Ojt7YKEu/OYS42f>`:;<qZ<I0KnKHpe;;]&l>^:<_db'E9`C7D86c>iM!V?%pq(j]8(TmjVJ@/hO"p#j@3$Cj)4QYlBcgm<Nib'B/5Bd:/NQ&-54A:jf=bS!,R3a#Wf*JTRTcu\0l0>o5=D]d<<gK'fgm)0?*AK<5MQQE5F2eA\-ldAlDeXY2P))Q_FCg:=YVlC1Jj8[HZsFQ0(3=oWHTui9I37GdGXDqCJYOOK?u:@dLHX[5Mg4i\<BCn%2g?8!e.X`d0aTup@HBpT:Qdo8n=5RcacPSg.UTO[6S"CX*%?6Zo'^/rG%2.R<cC/g0I?h:n%g.Laa(p>8.JRsJY8>L4/XA88AID>np@tONC8KI)bAGC3$m"!ol?'^:h?4-6L<"E#a5rAX2ShL+&_V,VqYEtn>0Fj43E%+&Ekf?Li<4)g$teS2lhk6>sg2KSjV/BMUnok;DSIBKIbUhDRqs.9s]Bp3=r"*W]mmU)T`L'&is2[VesK?nNlQW+<cjRc[RbKm3O#Hrq9t!)j<OY9k=<LjX8c2A?:2X;W/Z7O*OmdUr7>U<rNN00Zc!VL,t@#i,n=<1aRT)'mj-Og;BTCAL]eYbTKJKOP&R+iKSr#7d_/A`$pPU)$pjB.>ahq#nVnFM-</`g=6:gTrZ"uhcl[R46c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X&Um,5l9DM1rF-+I/MI1:QNW$l+\1L4_)/6h=R]Z<\a=T!/]n6siV>iN<YTOsdC>LcOJ+n?Na8g7&Y@WgLo39FL'PQ9aFr<B9Pgi,+VjWCnUC:g?D-\Wu6#?F%8"u58.Cq,\GE/#2BMY=Zn/Y:2=as\XC7R;)2NAh,3DJTY?^hIJcVHjW?%]U>##"lo'oaIMH0MX/E.nHkg4Ja0!6:N$p!WhL5inlikLtQKUXVR8#9Lh=1YEJL(oo\t'U@@iK;.<GO@n;Kg/>=#g<Q.HZ7SRqBJ<<]6Zkf?j*k>=V3+>Aj=?H/_SNohk*67B;HjI&#_:l42+^]%"B)M<=5DK%T79CZ_=P(W3NMU6`#oPccelH<4)5@*IX4oI:AR5OYQ=li?mjlg"1":[Y00-:\@)_A>F8"AAX!RU?Ocn3'i?Sh%Z1?T8k[CjJ%Hk6[#]Abe7DpY5@:0R%J)<$X+,\`)9`~> +endstream +endobj +59 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 58 0 R +/Annots 60 0 R +>> +endobj +60 0 obj +[ +61 0 R +62 0 R +] +endobj +61 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 249.81 674.674 414.8 664.674 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 31 0 R +/H /I +>> +endobj +62 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 361.83 222.18 395.71 212.18 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://www.w3.org/TR/REC-xml#charencoding) +/S /URI >> +/H /I +>> +endobj +63 0 obj +<< /Length 2246 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gau0ED/\/e&H88.i<C-b$k=YJU0^l:5hi\6LTK]C(E5'sK.>?T<a3]l3GC26^[LqAnL2SLMfnM*hMM!D]ArE)rH*&Qoa<LL!=<@roiWu\3MWn\IWS&s&=>1`KZ:@;DYDi(6aa\!>qr$"?Y%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/>FI$&9dD8<i;:Rd/=i!W:HX$:]`rW*tq3d1~> +endstream +endobj +64 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 63 0 R +/Annots 65 0 R +>> +endobj +65 0 obj +[ +66 0 R +67 0 R +] +endobj +66 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 186.56 514.4 240.56 504.4 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-parser.html#XMLSTRCMP) +/S /URI >> +/H /I +>> +endobj +67 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 262.18 229.78 382.18 219.78 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODELISTGETSTRING) +/S /URI >> +/H /I +>> +endobj +68 0 obj +<< /Length 2448 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat<BCN&8jn9]Z($43\cSr*'anW8d+KgVbYLcp=-nfc8(]7Fe(QT3S4`.)D>^W'uNY0_Xf9KZ+sN+]f\Y0XhlN`OXShJ0_co2^'JFQL?"Y%SXR1@]`YPL]N6qYe(mO2n-Z(TS>Q&1"=J?.2uMn!F9ISR)9h0'@QhZA2r5\uol7c6@ODf.H$"aZ^nd*TPs4n%.1-b\!IloaWu8OPh*54L,b>X$9YN+%PJ5))^OljfW,u+S$c9T(A[.3GZg.=O_J#<>O:H7=S]&cT)hTd=]/Jc1fE`g+`q^p$ReCb0I0aX9GV48Z&mj4JT=WFuC1C<R#r)iK!#:YqPE)MrOWBl0g<c?##QS7\=tg\j(8kT=OC9Pg>=Z'ad&aEstoX%'i'X,=8^f93::pC)9og[0ZJf+-+kWH-<u>0'[nm7Cm-U>l+aLEu.5n6<NKQ,s@0`k!7M.=;`haR#&&a9j_.<-<Whk$WH)k^Y%Rpdr#UhoTU[s8`\7&M?sAG@]0pt4JI^]+it6$%:VnPdr;`@7oDSan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+73 0 R +] +endobj +71 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 363.98 698.0 381.19 688.0 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-xpath.html) +/S /URI >> +/H /I +>> +endobj +72 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 263.38 597.866 341.98 587.866 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://www.w3.org/TR/xpath) +/S /URI >> +/H /I +>> +endobj +73 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 270.38 586.866 424.81 576.866 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 33 0 R +/H /I +>> +endobj +74 0 obj +<< /Length 2451 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gasar99\,?&\cSp;#.ERe/0A(k2nMWXK.k63=fn@.i%6_Tcf72M9pjMjf)5YHU)b,h%2$\Q7i+ndHGI1q>n:chYltM[ZRg#2V\19Yk`;e2hCqLND)^_9T)6Y.,A]8Rt&-NW&s\Nk22Zq?`[54OTA!Y8S"4pI#0djP)3Z>\iZ,sTaU`q)@"KaDS!FT_?JWUl;/RH"<5$a+8,VfPX!C$Ui)#IWp<BSG5&q$<,^.L.o4WY4KZc?"U2fD9Y*_jl)%BRf+J>5UnP;s`GAC=X"'IMXs`mid:Tkn'iC'LkXnGfe]Cu\MVY!/@-12l%/-Z=9P@Nu0klY+@3DjA"6hGd@;V`,'L;ehIl4Xg:O>'Y/4d)V2i!d1;JV%=*mSLMV9%_6p-OYlRi*'lXH$_uW[2a:RqG'l2*g1S!bfaj8"D]I3A/IDI7L5`e6gnLcXE1Q3gZ]aD>0)-p_X-tO'kMC9-H6tGIm(e60+9TNkhJR5/DOf_\;Hs)YVLn?eM?n(j/3il+Hc)2gjKQX.%3bpm'nDq.6ZG,\/[e8knrl#+tD.JIO[_bDO+DVb:-Xq0[>6.`9!bh@RI9,Dbqd)m4UJ&8q!HnoR'q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]=bo<CPn;o_1OWj+qe.MN5,li8_[A9QAMeHQB8I#/bDOD'`<p,J>@4\)S/:Y*@<Yj3XYnA(9QuA#G#3_:I<Y+khsn2f`eBM[=F".rkW2X,p?U%)i+-N-G8SZg8gA#H(eo'4(2i>,\+Q^aQA-6dM^*Y\T%H3+b_MKP6=GIror,rWc\urD!MCn*U@t)D=stWd*g;6#`\^>a;:M$Wl^*+6-\-(-8@u;kj-`jX$em[0fZmdsEc15Y03;]$*Y$ErD!"QAYF-gMgp`&C#<iE-1:GlN\)RjK>fbEeB"9=Q\YLAZCH4#P_e&6DYRS-[Me1u#(f(^gLqVA"ShhLe#=!b.!XA9)O-@$"Lsmk#m7XQl@)Ilh,s<D6h=m_UeO0q/,4:I-lsUBSHOk/SR%TEdbc_uIMR:(aA-h&&4RfD$AAI5_"$@\+$PjRm)\C;V7?I&T5AH"%3"u10@FOU#dHE>(ArJWdWe7>@WQu#O/[KVH$+TOb.EGl@Wr.S2QeJl4%"48C9-<cPl:mYf6%s&4h^**39>^`lK`US@it7[TbFp05Si&l;.Dp70if4#V&HMgQ#Fr7dS)dH"LnU,O*&_8?-0(L!N'l:'9)$11?,[a;ShNt%e++a]:/s3A>]kOElQo=j]^-L#T$M0)''pj?#*a8*/[SZ:SlN8r^baQu;VGstii2\od]W<O@rKh894"d%o3=\gbJJWqNig%'N[6L5VGkAJJ6mo!'0g@&IY7[07X\DjD>b-%"!(LdW6P>0mrr]ZFG+Ln;96\9Zp?hWb<FF:G%OXYm;8r*bN#mg1`"KM$6,=p9bN:"k>,fdrr_0@G\I~> +endstream +endobj +75 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 74 0 R +/Annots 76 0 R +>> +endobj +76 0 obj +[ +77 0 R +78 0 R +79 0 R +80 0 R +] +endobj +77 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 272.33 574.54 455.37 564.54 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 35 0 R +/H /I +>> +endobj +78 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 186.348 433.66 276.348 423.66 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNEWTEXTCHILD) +/S /URI >> +/H /I +>> +endobj +79 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 324.744 220.754 470.014 210.754 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 37 0 R +/H /I +>> +endobj +80 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 209.754 208.16 199.754 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 37 0 R +/H /I +>> +endobj +81 0 obj +<< /Length 2156 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +GatU4=`<(R&:XAW:]hF%()p9JiLg?p3H,S?BtEP%[h"@^o!4S#NC:_qMZ3>[77oAa9'ZJ2!J<2fI,pfffpA27+"pR9F_o+P'PEGKF66X9r4/,_HGGKtIhGqS46t5aLV*+\m+?YfYH2B!UL_Y#G$b:=q9&QWgAD"[i;bb9"b?^^4Zc=pct:T(_%1oTYg.%88>JX.+Jm+LE1+f=7TbGIDV/`eT=BEL/eCJs1#CiVP$Y'.mKf)?D4aoRC@\L/,VP:m-_KrmbAYK'K&AGjNu(4U[O+HU65kh1AdmH\#?J,l<[m'S8RNoHVpr$BP/MOVBS=`';1C`?3VQXq`q->?Eq\]<CF$^,'iLTfbkea\p[_atRM'WDL.':)p>fG!&9Ofm#eM)ig<PEQ'0_npZgS;@.jJC0<cWiG\-*Db#VXaQ>;(k/pqh)=4%VmS-BU!gI_qpR4EeJJ&+\8BQTP,L4jVl/NV)naGOGh5Uh0e2=d?<@P>0f^o>_RQ;o]C'6)"'nKr>,&PY#%.NYHeHMZ_MKR"-[5esp%eaN&2TGqTRHgC7e#0iOX;BHhE;CL*&B#l6`goi_Su:Z)k':'g7,IM[PjKgl`Pa>:q,KcEr@C]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aSBdrbNR`[)Ud#4P/P,ReX8e;(u9L5JoG4,F=JpqGF!X2TX*JeuFM*+=Y/er4G^"LPoFkS3o%pih1F%u(J+-2]7V6Pa.VK:*od36#ccZ,?$)!Gth@=%?@u(4-P(g<g&h`8'TH$-)j$%A"dNoB\r<*EhR7lmi^UXD?,'hg.D`;*c+Zd4oN6eO4%>EfJ*L;i)j/nJYr:rd21V-a)h@ajIM<i[s"9n3T3s-[/H/D$Fk!E@7UM)Nr6!)HDQLi$ir$]"[k;^/Y'0W2VDgOQ9p]mk2mj0uV?o1/s@H^2LXGa.[8l:H`5X^iaM7#aeu]I+i`<[-Qq3@A5^<E;=hO)@<r55J_KlNoeWTZ"@%>i")]=kt'84)S%&-9*-ro$:^7tm[FfJ09:DkXg"f17Ub?+ooe'C!qh2N)/DpTU5(8aYhhlg2J8ZT:ZG`Da6L]A$gItu*E^k9.aEK)Hat<aQeEn4oJ&3$]aN`f:Cuar^M0OC]9[d2%&gE0kp,1%pn;U2#!YSMrrD8WN7%~> +endstream +endobj +82 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 81 0 R +/Annots 83 0 R +>> +endobj +83 0 obj +[ +84 0 R +85 0 R +86 0 R +87 0 R +] +endobj +84 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 204.89 545.98 279.89 535.98 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNEWTEXTCHILD) +/S /URI >> +/H /I +>> +endobj +85 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 338.334 437.654 471.934 427.654 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 39 0 R +/H /I +>> +endobj +86 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 426.654 242.88 416.654 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 39 0 R +/H /I +>> +endobj +87 0 obj +<< /Type /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%L:FX._].JPV[T'ps-5e1HGsI<jk-c#/jYk+-M>I^`_,he%/1EYQ,m@s!3j0842/.%^)-WpHgr3QcR7$#._!)hQJ-=p7YBLO?2XZ\].Kkj]SW)Q0JdKK?7p]!K6hN!l$cI'?/NOFY3b7%WlFQ%QD"/E"T8ic:i;a~> +endstream +endobj +89 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 88 0 R +/Annots 90 0 R +>> +endobj +90 0 obj +[ +91 0 R +] +endobj +91 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 219.0 344.54 435.37 334.54 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 41 0 R +/H /I +>> +endobj +92 0 obj +<< /Length 2048 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat=,D/\/e&H88.Tk5.-$o'>kHJR!`l\c!i6+8$*Vg0?uM7/,\P"SYDK44e.-^#*6>B5=hBZiL-T&[NTkdSaAq''d^Md0o*5'*:>)0T9[K,kqd^l5LQE9&Qoc<hC#8BXY=7QcVBf6'7>JlZ$F(Y-OfVH%Li)OdsJ9,j@)(AH^0jUVUOqmIpKXJcU@\BUu(2P&CK"(b2(*sccC0I;+VZIt2^/tKbJji9`0?*):f=X@qVK$HRsWF##YU>hDO#-X$ZQ>0mb<Z.7E;OlGPqt0^X<`?t@YH,5i:l<7XXP53plM0rSp4r,H[eN$?_SdI2=a:T#,_BM,@D"%n'K-NS6h-jk--regEJg8e]N>t,f=_!Y6#1M:Q$=A@Lo".+lblXl(a1Pg/La0([KVlj-2".T]&;]U[V9r)c=Sp2@?_1n.`B3o#skAJZ!,<f9;8BY/_?fBImqj=[lu^?5uNPem'i=hbVDaR(483;Vkhk_r$[FfX_F5@OX<Np`[hPY_*SH@ACdo#\>J\Rr6$P!@TQMQ[Yi\`IEGG_b9oZs=Bf?ume::TV-V*R,^"a\9O7,_e27Ap?'klu7Zo%%&HRM3qhq=MRr%dT)_tR&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:k.PEpK2SR?Uc5`7C1[-EZ2!U#1cmQL4KgSno$L&]:ld(S^?g";i.r_Fa!p'qj6rrICfnZ&)F3QlUCPrruMmc]q4*A22H\ba*5X35S79$^S*h4G>c$G2,S\9h>V"+f[7o2J8!Mh_7(q44IPeNqj.*,L#BX33kSWrkUS+FVc6JBZWGMr'8^1r/k1C/pfDLp1G'1Q7D;kY,/68llZ-?5IYkbq8-hrpON(?pB6oj<[r06)u&&/I]t>31<_imL/Bt^V)]Gm=(*W_@i]&@Go&>'UIC7^eE=O\Dcq9aGee`WWg<q$6leY5d`u=fkCYamrEJ#]fn!n^<5=I"^L+u'KDo#CE43lN&p:25L81=-XNP:gr0:bl!GurpRR`qQS#QinZ1`<^9AQfa4(PJU'16FT(iXWd6R^4_`S;o~> +endstream +endobj +93 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 92 0 R +>> +endobj +94 0 obj +<< /Length 1148 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gatm:>AMtc&:XAW:f7XD8LJjlD/Tr%P/8B,SCWB\Pm>iG-N[Fk=)sd,c@8'jP&*^ueo%/aJp'</Dn_X1\'rb#PmT2H'MK;f'\n[eJF"?fYTid=+p&A^dq/#kr3/jJo%?`O-GabSSB?)JcX'@ugL0m(Nh3KT6b_+JOO&&FEOIbH77dO/>1$Ml2.!baf&08=$@S283c\,$][Y?I@usVs9a8_62%o;Dn(@[0q>.ZI3,--WmC4:_>mj,Q2p![Q-HXD!1bQq]2WjAU6FL4cXDEl,H0;DPM9O^qZ(B3^;(U:4q?WW7U?ltd_o=j9+B7abk]1Mq%haO^fKf>kYQSEc)m!k0I,NbDhWs`BSsPeCG.CUTq?k#*##l$HT^Q?f!68O2Oo_I%f_'8b55'e9<T+LL>VH_0bLnD@[E[3b>GK%QK_RP!S2!k<&G2K3+ERl8)p5),ba,::YifpEg!=suk#kRT$M<aMmNDD.$fu)"k2t'#n/M.3%TIcDS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f9)Y?njhchE&*?4F[QJmroANC3B!/e:.BB<o6rhPBjl-+OHjAoj=mAk9a4-/>\)JOQ]!C$4[(gs)X_6\-S26U;)p&ieiOdM[QSYB]2mpjJ`JopoZP2JdO'V?T$KYciKiD*c47hETggnZGLA-'G\'#LoBWT!TojA.W9Q/SNQ]nJ`O]ANEHXS8j':ceoE+9cGii^W<orI*FK5P8_0]#I?In[aZ/'4@>f=[A1kBGCWM]!jkED&P^+_.>&bKm.5;3qTK?ppVcZ$AGm)GD=Q>Cg9$OE':kjQWVe.YT9E=O6,PD</.)`Or'Vk8PaYA/\mEU6T:EV:9P9#UeYWfnBU)b:b)UCZ/s$[H,2d5t#[q^KSl7U`k]M5gT)].$_F*\`/=Tb/nDn!'s)+hX>&>4CZYags^t'3erVnTh.?YQ\q9sZF44TY%64A7?c+qhj7TB`T'>Gd$])l4-[KR2YPVSJ_4/jW9$HYfU'(JV5&]0_?P<=eaf<-5s2DgkGad1Gs8n@;)91d-5CJ!F%[/#D(20lr6&ha,YfIo"9%b_Y4gXf9u5h@OGJ1VCRqSC_V!>M\+e+%H7@E>](t%:T`*,,0an'h\o2,oMu`\9j5r*;!sCH3#nAPNNG\AqDJ]ro_tDX%Ef>f@noBOGmLBeZcb0k0PLCUR)UIp~> +endstream +endobj +109 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 612 792 ] +/Resources 3 0 R +/Contents 108 0 R +/Annots 110 0 R +>> +endobj +110 0 obj +[ +] +endobj +113 0 obj +<< + /Title (\376\377\0\114\0\151\0\142\0\170\0\155\0\154\0\40\0\124\0\165\0\164\0\157\0\162\0\151\0\141\0\154) + /Parent 111 0 R + /Next 115 0 R + /A 112 0 R +>> endobj +115 0 obj +<< + /Title (\376\377\0\124\0\141\0\142\0\154\0\145\0\40\0\157\0\146\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164\0\163) + /Parent 111 0 R + /Prev 113 0 R + /Next 116 0 R + /A 114 0 R +>> endobj +116 0 obj +<< + /Title (\376\377\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156) + /Parent 111 0 R + /Prev 115 0 R + /Next 117 0 R + /A 9 0 R +>> endobj +117 0 obj +<< + /Title (\376\377\0\104\0\141\0\164\0\141\0\40\0\124\0\171\0\160\0\145\0\163) + /Parent 111 0 R + /Prev 116 0 R + /Next 118 0 R + /A 11 0 R +>> endobj +118 0 obj +<< + /Title (\376\377\0\120\0\141\0\162\0\163\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\146\0\151\0\154\0\145) + /Parent 111 0 R + /Prev 117 0 R + /Next 119 0 R + /A 13 0 R +>> endobj +119 0 obj +<< + /Title (\376\377\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\105\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164) + /Parent 111 0 R + /Prev 118 0 R + /Next 120 0 R + /A 15 0 R +>> endobj +120 0 obj +<< + /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\130\0\120\0\141\0\164\0\150\0\40\0\164\0\157\0\40\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\145\0\40\0\105\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164) + /Parent 111 0 R + /Prev 119 0 R + /Next 121 0 R + /A 17 0 R +>> endobj +121 0 obj +<< + /Title (\376\377\0\127\0\162\0\151\0\164\0\151\0\156\0\147\0\40\0\145\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\143\0\157\0\156\0\164\0\145\0\156\0\164) + /Parent 111 0 R + /Prev 120 0 R + /Next 122 0 R + /A 19 0 R +>> endobj +122 0 obj +<< + /Title (\376\377\0\127\0\162\0\151\0\164\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145) + /Parent 111 0 R + /Prev 121 0 R + /Next 123 0 R + /A 21 0 R +>> endobj +123 0 obj +<< + /Title (\376\377\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\163) + /Parent 111 0 R + /Prev 122 0 R + /Next 124 0 R + /A 23 0 R +>> endobj +124 0 obj +<< + /Title (\376\377\0\105\0\156\0\143\0\157\0\144\0\151\0\156\0\147\0\40\0\103\0\157\0\156\0\166\0\145\0\162\0\163\0\151\0\157\0\156) + /Parent 111 0 R + /Prev 123 0 R + /Next 125 0 R + /A 25 0 R +>> endobj +125 0 obj +<< + /Title (\376\377\0\101\0\56\0\240\0\103\0\157\0\155\0\160\0\151\0\154\0\141\0\164\0\151\0\157\0\156) + /Parent 111 0 R + /Prev 124 0 R + /Next 126 0 R + /A 27 0 R +>> endobj +126 0 obj +<< + /Title (\376\377\0\102\0\56\0\240\0\123\0\141\0\155\0\160\0\154\0\145\0\40\0\104\0\157\0\143\0\165\0\155\0\145\0\156\0\164) + /Parent 111 0 R + /Prev 125 0 R + /Next 127 0 R + /A 29 0 R +>> endobj +127 0 obj +<< + /Title (\376\377\0\103\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\113\0\145\0\171\0\167\0\157\0\162\0\144\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) + /Parent 111 0 R + /Prev 126 0 R + /Next 128 0 R + /A 31 0 R +>> endobj +128 0 obj +<< + /Title (\376\377\0\104\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\130\0\120\0\141\0\164\0\150\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) + /Parent 111 0 R + /Prev 127 0 R + /Next 129 0 R + /A 33 0 R +>> endobj +129 0 obj +<< + /Title (\376\377\0\105\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\101\0\144\0\144\0\40\0\113\0\145\0\171\0\167\0\157\0\162\0\144\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) + /Parent 111 0 R + /Prev 128 0 R + /Next 130 0 R + /A 35 0 R +>> endobj +130 0 obj +<< + /Title (\376\377\0\106\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\101\0\144\0\144\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) + /Parent 111 0 R + /Prev 129 0 R + /Next 131 0 R + /A 37 0 R +>> endobj +131 0 obj +<< + /Title (\376\377\0\107\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\40\0\126\0\141\0\154\0\165\0\145\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) + /Parent 111 0 R + /Prev 130 0 R + /Next 132 0 R + /A 39 0 R +>> endobj +132 0 obj +<< + /Title (\376\377\0\110\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\105\0\156\0\143\0\157\0\144\0\151\0\156\0\147\0\40\0\103\0\157\0\156\0\166\0\145\0\162\0\163\0\151\0\157\0\156\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145) + /Parent 111 0 R + /Prev 131 0 R + /Next 133 0 R + /A 41 0 R +>> endobj +133 0 obj +<< + /Title (\376\377\0\111\0\56\0\240\0\101\0\143\0\153\0\156\0\157\0\167\0\154\0\145\0\144\0\147\0\145\0\155\0\145\0\156\0\164\0\163) + /Parent 111 0 R + /Prev 132 0 R + /Next 135 0 R + /A 43 0 R +>> endobj +135 0 obj +<< + /Title (\376\377\0\111\0\156\0\144\0\145\0\170) + /Parent 111 0 R + /Prev 133 0 R + /A 134 0 R +>> endobj +136 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F3 +/BaseFont /Helvetica-Bold +/Encoding /WinAnsiEncoding >> +endobj +137 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F14 +/BaseFont /ZapfDingbats >> +endobj +138 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F5 +/BaseFont /Times-Roman +/Encoding /WinAnsiEncoding >> +endobj +139 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F6 +/BaseFont /Times-Italic +/Encoding /WinAnsiEncoding >> +endobj +140 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F1 +/BaseFont /Helvetica +/Encoding /WinAnsiEncoding >> +endobj +141 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F9 +/BaseFont /Courier +/Encoding /WinAnsiEncoding >> +endobj +142 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F7 +/BaseFont /Times-Bold +/Encoding /WinAnsiEncoding >> +endobj +1 0 obj +<< /Type /Pages +/Count 17 +/Kids [6 0 R 45 0 R 59 0 R 64 0 R 69 0 R 75 0 R 82 0 R 89 0 R 93 0 R 95 0 R 97 0 R 99 0 R 101 0 R 103 0 R 105 0 R 107 0 R 109 0 R ] >> +endobj +2 0 obj +<< /Type /Catalog +/Pages 1 0 R + /Outlines 111 0 R + /PageMode /UseOutlines + >> +endobj +3 0 obj +<< +/Font << /F3 136 0 R /F5 138 0 R /F14 137 0 R /F1 140 0 R /F6 139 0 R /F9 141 0 R /F7 142 0 R >> +/ProcSet [ /PDF /ImageC /Text ] >> +endobj +9 0 obj +<< +/S /GoTo +/D [45 0 R /XYZ 139.0 693.0 null] +>> +endobj +11 0 obj +<< +/S /GoTo +/D [45 0 R /XYZ 139.0 363.674 null] +>> +endobj +13 0 obj +<< +/S /GoTo +/D [59 0 R /XYZ 139.0 725.0 null] +>> +endobj +15 0 obj +<< +/S /GoTo +/D [59 0 R /XYZ 139.0 173.18 null] +>> +endobj +17 0 obj +<< +/S /GoTo +/D [64 0 R /XYZ 139.0 156.646 null] +>> +endobj +19 0 obj +<< +/S /GoTo +/D [75 0 R /XYZ 139.0 667.866 null] +>> +endobj +21 0 obj +<< +/S /GoTo +/D [75 0 R /XYZ 139.0 281.08 null] +>> +endobj +23 0 obj +<< +/S /GoTo +/D [82 0 R /XYZ 139.0 508.98 null] +>> +endobj +25 0 obj +<< +/S /GoTo +/D [89 0 R /XYZ 139.0 725.0 null] +>> +endobj +27 0 obj +<< +/S /GoTo +/D [93 0 R /XYZ 139.0 648.0 null] +>> +endobj +29 0 obj +<< +/S /GoTo +/D [93 0 R /XYZ 139.0 564.561 null] +>> +endobj +31 0 obj +<< +/S /GoTo +/D [93 0 R /XYZ 139.0 386.942 null] +>> +endobj +33 0 obj +<< +/S /GoTo +/D [95 0 R /XYZ 139.0 182.42 null] +>> +endobj +35 0 obj +<< +/S /GoTo +/D [99 0 R /XYZ 139.0 665.56 null] +>> +endobj +37 0 obj +<< +/S /GoTo +/D [101 0 R /XYZ 139.0 497.94 null] +>> +endobj +39 0 obj +<< +/S /GoTo +/D [103 0 R /XYZ 139.0 438.78 null] +>> +endobj +41 0 obj +<< +/S /GoTo +/D [105 0 R /XYZ 139.0 281.02 null] +>> +endobj +43 0 obj +<< +/S /GoTo +/D [107 0 R /XYZ 139.0 113.4 null] +>> +endobj +111 0 obj +<< + /First 113 0 R + /Last 135 0 R +>> endobj +112 0 obj +<< +/S /GoTo +/D [6 0 R /XYZ 139.0 725.0 null] +>> +endobj +114 0 obj +<< +/S /GoTo +/D [6 0 R /XYZ 139.0 396.11 null] +>> +endobj +134 0 obj +<< +/S /GoTo +/D [109 0 R /XYZ 139.0 682.0 null] +>> +endobj +xref +0 143 +0000000000 65535 f +0000046903 00000 n +0000047079 00000 n +0000047172 00000 n +0000000015 00000 n +0000000071 00000 n +0000001911 00000 n +0000002031 00000 n +0000002175 00000 n +0000047325 00000 n +0000002309 00000 n +0000047389 00000 n +0000002445 00000 n +0000047456 00000 n +0000002581 00000 n +0000047521 00000 n +0000002717 00000 n +0000047587 00000 n +0000002853 00000 n +0000047654 00000 n +0000002989 00000 n +0000047721 00000 n +0000003125 00000 n +0000047787 00000 n +0000003261 00000 n +0000047853 00000 n +0000003397 00000 n +0000047918 00000 n +0000003533 00000 n +0000047983 00000 n +0000003669 00000 n +0000048050 00000 n +0000003804 00000 n +0000048117 00000 n +0000003940 00000 n +0000048183 00000 n +0000004076 00000 n +0000048249 00000 n +0000004212 00000 n +0000048316 00000 n +0000004348 00000 n +0000048383 00000 n +0000004484 00000 n +0000048450 00000 n +0000004620 00000 n +0000006683 00000 n +0000006806 00000 n +0000006903 00000 n +0000007078 00000 n +0000007271 00000 n +0000007469 00000 n +0000007659 00000 n +0000007846 00000 n +0000008044 00000 n +0000008246 00000 n +0000008448 00000 n +0000008648 00000 n +0000008847 00000 n +0000009052 00000 n +0000011400 00000 n +0000011523 00000 n +0000011557 00000 n +0000011693 00000 n +0000011884 00000 n +0000014223 00000 n +0000014346 00000 n +0000014380 00000 n +0000014580 00000 n +0000014791 00000 n +0000017332 00000 n +0000017455 00000 n +0000017496 00000 n +0000017685 00000 n +0000017863 00000 n +0000018000 00000 n +0000020544 00000 n +0000020667 00000 n +0000020715 00000 n +0000020850 00000 n +0000021058 00000 n +0000021197 00000 n +0000021333 00000 n +0000023582 00000 n +0000023705 00000 n +0000023753 00000 n +0000023959 00000 n +0000024098 00000 n +0000024234 00000 n +0000024439 00000 n +0000027594 00000 n +0000027717 00000 n +0000027744 00000 n +0000027878 00000 n +0000030019 00000 n +0000030127 00000 n +0000031368 00000 n +0000031476 00000 n +0000032912 00000 n +0000033020 00000 n +0000034353 00000 n +0000034461 00000 n +0000035743 00000 n +0000035853 00000 n +0000037197 00000 n +0000037307 00000 n +0000038604 00000 n +0000038714 00000 n +0000040134 00000 n +0000040244 00000 n +0000041154 00000 n +0000041280 00000 n +0000048516 00000 n +0000048570 00000 n +0000041301 00000 n +0000048635 00000 n +0000041476 00000 n +0000041677 00000 n +0000041848 00000 n +0000042007 00000 n +0000042201 00000 n +0000042455 00000 n +0000042784 00000 n +0000043020 00000 n +0000043221 00000 n +0000043446 00000 n +0000043659 00000 n +0000043842 00000 n +0000044048 00000 n +0000044306 00000 n +0000044552 00000 n +0000044833 00000 n +0000045126 00000 n +0000045496 00000 n +0000045825 00000 n +0000048701 00000 n +0000046038 00000 n +0000046154 00000 n +0000046268 00000 n +0000046354 00000 n +0000046465 00000 n +0000046577 00000 n +0000046686 00000 n +0000046793 00000 n +trailer +<< +/Size 143 +/Root 2 0 R +/Info 4 0 R +>> +startxref +48768 +%%EOF diff --git a/libxml2/doc/tutorial/xmltutorial.xml b/libxml2/doc/tutorial/xmltutorial.xml new file mode 100644 index 0000000..c8edecb --- /dev/null +++ b/libxml2/doc/tutorial/xmltutorial.xml @@ -0,0 +1,747 @@ +<?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="http://www.xmlsoft.org/">the project home page</ulink>. Included there is complete <ulink url="http://xmlsoft.org/html/libxml-lib.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="http://xmlsoft.org/html/libxml-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="http://www.xmlsoft.org/encoding.html"><application>libxml</application> encoding support web page</ulink>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><indexterm> + <primary>xmlDoc</primary> + </indexterm> + <ulink url="http://xmlsoft.org/html/libxml-tree.html#XMLDOC">xmlDoc</ulink></term> + <listitem> + <para>A structure containing the tree created by a parsed doc. <ulink + url="http://xmlsoft.org/html/libxml-tree.html#XMLDOCPTR">xmlDocPtr</ulink> + is a pointer to the structure.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><indexterm> + <primary>xmlNodePtr</primary> + </indexterm> +<ulink + url="http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR">xmlNodePtr</ulink> + and <ulink url="http://xmlsoft.org/html/libxml-tree.html#XMLNODE">xmlNode</ulink></term> + <listitem> + <para>A structure containing a single node. <ulink + url="http://xmlsoft.org/html/libxml-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. "story" 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 "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 <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 "story".</para> + </callout> + <callout arearefs="huntstoryinfo"> + <para>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 <application>libxml</application> string + comparison + function, <function><ulink + url="http://xmlsoft.org/html/libxml-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 + "keyword".</para> + </callout> + <callout arearefs="foundkeyword"> + <para>When we find the "keyword" 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->xmlChildrenNode</varname>. To retrieve it, we + use the function <function><ulink + url="http://xmlsoft.org/html/libxml-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="http://xmlsoft.org/html/libxml-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 < 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 + — 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: + <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="http://xmlsoft.org/html/libxml-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="http://xmlsoft.org/html/libxml-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="http://xmlsoft.org/html/libxml-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); + +… + <co id="findhandlerfunction" />handler = xmlFindCharEncodingHandler(encoding); +… + <co id="callconversionfunction" />handler->input(out, &out_size, in, &temp); +… + <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> |