mxml/www/docfiles/intro.html
2008-01-29 05:50:23 +00:00

182 lines
6.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>Mini-XML Programmers Manual, Version 2.5</TITLE>
<META NAME="author" CONTENT="Michael R. Sweet">
<META NAME="copyright" CONTENT="Copyright 2003-2008">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
<LINK REL="Start" HREF="index.html">
<LINK REL="Contents" HREF="index.html">
<LINK REL="Next" HREF="install.html">
<STYLE TYPE="text/css"><!--
BODY { font-family: sans-serif }
H1 { font-family: sans-serif }
H2 { font-family: sans-serif }
H3 { font-family: sans-serif }
H4 { font-family: sans-serif }
H5 { font-family: sans-serif }
H6 { font-family: sans-serif }
SUB { font-size: smaller }
SUP { font-size: smaller }
PRE { font-family: monospace }
A { text-decoration: none }
--></STYLE>
</HEAD>
<BODY>
<A HREF="index.html">Contents</A>
<A HREF="install.html">Next</A>
<HR NOSHADE>
<H1 align="right"><A name="INTRO"><IMG align="right" alt="0" height="100"
hspace="10" src="0.gif" width="100"></A>Introduction</H1>
<P>This programmers manual describes Mini-XML version 2.5, 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,441 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/">Common UNIX Printing System</A></LI>
<LI><A href="http://www.cups.org/ddk/">CUPS Driver Development Kit</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>
<H2><A NAME="1_1">Organization of This Document</A></H2>
<P>This manual is organized into the following chapters and appendices:</P>
<UL>
<LI>Chapter 1, &quot;<A href="install.html#INSTALL">Building, Installing, and
Packaging Mini-XML</A>&quot;, provides compilation, installation, and
packaging instructions for Mini-XML.</LI>
<LI>Chapter 2, &quot;<A href="basics.html#BASICS">Getting Started with
Mini-XML</A>&quot;, shows how to use the Mini-XML library in your programs.</LI>
<LI>Chapter 3, &quot;<A href="advanced.html#ADVANCED">More Mini-XML
Programming Techniques</A>&quot;, shows additional ways to use the Mini-XML
library.</LI>
<LI>Chapter 4, &quot;<A href="mxmldoc.html#MXMLDOC">Using the mxmldoc Utility</A>
&quot;, describes how to use the <TT>mxmldoc(1)</TT> program to generate
software documentation.</LI>
<LI>Appendix A, &quot;<A href="license.html#LICENSE">Mini-XML License</A>&quot;,
provides the terms and conditions for using and distributing Mini-XML.</LI>
<LI>Appendix B, &quot;<A href="relnotes.html#RELNOTES">Release Notes</A>&quot;,
lists the changes in each release of Mini-XML.</LI>
<LI>Appendix C, &quot;<A href="reference.html#REFERENCE">Library Reference</A>
&quot;, contains a complete reference for Mini-XML, generated by <TT>mxmldoc</TT>
.</LI>
<LI>Appendix D, &quot;<A href="schema.html#SCHEMA">XML Schema</A>&quot;, shows the
XML schema used for the XML files produced by <TT>mxmldoc</TT>.</LI>
</UL>
<!-- NEED 10 -->
<H2><A NAME="1_2">Notation Conventions</A></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>lpstat</CODE>
<BR> <CODE>lpstat(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> /usr/share/cups/data/testprint.ps</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><A NAME="1_3">Abbreviations</A></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><A NAME="1_4">Other References</A></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><A NAME="1_5">Legal Stuff</A></H2>
<P>The Mini-XML library is copyright 2003-2008 by Michael Sweet.</P>
<P>This library is free software; you can redistribute it and/or modify
it under the terms of the <A href="license.html#LICENSE">GNU Library
General Public License</A> as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any
later version.</P>
<P>This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.</P>
<HR NOSHADE>
<A HREF="index.html">Contents</A>
<A HREF="install.html">Next</A>
</BODY>
</HTML>