Mini-XML Programmers Manual, Version
Total Page:16
File Type:pdf, Size:1020Kb
Mini−XML Programmers Manual, Version 2.0 Michael Sweet Copyright 2003−2004 Mini−XML Programmers Manual, Version 2.0 Table of Contents Introduction.........................................................................................................................................................1 Legal Stuff...............................................................................................................................................2 History.....................................................................................................................................................2 Organization of This Document...............................................................................................................3 Notation Conventions..............................................................................................................................3 Abbreviations...........................................................................................................................................4 Other References......................................................................................................................................4 1 − Building, Installing, and Packaging Mini−XML.......................................................................................5 Compiling Mini−XML............................................................................................................................5 Installing Mini−XML..............................................................................................................................6 Creating Mini−XML Packages................................................................................................................6 2 − Getting Started with Mini−XML................................................................................................................7 The Basics................................................................................................................................................7 Nodes.......................................................................................................................................................7 Loading XML..........................................................................................................................................8 Saving XML............................................................................................................................................9 Finding and Iterating Nodes............................................................................................................10 3 − More Mini−XML Programming Techniques...........................................................................................13 Load Callbacks.......................................................................................................................................13 Save Callbacks.......................................................................................................................................14 Changing Node Values..........................................................................................................................16 Formatted Text.......................................................................................................................................16 Indexing.................................................................................................................................................16 4 − Using the mxmldoc Utility..........................................................................................................................19 The Basics..............................................................................................................................................19 Code Documentation Conventions........................................................................................................20 Functions and Methods...................................................................................................................20 Variables and Class/Structure/Union Members..............................................................................20 Types...............................................................................................................................................20 Classes, Structures, and Unions......................................................................................................21 Enumerations...................................................................................................................................21 XML Schema.........................................................................................................................................22 A − GNU Library General Public License.....................................................................................................27 B − Release Notes..............................................................................................................................................35 Changes in Mini−XML 2.0....................................................................................................................35 Changes in Mini−XML 1.3....................................................................................................................36 Changes in Mini−XML 1.2....................................................................................................................36 Changes in Mini−XML 1.1.2.................................................................................................................36 Changes in Mini−XML 1.1.1.................................................................................................................36 Changes in Mini−XML 1.1....................................................................................................................37 Changes in Mini−XML 1.0....................................................................................................................37 Changes in Mini−XML 0.93..................................................................................................................37 i Mini−XML Programmers Manual, Version 2.0 Table of Contents B − Release Notes Changes in Mini−XML 0.92..................................................................................................................37 Changes in Mini−XML 0.91..................................................................................................................37 Changes in Mini−XML 0.9....................................................................................................................38 C − Library Reference......................................................................................................................................39 Contents.................................................................................................................................................39 Enumerations.........................................................................................................................................40 mxml_type_e...................................................................................................................................41 Functions................................................................................................................................................42 mxmlAdd()......................................................................................................................................43 mxmlDelete()...................................................................................................................................44 mxmlElementGetAttr()...................................................................................................................45 mxmlElementSetAttr()....................................................................................................................46 mxmlEntityAddCallback()..............................................................................................................47 mxmlEntityGetName()....................................................................................................................48 mxmlEntityGetValue()....................................................................................................................49 mxmlEntityRemoveCallback()........................................................................................................50 mxmlFindElement()........................................................................................................................51 mxmlIndexDelete().........................................................................................................................52 mxmlIndexEnum()..........................................................................................................................53 mxmlIndexFind().............................................................................................................................54 mxmlIndexNew()............................................................................................................................55 mxmlIndexReset()...........................................................................................................................56 mxmlLoadFile()...............................................................................................................................57