MDT 2002 John Fleck | 598f6eb | 2002-06-04 15:10:36 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
MDT 2002 John Fleck | 77e4d35 | 2002-09-01 01:37:11 +0000 | [diff] [blame^] | 2 | <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.48"><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"><div class="titlepage"><div><h1 class="title"><a name="id2755940"></a>Libxml Tutorial</h1></div><div><h3 class="author">John Fleck</h3></div><div><p class="copyright">Copyright © 2002 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">Revision 2</td><td align="left">June 12, 2002</td></tr><tr><td align="left">Revision 3</td><td align="left">Aug. 31, 2002</td></tr></table></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">Writing element content</a></dt><dt><a href="ar01s06.html">Writing Attribute</a></dt><dt><a href="ar01s07.html">Retrieving Attributes</a></dt><dt>A. <a href="apa.html">Sample Document</a></dt><dt>B. <a href="apb.html">Code for Keyword Example</a></dt><dt>C. <a href="apc.html">Code for Add Keyword Example</a></dt><dt>D. <a href="apd.html">Code for Add Attribute Example</a></dt><dt>E. <a href="ape.html">Code for Retrieving Attribute Value Example</a></dt></dl></div><div class="abstract"><p><b>Abstract</b></p><p>Libxml is a freely licensed C language library for handling |
MDT 2002 John Fleck | 598f6eb | 2002-06-04 15:10:36 +0000 | [diff] [blame] | 3 | XML, portable across a large number of platforms. This |
| 4 | tutorial provides examples of its basic functions.</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="introduction"></a>Introduction</h2></div></div><p>Libxml is a C language library implementing functions for reading, |
| 5 | creating and manipulating XML data. This tutorial |
| 6 | 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"> |
| 7 | API documentation</a>. This tutorial is not meant |
| 8 | to substitute for that complete documentation, but to illustrate the |
| 9 | functions needed to use the library to perform basic operations. |
| 10 | |
| 11 | </p><p>The tutorial is based on a simple XML application I |
| 12 | use for articles I write. The format includes metadata and the body |
| 13 | of the article.</p><p>The example code in this tutorial demonstrates how to: |
MDT 2002 John Fleck | 5452083 | 2002-06-13 03:30:26 +0000 | [diff] [blame] | 14 | <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> |
MDT 2002 John Fleck | 598f6eb | 2002-06-04 15:10:36 +0000 | [diff] [blame] | 15 | </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> |