1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
<html>
<head>
<title>Mini-XML Programmers Manual, Version 2.7</title>
<meta name="copyright" content="Copyright 2003-2011">
<meta name="author" content="Michael R. Sweet">
<meta name="keywords" content="XML, C, C++, library">
</head>
<body>
<h1 align="right"><a name="INTRO"><img src="0.gif" align="right"
hspace="10" width="100" height="100" alt="0"></a>Introduction</h1>
<p>This programmers manual describes Mini-XML version 2.7, a small
XML parsing library that you can use to read and write XML data
files in your C and C++ applications.</p>
<p>Mini-XML was initially developed for the <a
href="http://gutenprint.sf.net/">Gutenprint</a> project to replace
the rather large and unwieldy <tt>libxml2</tt> library with
something substantially smaller and easier-to-use. It all began one
morning in June of 2003 when Robert posted the following sentence to
the developer's list:</p>
<blockquote><em>It's bad enough that we require libxml2, but rolling
our own XML parser is a bit more than we can handle.</em></blockquote>
<p>I then replied with:</p>
<blockquote><em>Given the limited scope of what you use in XML, it
should be trivial to code a mini-XML API in a few hundred lines of
code.</em></blockquote>
<p>I took my own challenge and coded furiously for two days to
produced the initial public release of Mini-XML, total lines of
code: 696. Robert promptly integrated Mini-XML into Gutenprint
and removed libxml2.</p>
<p>Thanks to lots of feedback and support from various
developers, Mini-XML has evolved since then to provide a more
complete XML implementation and now stands at a whopping 3,965
lines of code, compared to 103,893 lines of code for libxml2
version 2.6.9.</p>
<p>Aside from Gutenprint, Mini-XML is used for the
following projects/software applications:</p>
<ul>
<li><a href="http://www.cups.org/">CUPS</a></li>
<li><a
href="http://zynaddsubfx.sourceforge.net">ZynAddSubFX</a></li>
</ul>
<p>Please email me (mxml @ easysw . com) if you would like your
project added or removed from this list, or if you have any
comments/quotes you would like me to publish about your
experiences with Mini-XML.</p>
<!-- NEED 1in -->
<h2>Organization of This Document</h2>
<p>This manual is organized into the following chapters and
appendices:</p>
<ul>
<li>Chapter 1, "<a href="#INSTALL">Building,
Installing, and Packaging Mini-XML</a>", provides
compilation, installation, and packaging instructions for
Mini-XML.</li>
<li>Chapter 2, "<a href="#BASICS">Getting
Started with Mini-XML</a>", shows how to use the
Mini-XML library in your programs.</li>
<li>Chapter 3, "<a href="#ADVANCED">More
Mini-XML Programming Techniques</a>", shows additional
ways to use the Mini-XML library.</li>
<li>Chapter 4, "<a href="#MXMLDOC">Using the
mxmldoc Utility</a>", describes how to use the
<tt>mxmldoc(1)</tt> program to generate software
documentation.</li>
<li>Appendix A, "<a href="#LICENSE">Mini-XML License</a>",
provides the terms and conditions for using and distributing
Mini-XML.</li>
<li>Appendix B, "<a href="#RELNOTES">Release Notes</a>",
lists the changes in each release of Mini-XML.</li>
<li>Appendix C, "<a href="#REFERENCE">Library
Reference</a>", contains a complete reference for
Mini-XML, generated by <tt>mxmldoc</tt>.</li>
<li>Appendix D, "<a href="#SCHEMA">XML Schema</a>", shows
the XML schema used for the XML files produced by
<tt>mxmldoc</tt>.</li>
</ul>
<!-- NEED 10 -->
<h2>Notation Conventions</h2>
<p>Various font and syntax conventions are used in this guide.
Examples and their meanings and uses are explained below:</p>
<dl>
<dt><code>mxmldoc</code><br>
<code>mxmldoc(1)</code></dt>
<dd>The names of commands; the first mention of a command
or function in a chapter is followed by a manual page
section number.<br><br></dd>
<dt><var>/var</var><br>
<var>/etc/hosts</var></dt>
<dd>File and directory names.<br><br></dd>
<dt><tt>Request ID is Printer-123</tt></dt>
<dd>Screen output.<br><br></dd>
<dt><kbd>lp -d printer filename ENTER</kbd></dt>
<dd>Literal user input; special keys like
<kbd>ENTER</kbd> are in ALL CAPS.<br><br></dd>
<dt>12.3</dt>
<dd>Numbers in the text are written using the period (.)
to indicate the decimal point.<br><br></dd>
</dl>
<!-- NEED 10 -->
<h2>Abbreviations</h2>
<p>The following abbreviations are used throughout this
manual:</p>
<dl>
<dt>Gb</dt>
<dd>Gigabytes, or 1073741824 bytes<br><br></dd>
<dt>kb</dt>
<dd>Kilobytes, or 1024 bytes<br><br></dd>
<dt>Mb</dt>
<dd>Megabytes, or 1048576 bytes<br><br></dd>
<dt>UTF-8, UTF-16</dt>
<dd>Unicode Transformation Format, 8-bit or 16-bit<br><br></dd>
<dt>W3C</dt>
<dd>World Wide Web Consortium<br><br></dd>
<dt>XML</dt>
<dd>Extensible Markup Language<br><br></dd>
</dl>
<!-- NEED 12 -->
<h2>Other References</h2>
<dl>
<dt>The Unicode Standard, Version 4.0, Addison-Wesley,
ISBN 0-321-18578-1</dt>
<dd>The definition of the Unicode character set which is
used for XML.<br><br></dd>
<dt><a
href="http://www.w3.org/TR/2004/REC-xml-20040204/">Extensible
Markup Language (XML) 1.0 (Third Edition)</a></dt>
<dd>The XML specification from the World Wide Web
Consortium (W3C)<br><br></dd>
</dl>
<!-- NEED 6 -->
<h2>Legal Stuff</h2>
<p>The Mini-XML library is copyright 2003-2011 by Michael Sweet. License terms
are described in <a href="#LICENSE">Appendix A - Mini-XML License</a>.</p>
</body>
</html>
|