From e1b9f509fef540a888df5e016d022770f3ff8788 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 17 May 2009 17:17:46 +0000 Subject: [PATCH] Prep for 2.6 release. --- README | 117 +- www/data/software.md5 | 14 - www/docfiles/advanced.html | 10 +- www/docfiles/basics.html | 12 +- www/docfiles/index.html | 13 +- www/docfiles/install.html | 4 +- www/docfiles/intro.html | 28 +- www/docfiles/license.html | 6 +- www/docfiles/mxmldoc.html | 17 +- www/docfiles/reference.html | 3198 +++++++++++++++++------------------ www/docfiles/relnotes.html | 60 +- www/docfiles/schema.html | 4 +- www/index.php | 18 +- www/mxml.html | 153 +- www/phplib/mirrors.php | 11 +- www/software.php | 12 +- www/str.php | 4 +- 17 files changed, 1860 insertions(+), 1821 deletions(-) diff --git a/README b/README index 26245a4..c79f749 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README - 2009-01-12 +README - 2009-05-17 ------------------- @@ -6,90 +6,82 @@ INTRODUCTION This README file describes the Mini-XML library version 2.6. - Mini-XML is a small XML parsing library that you can use to - read XML and XML-like data files in your application without - requiring large non-standard libraries. Mini-XML only - requires an ANSI C compatible compiler (GCC works, as do - most vendors' ANSI C compilers) and a "make" program. + Mini-XML is a small XML parsing library that you can use to read XML and + XML-like data files in your application without requiring large non-standard + libraries. Mini-XML only requires an ANSI C compatible compiler (GCC works, + as do most vendors' ANSI C compilers) and a "make" program. Mini-XML provides the following functionality: - - Reading of UTF-8 and UTF-16 and writing of UTF-8 - encoded XML files and strings. - - Data is stored in a linked-list tree structure, - preserving the XML data hierarchy. - - Supports arbitrary element names, attributes, and - attribute values with no preset limits, just available - memory. - - Supports integer, real, opaque ("cdata"), and text - data types in "leaf" nodes. + - Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and + strings. + - Data is stored in a linked-list tree structure, preserving the XML + data hierarchy. + - Supports arbitrary element names, attributes, and attribute values + with no preset limits, just available memory. + - Supports integer, real, opaque ("cdata"), and text data types in + "leaf" nodes. - Functions for creating and managing trees of data. - - "Find" and "walk" functions for easily locating and - navigating trees of data. + - "Find" and "walk" functions for easily locating and navigating trees + of data. - Mini-XML doesn't do validation or other types of processing - on the data based upon schema files or other sources of - definition information. + Mini-XML doesn't do validation or other types of processing on the data + based upon schema files or other sources of definition information. BUILDING Mini-XML - Mini-XML comes with an autoconf-based configure script; just - type the following command to get things going: + Mini-XML comes with an autoconf-based configure script; just type the + following command to get things going: ./configure - The default install prefix is /usr/local, which can be - overridden using the --prefix option: + The default install prefix is /usr/local, which can be overridden using the + --prefix option: ./configure --prefix=/foo - Other configure options can be found using the --help - option: + Other configure options can be found using the --help option: ./configure --help - Once you have configured the software, type "make" to do the - build and run the test program to verify that things are - working, as follows: + Once you have configured the software, type "make" to do the build and run + the test program to verify that things are working, as follows: make - If you are using Mini-XML under Microsoft Windows with - Visual C++, use the included project files in the "vcnet" - subdirectory to build the library instead. + If you are using Mini-XML under Microsoft Windows with Visual C++ 2008, use + the included project files in the "vcnet" subdirectory to build the library + instead. INSTALLING Mini-XML - The "install" target will install Mini-XML in the lib and - include directories: + The "install" target will install Mini-XML in the lib and include + directories: make install - Once you have installed it, use the "-lmxml" option to link - your application against it. + Once you have installed it, use the "-lmxml" option to link your application + against it. DOCUMENTATION - The documentation is available in the "doc" subdirectory in - the files "mxml.html" (HTML) and "mxml.pdf" (PDF). You can - also look at the "testmxml.c" and "mxmldoc.c" source files - for examples of using Mini-XML. + The documentation is available in the "doc" subdirectory in the files + "mxml.html" (HTML) and "mxml.pdf" (PDF). You can also look at the + "testmxml.c" and "mxmldoc.c" source files for examples of using Mini-XML. Mini-XML provides a single header file which you include: #include - Nodes are defined by the "mxml_node_t" structure; the "type" - member defines the node type (element, integer, opaque, - real, or text) which determines which value you want to look - at in the "value" union. New nodes can be created using the - "mxmlNewElement()", "mxmlNewInteger()", "mxmlNewOpaque()", - "mxmlNewReal()", and "mxmlNewText()" functions. Only - elements can have child nodes, and the top node must be an - element, usually "?xml". + Nodes are defined by the "mxml_node_t" structure; the "type" member defines + the node type (element, integer, opaque, real, or text) which determines + which value you want to look at in the "value" union. New nodes can be + created using the "mxmlNewElement()", "mxmlNewInteger()", "mxmlNewOpaque()", + "mxmlNewReal()", and "mxmlNewText()" functions. Only elements can have + child nodes, and the top node must be an element, usually "?xml". You load an XML file using the "mxmlLoadFile()" function: @@ -100,8 +92,7 @@ DOCUMENTATION tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK); fclose(fp); - Similarly, you save an XML file using the "mxmlSaveFile()" - function: + Similarly, you save an XML file using the "mxmlSaveFile()" function: FILE *fp; mxml_node_t *tree; @@ -110,9 +101,8 @@ DOCUMENTATION mxmlSaveFile(tree, fp, MXML_NO_CALLBACK); fclose(fp); - The "mxmlLoadString()", "mxmlSaveAllocString()", and - "mxmlSaveString()" functions load XML node trees from and - save XML node trees to strings: + The "mxmlLoadString()", "mxmlSaveAllocString()", and "mxmlSaveString()" + functions load XML node trees from and save XML node trees to strings: char buffer[8192]; char *ptr; @@ -127,14 +117,13 @@ DOCUMENTATION ... ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK); - You can find a named element/node using the - "mxmlFindElement()" function: + You can find a named element/node using the "mxmlFindElement()" function: mxml_node_t *node = mxmlFindElement(tree, tree, "name", "attr", "value", MXML_DESCEND); - The "name", "attr", and "value" arguments can be passed as - NULL to act as wildcards, e.g.: + The "name", "attr", and "value" arguments can be passed as NULL to act as + wildcards, e.g.: /* Find the first "a" element */ node = mxmlFindElement(tree, tree, "a", NULL, NULL, MXML_DESCEND); @@ -167,22 +156,22 @@ DOCUMENTATION ... do something ... } - Finally, once you are done with the XML data, use the - "mxmlDelete()" function to recursively free the memory that - is used for a particular node or the entire tree: + Finally, once you are done with the XML data, use the "mxmlDelete()" + function to recursively free the memory that is used for a particular node + or the entire tree: mxmlDelete(tree); GETTING HELP AND REPORTING PROBLEMS - The Mini-XML web site provides access to a discussion forum - and bug reporting page: + The Mini-XML web site provides access to a discussion forum and bug + reporting page: http://www.minixml.org/ LEGAL STUFF - The Mini-XML library is Copyright 2003-2009 by Michael Sweet. - License terms are described in the file "COPYING". + The Mini-XML library is Copyright 2003-2009 by Michael Sweet. License terms + are described in the file "COPYING". diff --git a/www/data/software.md5 b/www/data/software.md5 index ec0d80e..02a1337 100644 --- a/www/data/software.md5 +++ b/www/data/software.md5 @@ -1,16 +1,2 @@ f706377fba630b39fa02fd63642b17e5 2.5 mxml/2.5/mxml-2.5.tar.gz -8dfa3d25d9a0146bd24324f5111d9db0 2.4 mxml/2.4/mxml-2.4.tar.gz -9b343cd7c7c139a24a382afc31a9a4e6 2.3 mxml/2.3/mxml-2.3-1.i386.rpm -2b0d69c35ada70ba9982f15cb05d006b 2.3 mxml/2.3/mxml-2.3.tar.gz -ab4ce33a866fc3e0d959e7e208a30acb 2.2.2 mxml/2.2.2/mxml-2.2.2-1.i386.rpm -ef69862ad30ef2fe66457415db5b5ab4 2.2.2 mxml/2.2.2/mxml-2.2.2.tar.gz -8b8aef306fa58cb693b89399d576864f 2.2.1 mxml/2.2.1/mxml-2.2.1-1.i386.rpm -ae8f134cc6e89ca66c0f098068516dbe 2.2.1 mxml/2.2.1/mxml-2.2.1.tar.gz -136f9dc7e44aaacc15747bd42222197c 2.2 mxml/2.2/mxml-2.2-1.i386.rpm -2c28aedee8a06eac173104a3fccce096 2.2 mxml/2.2/mxml-2.2.tar.gz -e30ff88b15f74964e20d80c6577a1cb9 2.1 mxml/2.1/mxml-2.1-1.i386.rpm -35f829a907c0319f83a3661591788ed3 2.1 mxml/2.1/mxml-2.1.tar.gz -2d010aa0cfc1058aa48b3c03bc3781ec 2.0 mxml/2.0/mxml-2.0-1.i386.rpm -bd9194cdbf717550a130789802e5b81c 2.0 mxml/2.0/mxml-2.0.tar.gz -9dfb974bd31d60c97bfa394b7f6ca63e 1.3 mxml/1.3/mxml-1.3-1.i386.rpm 9b116daa370bf647447d6ffe70e73534 1.3 mxml/1.3/mxml-1.3.tar.gz diff --git a/www/docfiles/advanced.html b/www/docfiles/advanced.html index 273dcf5..8cf2a90 100644 --- a/www/docfiles/advanced.html +++ b/www/docfiles/advanced.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + @@ -471,10 +471,10 @@ mxmlIndexEnum.

  • MXML_SAX_DATA - Data (custom, integer, opaque, real, or text) was just read
  • MXML_SAX_DIRECTIVE - A processing directive was just read
  • -
  • MXML_SAX_ELEMENT_CLOSE - An open element was just read ( -<element>)
  • -
  • MXML_SAX_ELEMENT_OPEN - A close element was just read ( +
  • MXML_SAX_ELEMENT_CLOSE - A close element was just read ( </element>)
  • +
  • MXML_SAX_ELEMENT_OPEN - An open element was just read ( +<element>)
  • Elements are released after the close element is processed. All other nodes are released after they are processed. The SAX callback diff --git a/www/docfiles/basics.html b/www/docfiles/basics.html index 1dd05bc..aa0f976 100644 --- a/www/docfiles/basics.html +++ b/www/docfiles/basics.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + @@ -68,10 +68,10 @@ hspace="10" src="2.gif" width="100">Getting Started with Mini-XML

    Nodes

    Every piece of information in an XML file (elements, text, numbers) is stored in memory in "nodes". Nodes are defined by the -mxml_node_t structure. The type - member defines the node type (element, integer, opaque, real, or - text) which determines which value you want to look at in the -value union.

    +mxml_node_t structure. The +type member defines the node type (element, integer, + opaque, real, or text) which determines which value you want to look at + in the value union.

    diff --git a/www/docfiles/index.html b/www/docfiles/index.html index a605858..0e90a95 100644 --- a/www/docfiles/index.html +++ b/www/docfiles/index.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + @@ -70,7 +70,12 @@ A { text-decoration: none } Using the mxmldoc Utility @@ -151,6 +156,7 @@ mxml_custom_destroy_cb_t
  • mxml_custom_t
  • mxml_element_t
  • +
  • mxml_entity_cb_t
  • mxml_error_cb_t
  • mxml_index_t
  • mxml_load_cb_t
  • @@ -159,6 +165,7 @@ mxml_custom_destroy_cb_t
  • mxml_sax_cb_t
  • mxml_sax_event_t
  • mxml_text_t
  • +
  • mxml_type_t
  • mxml_value_t
  • diff --git a/www/docfiles/install.html b/www/docfiles/install.html index 615623f..70ac246 100644 --- a/www/docfiles/install.html +++ b/www/docfiles/install.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + diff --git a/www/docfiles/intro.html b/www/docfiles/intro.html index 59b91a8..a984d66 100644 --- a/www/docfiles/intro.html +++ b/www/docfiles/intro.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + @@ -28,7 +28,7 @@ A { text-decoration: none }

    0Introduction

    -

    This programmers manual describes Mini-XML version 2.5, a small XML +

    This programmers manual describes Mini-XML version 2.6, a small XML parsing library that you can use to read and write XML data files in your C and C++ applications.

    Mini-XML was initially developed for the @@ -54,12 +54,13 @@ libxml2 library with something substantially smaller and projects/software applications:

    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.

    + +

    Organization of This Document

    This manual is organized into the following chapters and appendices:

      @@ -90,14 +91,14 @@ libxml2 library with something substantially smaller and

      Various font and syntax conventions are used in this guide. Examples and their meanings and uses are explained below:

      -
      lpstat -
      lpstat(1)
      +
      mxmldoc +
      mxmldoc(1)
      The names of commands; the first mention of a command or function in a chapter is followed by a manual page section number.

      /var -
      /usr/share/cups/data/testprint.ps
      +
      /etc/hosts
      File and directory names.

      @@ -164,16 +165,9 @@ libxml2 library with something substantially smaller and

      Legal Stuff

      -

      The Mini-XML library is copyright 2003-2008 by Michael Sweet.

      -

      This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library - General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version.

      -

      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.

      +

      The Mini-XML library is copyright 2003-2009 by Michael Sweet. License + terms are described in Appendix A - + Mini-XML License.


      Contents Next diff --git a/www/docfiles/license.html b/www/docfiles/license.html index 27ef792..090cf5c 100644 --- a/www/docfiles/license.html +++ b/www/docfiles/license.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + @@ -47,6 +47,8 @@ hspace="10" src="A.gif" width="100">Mini-XML License identify the Mini-XML license in your program or documentation as required by section 6 of the LGPL. + +

      GNU LIBRARY GENERAL PUBLIC LICENSE

      Version 2, June 1991
      Copyright (C) 1991 Free Software Foundation, Inc. diff --git a/www/docfiles/mxmldoc.html b/www/docfiles/mxmldoc.html index a86ba75..3683ad2 100644 --- a/www/docfiles/mxmldoc.html +++ b/www/docfiles/mxmldoc.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + @@ -64,6 +64,7 @@ hspace="10" src="4.gif" width="100">Using the mxmldoc Utility

           mxmldoc filename.xml >filename.html ENTER
       
      +

      Creating Man Pages

      The --man filename option tells mxmldoc to create a man page instead of HTML documentation, for example:

      @@ -72,10 +73,16 @@ hspace="10" src="4.gif" width="100">Using the mxmldoc Utility
       
           mxmldoc --man filename *.h *.c \
               >filename.man ENTER
      -
      -    mxmldoc --man filename filename.xml *.h *.c \
      -        >filename.man ENTER
       
      +

      Creating Xcode Documentation Sets

      +

      The --docset directory.docset option tells mxmldoc + to create an Xcode documentation set containing the HTML documentation, + for example:

      +
      +    mxmldoc --docset foo.docset *.h *.c foo.xml ENTER
      +
      +

      Xcode documentation sets can only be built on Mac OS X with Xcode 3.0 + or higher installed.

      Commenting Your Code

      As noted previously, mxmldoc looks for in-line comments to describe the functions, types, and constants in your code. Mxmldoc diff --git a/www/docfiles/reference.html b/www/docfiles/reference.html index 73a1b81..866909d 100644 --- a/www/docfiles/reference.html +++ b/www/docfiles/reference.html @@ -1,1615 +1,1585 @@ - - -Documentation - - - - -

      -

      CLibrary -Reference

      - -

      Contents

      -
        -
      • Functions
      • -
      • Data Types
      • -
      • Structures
      • -
      • Unions
      • -
      • Constants
      • -

        Functions

        -

        mxmlAdd

        -

        Add a node to a tree.

        -

        -void mxmlAdd (
        -    mxml_node_t *parent,
        -    int where,
        -    mxml_node_t *child,
        -    mxml_node_t *node
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node
        -
        where
        -
        Where to add, MXML_ADD_BEFORE or MXML_ADD_AFTER
        -
        child
        -
        Child node for where or MXML_ADD_TO_PARENT
        -
        node
        -
        Node to add
        -
        -

        Discussion

        -

        Adds the specified node to the parent. If the child argument is not -NULL, puts the new node before or after the specified child depending -on the value of the where argument. If the child argument is NULL, -puts the new node at the beginning of the child list (MXML_ADD_BEFORE) -or at the end of the child list (MXML_ADD_AFTER). The constant -MXML_ADD_TO_PARENT can be used to specify a NULL child pointer.

        -

        mxmlDelete

        -

        Delete a node and all of its children.

        -

        -void mxmlDelete (
        -    mxml_node_t *node
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to delete
        -
        -

        Discussion

        -

        If the specified node has a parent, this function first removes the -node from its parent using the mxmlRemove() function.

        -

         Mini-XML 2.4 mxmlElementDeleteAttr

        -

        Delete an attribute.

        -

        -void mxmlElementDeleteAttr (
        -    mxml_node_t *node,
        -    const char *name
        -);

        -

        Parameters

        -
        -
        node
        -
        Element
        -
        name
        -
        Attribute name
        -
        -

        mxmlElementGetAttr

        -

        Get an attribute.

        -

        -const char *mxmlElementGetAttr (
        -    mxml_node_t *node,
        -    const char *name
        -);

        -

        Parameters

        -
        -
        node
        -
        Element node
        -
        name
        -
        Name of attribute
        -
        -

        Return Value

        -

        Attribute value or NULL

        -

        Discussion

        -

        This function returns NULL if the node is not an element or the -named attribute does not exist.

        -

        mxmlElementSetAttr

        -

        Set an attribute.

        -

        -void mxmlElementSetAttr (
        -    mxml_node_t *node,
        -    const char *name,
        -    const char *value
        -);

        -

        Parameters

        -
        -
        node
        -
        Element node
        -
        name
        -
        Name of attribute
        -
        value
        -
        Attribute value
        -
        -

        Discussion

        -

        If the named attribute already exists, the value of the attribute -is replaced by the new string value. The string value is copied -into the element node. This function does nothing if the node is -not an element.

        -

         Mini-XML 2.3 mxmlElementSetAttrf

        -

        Set an attribute with a formatted value.

        -

        -void mxmlElementSetAttrf (
        -    mxml_node_t *node,
        -    const char *name,
        -    const char *format,
        -    ...
        -);

        -

        Parameters

        -
        -
        node
        -
        Element node
        -
        name
        -
        Name of attribute
        -
        format
        -
        Printf-style attribute value
        -
        ...
        -
        Additional arguments as needed
        -
        -

        Discussion

        -

        If the named attribute already exists, the value of the attribute -is replaced by the new formatted string. The formatted string value is -copied into the element node. This function does nothing if the node -is not an element. - -

        -

        mxmlEntityAddCallback

        -

        Add a callback to convert entities to Unicode.

        -

        -int mxmlEntityAddCallback (void);

        -

        Return Value

        -

        0 on success, -1 on failure

        -

        mxmlEntityGetName

        -

        Get the name that corresponds to the character value.

        -

        -const char *mxmlEntityGetName (
        -    int val
        -);

        -

        Parameters

        -
        -
        val
        -
        Character value
        -
        -

        Return Value

        -

        Entity name or NULL

        -

        Discussion

        -

        If val does not need to be represented by a named entity, NULL is returned.

        -

        mxmlEntityGetValue

        -

        Get the character corresponding to a named entity.

        -

        -int mxmlEntityGetValue (
        -    const char *name
        -);

        -

        Parameters

        -
        -
        name
        -
        Entity name
        -
        -

        Return Value

        -

        Character value or -1 on error

        -

        Discussion

        -

        The entity name can also be a numeric constant. -1 is returned if the -name is not known.

        -

        mxmlEntityRemoveCallback

        -

        Remove a callback.

        -

        -void mxmlEntityRemoveCallback (void);

        -

        mxmlFindElement

        -

        Find the named element.

        -

        -mxml_node_t *mxmlFindElement (
        -    mxml_node_t *node,
        -    mxml_node_t *top,
        -    const char *name,
        -    const char *attr,
        -    const char *value,
        -    int descend
        -);

        -

        Parameters

        -
        -
        node
        -
        Current node
        -
        top
        -
        Top node
        -
        name
        -
        Element name or NULL for any
        -
        attr
        -
        Attribute name, or NULL for none
        -
        value
        -
        Attribute value, or NULL for any
        -
        descend
        -
        Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
        -
        -

        Return Value

        -

        Element node or NULL

        -

        Discussion

        -

        The search is constrained by the name, attribute name, and value; any -NULL names or values are treated as wildcards, so different kinds of -searches can be implemented by looking for all elements of a given name -or all elements with a specific attribute. The descend argument determines -whether the search descends into child nodes; normally you will use -MXML_DESCEND_FIRST for the initial search and MXML_NO_DESCEND to find -additional direct descendents of the node. The top node argument -constrains the search to a particular node's children.

        -

        mxmlIndexDelete

        -

        Delete an index.

        -

        -void mxmlIndexDelete (
        -    mxml_index_t *ind
        -);

        -

        Parameters

        -
        -
        ind
        -
        Index to delete
        -
        -

        mxmlIndexEnum

        -

        Return the next node in the index.

        -

        -mxml_node_t *mxmlIndexEnum (
        -    mxml_index_t *ind
        -);

        -

        Parameters

        -
        -
        ind
        -
        Index to enumerate
        -
        -

        Return Value

        -

        Next node or NULL if there is none

        -

        Discussion

        -

        Nodes are returned in the sorted order of the index.

        -

        mxmlIndexFind

        -

        Find the next matching node.

        -

        -mxml_node_t *mxmlIndexFind (
        -    mxml_index_t *ind,
        -    const char *element,
        -    const char *value
        -);

        -

        Parameters

        -
        -
        ind
        -
        Index to search
        -
        element
        -
        Element name to find, if any
        -
        value
        -
        Attribute value, if any
        -
        -

        Return Value

        -

        Node or NULL if none found

        -

        Discussion

        -

        You should call mxmlIndexReset() prior to using this function for -the first time with a particular set of "element" and "value" -strings. Passing NULL for both "element" and "value" is equivalent -to calling mxmlIndexEnum().

        -

        mxmlIndexNew

        -

        Create a new index.

        -

        -mxml_index_t *mxmlIndexNew (
        -    mxml_node_t *node,
        -    const char *element,
        -    const char *attr
        -);

        -

        Parameters

        -
        -
        node
        -
        XML node tree
        -
        element
        -
        Element to index or NULL for all
        -
        attr
        -
        Attribute to index or NULL for none
        -
        -

        Return Value

        -

        New index

        -

        Discussion

        -

        The index will contain all nodes that contain the named element and/or -attribute. If both "element" and "attr" are NULL, then the index will -contain a sorted list of the elements in the node tree. Nodes are -sorted by element name and optionally by attribute value if the "attr" -argument is not NULL.

        -

        mxmlIndexReset

        -

        Reset the enumeration/find pointer in the index and -return the first node in the index.

        -

        -mxml_node_t *mxmlIndexReset (
        -    mxml_index_t *ind
        -);

        -

        Parameters

        -
        -
        ind
        -
        Index to reset
        -
        -

        Return Value

        -

        First node or NULL if there is none

        -

        Discussion

        -

        This function should be called prior to using mxmlIndexEnum() or -mxmlIndexFind() for the first time.

        -

        mxmlLoadFd

        -

        Load a file descriptor into an XML node tree.

        -

        -mxml_node_t *mxmlLoadFd (
        -    mxml_node_t *top,
        -    int fd,
        -    mxml_load_cb_t cb
        -);

        -

        Parameters

        -
        -
        top
        -
        Top node
        -
        fd
        -
        File descriptor to read from
        -
        cb
        -
        Callback function or MXML_NO_CALLBACK
        -
        -

        Return Value

        -

        First node or NULL if the file could not be read.

        -

        Discussion

        -

        The nodes in the specified file are added to the specified top node. -If no top node is provided, the XML file MUST be well-formed with a -single parent node like <?xml> for the entire file. The callback -function returns the value type that should be used for child nodes. -If MXML_NO_CALLBACK is specified then all child nodes will be either -MXML_ELEMENT or MXML_TEXT nodes.
        -
        -The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, -MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading -child nodes of the specified type.

        -

        mxmlLoadFile

        -

        Load a file into an XML node tree.

        -

        -mxml_node_t *mxmlLoadFile (
        -    mxml_node_t *top,
        -    FILE *fp,
        -    mxml_load_cb_t cb
        -);

        -

        Parameters

        -
        -
        top
        -
        Top node
        -
        fp
        -
        File to read from
        -
        cb
        -
        Callback function or MXML_NO_CALLBACK
        -
        -

        Return Value

        -

        First node or NULL if the file could not be read.

        -

        Discussion

        -

        The nodes in the specified file are added to the specified top node. -If no top node is provided, the XML file MUST be well-formed with a -single parent node like <?xml> for the entire file. The callback -function returns the value type that should be used for child nodes. -If MXML_NO_CALLBACK is specified then all child nodes will be either -MXML_ELEMENT or MXML_TEXT nodes.
        -
        -The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, -MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading -child nodes of the specified type.

        -

        mxmlLoadString

        -

        Load a string into an XML node tree.

        -

        -mxml_node_t *mxmlLoadString (
        -    mxml_node_t *top,
        -    const char *s,
        -    mxml_load_cb_t cb
        -);

        -

        Parameters

        -
        -
        top
        -
        Top node
        -
        s
        -
        String to load
        -
        cb
        -
        Callback function or MXML_NO_CALLBACK
        -
        -

        Return Value

        -

        First node or NULL if the string has errors.

        -

        Discussion

        -

        The nodes in the specified string are added to the specified top node. -If no top node is provided, the XML string MUST be well-formed with a -single parent node like <?xml> for the entire string. The callback -function returns the value type that should be used for child nodes. -If MXML_NO_CALLBACK is specified then all child nodes will be either -MXML_ELEMENT or MXML_TEXT nodes.
        -
        -The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, -MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading -child nodes of the specified type.

        -

         Mini-XML 2.3 mxmlNewCDATA

        -

        Create a new CDATA node.

        -

        -mxml_node_t *mxmlNewCDATA (
        -    mxml_node_t *parent,
        -    const char *data
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node or MXML_NO_PARENT
        -
        data
        -
        Data string
        -
        -

        Return Value

        -

        New node

        -

        Discussion

        -

        The new CDATA node is added to the end of the specified parent's child -list. The constant MXML_NO_PARENT can be used to specify that the new -CDATA node has no parent. The data string must be nul-terminated and -is copied into the new node. CDATA nodes use the MXML_ELEMENT type. - -

        -

         Mini-XML 2.1 mxmlNewCustom

        -

        Create a new custom data node.

        -

        -mxml_node_t *mxmlNewCustom (
        -    mxml_node_t *parent,
        -    void *data,
        -    mxml_custom_destroy_cb_t destroy
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node or MXML_NO_PARENT
        -
        data
        -
        Pointer to data
        -
        destroy
        -
        Function to destroy data
        -
        -

        Return Value

        -

        New node

        -

        Discussion

        -

        The new custom node is added to the end of the specified parent's child -list. The constant MXML_NO_PARENT can be used to specify that the new -element node has no parent. NULL can be passed when the data in the -node is not dynamically allocated or is separately managed. - -

        -

        mxmlNewElement

        -

        Create a new element node.

        -

        -mxml_node_t *mxmlNewElement (
        -    mxml_node_t *parent,
        -    const char *name
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node or MXML_NO_PARENT
        -
        name
        -
        Name of element
        -
        -

        Return Value

        -

        New node

        -

        Discussion

        -

        The new element node is added to the end of the specified parent's child -list. The constant MXML_NO_PARENT can be used to specify that the new -element node has no parent.

        -

        mxmlNewInteger

        -

        Create a new integer node.

        -

        -mxml_node_t *mxmlNewInteger (
        -    mxml_node_t *parent,
        -    int integer
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node or MXML_NO_PARENT
        -
        integer
        -
        Integer value
        -
        -

        Return Value

        -

        New node

        -

        Discussion

        -

        The new integer node is added to the end of the specified parent's child -list. The constant MXML_NO_PARENT can be used to specify that the new -integer node has no parent.

        -

        mxmlNewOpaque

        -

        Create a new opaque string.

        -

        -mxml_node_t *mxmlNewOpaque (
        -    mxml_node_t *parent,
        -    const char *opaque
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node or MXML_NO_PARENT
        -
        opaque
        -
        Opaque string
        -
        -

        Return Value

        -

        New node

        -

        Discussion

        -

        The new opaque node is added to the end of the specified parent's child -list. The constant MXML_NO_PARENT can be used to specify that the new -opaque node has no parent. The opaque string must be nul-terminated and -is copied into the new node.

        -

        mxmlNewReal

        -

        Create a new real number node.

        -

        -mxml_node_t *mxmlNewReal (
        -    mxml_node_t *parent,
        -    double real
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node or MXML_NO_PARENT
        -
        real
        -
        Real number value
        -
        -

        Return Value

        -

        New node

        -

        Discussion

        -

        The new real number node is added to the end of the specified parent's -child list. The constant MXML_NO_PARENT can be used to specify that -the new real number node has no parent.

        -

        mxmlNewText

        -

        Create a new text fragment node.

        -

        -mxml_node_t *mxmlNewText (
        -    mxml_node_t *parent,
        -    int whitespace,
        -    const char *string
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node or MXML_NO_PARENT
        -
        whitespace
        -
        1 = leading whitespace, 0 = no whitespace
        -
        string
        -
        String
        -
        -

        Return Value

        -

        New node

        -

        Discussion

        -

        The new text node is added to the end of the specified parent's child -list. The constant MXML_NO_PARENT can be used to specify that the new -text node has no parent. The whitespace parameter is used to specify -whether leading whitespace is present before the node. The text -string must be nul-terminated and is copied into the new node.

        -

        mxmlNewTextf

        -

        Create a new formatted text fragment node.

        -

        -mxml_node_t *mxmlNewTextf (
        -    mxml_node_t *parent,
        -    int whitespace,
        -    const char *format,
        -    ...
        -);

        -

        Parameters

        -
        -
        parent
        -
        Parent node or MXML_NO_PARENT
        -
        whitespace
        -
        1 = leading whitespace, 0 = no whitespace
        -
        format
        -
        Printf-style frmat string
        -
        ...
        -
        Additional args as needed
        -
        -

        Return Value

        -

        New node

        -

        Discussion

        -

        The new text node is added to the end of the specified parent's child -list. The constant MXML_NO_PARENT can be used to specify that the new -text node has no parent. The whitespace parameter is used to specify -whether leading whitespace is present before the node. The format -string must be nul-terminated and is formatted into the new node.

        -

         Mini-XML 2.3 mxmlNewXML

        -

        Create a new XML document tree.

        -

        -mxml_node_t *mxmlNewXML (
        -    const char *version
        -);

        -

        Parameters

        -
        -
        version
        -
        Version number to use
        -
        -

        Return Value

        -

        New ?xml node

        -

        Discussion

        -

        The "version" argument specifies the version number to put in the -?xml element node. If NULL, version 1.0 is assumed. - -

        -

         Mini-XML 2.3 mxmlRelease

        -

        Release a node.

        -

        -int mxmlRelease (
        -    mxml_node_t *node
        -);

        -

        Parameters

        -
        -
        node
        -
        Node
        -
        -

        Return Value

        -

        New reference count

        -

        Discussion

        -

        When the reference count reaches zero, the node (and any children) -is deleted via mxmlDelete(). - -

        -

        mxmlRemove

        -

        Remove a node from its parent.

        -

        -void mxmlRemove (
        -    mxml_node_t *node
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to remove
        -
        -

        Discussion

        -

        Does not free memory used by the node - use mxmlDelete() for that. -This function does nothing if the node has no parent.

        -

         Mini-XML 2.3 mxmlRetain

        -

        Retain a node.

        -

        -int mxmlRetain (
        -    mxml_node_t *node
        -);

        -

        Parameters

        -
        -
        node
        -
        Node
        -
        -

        Return Value

        -

        New reference count

        -

         Mini-XML 2.3 mxmlSAXLoadFd

        -

        Load a file descriptor into an XML node tree -using a SAX callback.

        -

        -mxml_node_t *mxmlSAXLoadFd (
        -    mxml_node_t *top,
        -    int fd,
        -    mxml_load_cb_t cb,
        -    mxml_sax_cb_t sax_cb,
        -    void *sax_data
        -);

        -

        Parameters

        -
        -
        top
        -
        Top node
        -
        fd
        -
        File descriptor to read from
        -
        cb
        -
        Callback function or MXML_NO_CALLBACK
        -
        sax_cb
        -
        SAX callback or MXML_NO_CALLBACK
        -
        sax_data
        -
        SAX user data
        -
        -

        Return Value

        -

        First node or NULL if the file could not be read.

        -

        Discussion

        -

        The nodes in the specified file are added to the specified top node. -If no top node is provided, the XML file MUST be well-formed with a -single parent node like <?xml> for the entire file. The callback -function returns the value type that should be used for child nodes. -If MXML_NO_CALLBACK is specified then all child nodes will be either -MXML_ELEMENT or MXML_TEXT nodes.
        -
        -The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, -MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading -child nodes of the specified type.
        -
        -The SAX callback must call mxmlRetain() for any nodes that need to -be kept for later use. Otherwise, nodes are deleted when the parent -node is closed or after each data, comment, CDATA, or directive node. - -

        -

         Mini-XML 2.3 mxmlSAXLoadFile

        -

        Load a file into an XML node tree -using a SAX callback.

        -

        -mxml_node_t *mxmlSAXLoadFile (
        -    mxml_node_t *top,
        -    FILE *fp,
        -    mxml_load_cb_t cb,
        -    mxml_sax_cb_t sax_cb,
        -    void *sax_data
        -);

        -

        Parameters

        -
        -
        top
        -
        Top node
        -
        fp
        -
        File to read from
        -
        cb
        -
        Callback function or MXML_NO_CALLBACK
        -
        sax_cb
        -
        SAX callback or MXML_NO_CALLBACK
        -
        sax_data
        -
        SAX user data
        -
        -

        Return Value

        -

        First node or NULL if the file could not be read.

        -

        Discussion

        -

        The nodes in the specified file are added to the specified top node. -If no top node is provided, the XML file MUST be well-formed with a -single parent node like <?xml> for the entire file. The callback -function returns the value type that should be used for child nodes. -If MXML_NO_CALLBACK is specified then all child nodes will be either -MXML_ELEMENT or MXML_TEXT nodes.
        -
        -The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, -MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading -child nodes of the specified type.
        -
        -The SAX callback must call mxmlRetain() for any nodes that need to -be kept for later use. Otherwise, nodes are deleted when the parent -node is closed or after each data, comment, CDATA, or directive node. - -

        -

         Mini-XML 2.3 mxmlSAXLoadString

        -

        Load a string into an XML node tree -using a SAX callback.

        -

        -mxml_node_t *mxmlSAXLoadString (
        -    mxml_node_t *top,
        -    const char *s,
        -    mxml_load_cb_t cb,
        -    mxml_sax_cb_t sax_cb,
        -    void *sax_data
        -);

        -

        Parameters

        -
        -
        top
        -
        Top node
        -
        s
        -
        String to load
        -
        cb
        -
        Callback function or MXML_NO_CALLBACK
        -
        sax_cb
        -
        SAX callback or MXML_NO_CALLBACK
        -
        sax_data
        -
        SAX user data
        -
        -

        Return Value

        -

        First node or NULL if the string has errors.

        -

        Discussion

        -

        The nodes in the specified string are added to the specified top node. -If no top node is provided, the XML string MUST be well-formed with a -single parent node like <?xml> for the entire string. The callback -function returns the value type that should be used for child nodes. -If MXML_NO_CALLBACK is specified then all child nodes will be either -MXML_ELEMENT or MXML_TEXT nodes.
        -
        -The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, -MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading -child nodes of the specified type.
        -
        -The SAX callback must call mxmlRetain() for any nodes that need to -be kept for later use. Otherwise, nodes are deleted when the parent -node is closed or after each data, comment, CDATA, or directive node. - -

        -

        mxmlSaveAllocString

        -

        Save an XML node tree to an allocated string.

        -

        -char *mxmlSaveAllocString (
        -    mxml_node_t *node,
        -    mxml_save_cb_t cb
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to write
        -
        cb
        -
        Whitespace callback or MXML_NO_CALLBACK
        -
        -

        Return Value

        -

        Allocated string or NULL

        -

        Discussion

        -

        This function returns a pointer to a string containing the textual -representation of the XML node tree. The string should be freed -using the free() function when you are done with it. NULL is returned -if the node would produce an empty string or if the string cannot be -allocated.
        -
        -The callback argument specifies a function that returns a whitespace -string or NULL before and after each element. If MXML_NO_CALLBACK -is specified, whitespace will only be added before MXML_TEXT nodes -with leading whitespace and before attribute names inside opening -element tags.

        -

        mxmlSaveFd

        -

        Save an XML tree to a file descriptor.

        -

        -int mxmlSaveFd (
        -    mxml_node_t *node,
        -    int fd,
        -    mxml_save_cb_t cb
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to write
        -
        fd
        -
        File descriptor to write to
        -
        cb
        -
        Whitespace callback or MXML_NO_CALLBACK
        -
        -

        Return Value

        -

        0 on success, -1 on error.

        -

        Discussion

        -

        The callback argument specifies a function that returns a whitespace -string or NULL before and after each element. If MXML_NO_CALLBACK -is specified, whitespace will only be added before MXML_TEXT nodes -with leading whitespace and before attribute names inside opening -element tags.

        -

        mxmlSaveFile

        -

        Save an XML tree to a file.

        -

        -int mxmlSaveFile (
        -    mxml_node_t *node,
        -    FILE *fp,
        -    mxml_save_cb_t cb
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to write
        -
        fp
        -
        File to write to
        -
        cb
        -
        Whitespace callback or MXML_NO_CALLBACK
        -
        -

        Return Value

        -

        0 on success, -1 on error.

        -

        Discussion

        -

        The callback argument specifies a function that returns a whitespace -string or NULL before and after each element. If MXML_NO_CALLBACK -is specified, whitespace will only be added before MXML_TEXT nodes -with leading whitespace and before attribute names inside opening -element tags.

        -

        mxmlSaveString

        -

        Save an XML node tree to a string.

        -

        -int mxmlSaveString (
        -    mxml_node_t *node,
        -    char *buffer,
        -    int bufsize,
        -    mxml_save_cb_t cb
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to write
        -
        buffer
        -
        String buffer
        -
        bufsize
        -
        Size of string buffer
        -
        cb
        -
        Whitespace callback or MXML_NO_CALLBACK
        -
        -

        Return Value

        -

        Size of string

        -

        Discussion

        -

        This function returns the total number of bytes that would be -required for the string but only copies (bufsize - 1) characters -into the specified buffer.
        -
        -The callback argument specifies a function that returns a whitespace -string or NULL before and after each element. If MXML_NO_CALLBACK -is specified, whitespace will only be added before MXML_TEXT nodes -with leading whitespace and before attribute names inside opening -element tags.

        -

         Mini-XML 2.3 mxmlSetCDATA

        -

        Set the element name of a CDATA node.

        -

        -int mxmlSetCDATA (
        -    mxml_node_t *node,
        -    const char *data
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to set
        -
        data
        -
        New data string
        -
        -

        Return Value

        -

        0 on success, -1 on failure

        -

        Discussion

        -

        The node is not changed if it is not a CDATA element node. - -

        -

         Mini-XML 2.1 mxmlSetCustom

        -

        Set the data and destructor of a custom data node.

        -

        -int mxmlSetCustom (
        -    mxml_node_t *node,
        -    void *data,
        -    mxml_custom_destroy_cb_t destroy
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to set
        -
        data
        -
        New data pointer
        -
        destroy
        -
        New destructor function
        -
        -

        Return Value

        -

        0 on success, -1 on failure

        -

        Discussion

        -

        The node is not changed if it is not a custom node. - -

        -

        mxmlSetCustomHandlers

        -

        Set the handling functions for custom data.

        -

        -void mxmlSetCustomHandlers (
        -    mxml_custom_load_cb_t load,
        -    mxml_custom_save_cb_t save
        -);

        -

        Parameters

        -
        -
        load
        -
        Load function
        -
        save
        -
        Save function
        -
        -

        Discussion

        -

        The load function accepts a node pointer and a data string and must -return 0 on success and non-zero on error.
        -
        -The save function accepts a node pointer and must return a malloc'd -string on success and NULL on error.

        -

        mxmlSetElement

        -

        Set the name of an element node.

        -

        -int mxmlSetElement (
        -    mxml_node_t *node,
        -    const char *name
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to set
        -
        name
        -
        New name string
        -
        -

        Return Value

        -

        0 on success, -1 on failure

        -

        Discussion

        -

        The node is not changed if it is not an element node.

        -

        mxmlSetErrorCallback

        -

        Set the error message callback.

        -

        -void mxmlSetErrorCallback (
        -    mxml_error_cb_t cb
        -);

        -

        Parameters

        -
        -
        cb
        -
        Error callback function
        -
        -

        mxmlSetInteger

        -

        Set the value of an integer node.

        -

        -int mxmlSetInteger (
        -    mxml_node_t *node,
        -    int integer
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to set
        -
        integer
        -
        Integer value
        -
        -

        Return Value

        -

        0 on success, -1 on failure

        -

        Discussion

        -

        The node is not changed if it is not an integer node.

        -

        mxmlSetOpaque

        -

        Set the value of an opaque node.

        -

        -int mxmlSetOpaque (
        -    mxml_node_t *node,
        -    const char *opaque
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to set
        -
        opaque
        -
        Opaque string
        -
        -

        Return Value

        -

        0 on success, -1 on failure

        -

        Discussion

        -

        The node is not changed if it is not an opaque node.

        -

        mxmlSetReal

        -

        Set the value of a real number node.

        -

        -int mxmlSetReal (
        -    mxml_node_t *node,
        -    double real
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to set
        -
        real
        -
        Real number value
        -
        -

        Return Value

        -

        0 on success, -1 on failure

        -

        Discussion

        -

        The node is not changed if it is not a real number node.

        -

        mxmlSetText

        -

        Set the value of a text node.

        -

        -int mxmlSetText (
        -    mxml_node_t *node,
        -    int whitespace,
        -    const char *string
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to set
        -
        whitespace
        -
        1 = leading whitespace, 0 = no whitespace
        -
        string
        -
        String
        -
        -

        Return Value

        -

        0 on success, -1 on failure

        -

        Discussion

        -

        The node is not changed if it is not a text node.

        -

        mxmlSetTextf

        -

        Set the value of a text node to a formatted string.

        -

        -int mxmlSetTextf (
        -    mxml_node_t *node,
        -    int whitespace,
        -    const char *format,
        -    ...
        -);

        -

        Parameters

        -
        -
        node
        -
        Node to set
        -
        whitespace
        -
        1 = leading whitespace, 0 = no whitespace
        -
        format
        -
        Printf-style format string
        -
        ...
        -
        Additional arguments as needed
        -
        -

        Return Value

        -

        0 on success, -1 on failure

        -

        Discussion

        -

        The node is not changed if it is not a text node.

        -

         Mini-XML 2.3 mxmlSetWrapMargin

        -

        Set the the wrap margin when saving XML data.

        -

        -void mxmlSetWrapMargin (
        -    int column
        -);

        -

        Parameters

        -
        -
        column
        -
        Column for wrapping, 0 to disable wrapping
        -
        -

        Discussion

        -

        Wrapping is disabled when "column" is 0. - -

        -

        mxmlWalkNext

        -

        Walk to the next logical node in the tree.

        -

        -mxml_node_t *mxmlWalkNext (
        -    mxml_node_t *node,
        -    mxml_node_t *top,
        -    int descend
        -);

        -

        Parameters

        -
        -
        node
        -
        Current node
        -
        top
        -
        Top node
        -
        descend
        -
        Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
        -
        -

        Return Value

        -

        Next node or NULL

        -

        Discussion

        -

        The descend argument controls whether the first child is considered -to be the next node. The top node argument constrains the walk to -the node's children.

        -

        mxmlWalkPrev

        -

        Walk to the previous logical node in the tree.

        -

        -mxml_node_t *mxmlWalkPrev (
        -    mxml_node_t *node,
        -    mxml_node_t *top,
        -    int descend
        -);

        -

        Parameters

        -
        -
        node
        -
        Current node
        -
        top
        -
        Top node
        -
        descend
        -
        Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
        -
        -

        Return Value

        -

        Previous node or NULL

        -

        Discussion

        -

        The descend argument controls whether the previous node's last child -is considered to be the previous node. The top node argument constrains -the walk to the node's children.

        -

        Data Types

        -

        mxml_attr_t

        -

        An XML element attribute value.

        -

        -typedef struct mxml_attr_s mxml_attr_t; -

        -

        mxml_custom_destroy_cb_t

        -

        Custom data destructor

        -

        -typedef void (*mxml_custom_destroy_cb_t)(void *); -

        -

        mxml_custom_load_cb_t

        -

        Custom data load callback function

        -

        -typedef int (*mxml_custom_load_cb_t)(mxml_node_t *, const char *); -

        -

        mxml_custom_save_cb_t

        -

        Custom data save callback function

        -

        -typedef char *(*mxml_custom_save_cb_t)(mxml_node_t *); -

        -

         Mini-XML 2.1 mxml_custom_t

        -

        An XML custom value.

        -

        -typedef struct mxml_custom_s mxml_custom_t; -

        -

        mxml_element_t

        -

        An XML element value.

        -

        -typedef struct mxml_element_s mxml_element_t; -

        -

        mxml_error_cb_t

        -

        Error callback function

        -

        -typedef void (*mxml_error_cb_t)(const char *); -

        -

        mxml_index_t

        -

        An XML node index.

        -

        -typedef struct mxml_index_s mxml_index_t; -

        -

        mxml_load_cb_t

        -

        Load callback function

        -

        -typedef mxml_type_t (*mxml_load_cb_t)(mxml_node_t *); -

        -

        mxml_node_t

        -

        An XML node.

        -

        -typedef struct mxml_node_s mxml_node_t; -

        -

        mxml_save_cb_t

        -

        Save callback function

        -

        -typedef const char *(*mxml_save_cb_t)(mxml_node_t *, int); -

        -

        mxml_sax_cb_t

        -

        SAX callback function

        -

        -typedef void (*mxml_sax_cb_t)(mxml_node_t *, mxml_sax_event_t, void *); -

        -

        mxml_sax_event_t

        -

        SAX event type.

        -

        -typedef enum mxml_sax_event_e mxml_sax_event_t; -

        -

        mxml_text_t

        -

        An XML text value.

        -

        -typedef struct mxml_text_s mxml_text_t; -

        -

        mxml_type_t

        -

        The XML node type.

        -

        -typedef enum mxml_type_e mxml_type_t; -

        -

        mxml_value_t

        -

        An XML node value.

        -

        -typedef union mxml_value_u mxml_value_t; -

        -

        Structures

        -

        mxml_attr_s

        -

        An XML element attribute value.

        -

        struct mxml_attr_s {
        -    char *name;
        -    char *value;
        -};

        -

        Members

        -
        -
        name
        -
        Attribute name
        -
        value
        -
        Attribute value
        -
        -

         Mini-XML 2.1 mxml_custom_s

        -

        An XML custom value.

        -

        struct mxml_custom_s {
        -    void *data;
        -    mxml_custom_destroy_cb_t destroy;
        -};

        -

        Members

        -
        -
        data
        -
        Pointer to (allocated) custom data
        -
        destroy
        -
        Pointer to destructor function
        -
        -

        mxml_element_s

        -

        An XML element value.

        -

        struct mxml_element_s {
        -    mxml_attr_t *attrs;
        -    char *name;
        -    int num_attrs;
        -};

        -

        Members

        -
        -
        attrs
        -
        Attributes
        -
        name
        -
        Name of element
        -
        num_attrs
        -
        Number of attributes
        -
        -

        mxml_index_s

        -

        An XML node index.

        -

        struct mxml_index_s {
        -    int alloc_nodes;
        -    char *attr;
        -    int cur_node;
        -    mxml_node_t **nodes;
        -    int num_nodes;
        -};

        -

        Members

        -
        -
        alloc_nodes
        -
        Allocated nodes in index
        -
        attr
        -
        Attribute used for indexing or NULL
        -
        cur_node
        -
        Current node
        -
        nodes
        -
        Node array
        -
        num_nodes
        -
        Number of nodes in index
        -
        -

        mxml_node_s

        -

        An XML node.

        -

        struct mxml_node_s {
        -    struct mxml_node_s *child;
        -    struct mxml_node_s *last_child;
        -    struct mxml_node_s *next;
        -    struct mxml_node_s *parent;
        -    struct mxml_node_s *prev;
        -    int ref_count;
        -    mxml_type_t type;
        -    void *user_data;
        -    mxml_value_t value;
        -};

        -

        Members

        -
        -
        child
        -
        First child node
        -
        last_child
        -
        Last child node
        -
        next
        -
        Next node under same parent
        -
        parent
        -
        Parent node
        -
        prev
        -
        Previous node under same parent
        -
        ref_count
        -
        Use count
        -
        type
        -
        Node type
        -
        user_data
        -
        User data
        -
        value
        -
        Node value
        -
        -

        mxml_text_s

        -

        An XML text value.

        -

        struct mxml_text_s {
        -    char *string;
        -    int whitespace;
        -};

        -

        Members

        -
        -
        string
        -
        Fragment string
        -
        whitespace
        -
        Leading whitespace?
        -
        -

        Unions

        -

        mxml_value_u

        -

        An XML node value.

        -

        union mxml_value_u {
        -    mxml_custom_t custom;
        -    mxml_element_t element;
        -    int integer;
        -    char *opaque;
        -    double real;
        -    mxml_text_t text;
        -};

        -

        Members

        -
        -
        custom  Mini-XML 2.1 
        -
        Custom data
        -
        element
        -
        Element
        -
        integer
        -
        Integer number
        -
        opaque
        -
        Opaque string
        -
        real
        -
        Real number
        -
        text
        -
        Text fragment
        -
        -

        Constants

        -

        mxml_sax_event_e

        -

        SAX event type.

        -

        Constants

        -
        -
        MXML_SAX_CDATA
        -
        CDATA node
        -
        MXML_SAX_COMMENT
        -
        Comment node
        -
        MXML_SAX_DATA
        -
        Data node
        -
        MXML_SAX_DIRECTIVE
        -
        Processing directive node
        -
        MXML_SAX_ELEMENT_CLOSE
        -
        Element closed
        -
        MXML_SAX_ELEMENT_OPEN
        -
        Element opened
        -
        -

        mxml_type_e

        -

        The XML node type.

        -

        Constants

        -
        -
        MXML_CUSTOM  Mini-XML 2.1 
        -
        Custom data
        -
        MXML_ELEMENT
        -
        XML element with attributes
        -
        MXML_IGNORE  Mini-XML 2.3 
        -
        Ignore/throw away node
        -
        MXML_INTEGER
        -
        Integer value
        -
        MXML_OPAQUE
        -
        Opaque string
        -
        MXML_REAL
        -
        Real value
        -
        MXML_TEXT
        -
        Text fragment
        -
        -
      - - + + +Mini-XML Programmers Manual, Version 2.6 + + + + + + + + + + +Contents +Previous +Next +
      +
      +

      CLibrary Reference

      +

      Contents

      +
        +
      • Functions + +
      • +
      • Data Types + +
      • +
      • Structures + +
      • +
      • Unions + +
      • +
      • Constants + +
      • +

        Functions

        +

        mxmlAdd

        +

        Add a node to a tree.

        +

        void mxmlAdd ( +
            mxml_node_t *parent, +
            int where, +
            mxml_node_t *child, +
            mxml_node_t *node +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node
        +
        where
        +
        Where to add, MXML_ADD_BEFORE or MXML_ADD_AFTER
        +
        child
        +
        Child node for where or MXML_ADD_TO_PARENT
        +
        node
        +
        Node to add
        +
        +

        Discussion

        +

        Adds the specified node to the parent. If the + child argument is not NULL, puts the new node before or after the + specified child depending on the value of the where argument. If the + child argument is NULL, puts the new node at the beginning of the child + list (MXML_ADD_BEFORE) or at the end of the child list + (MXML_ADD_AFTER). The constant MXML_ADD_TO_PARENT can be used to + specify a NULL child pointer.

        +

        mxmlDelete

        +

        Delete a node and all of its children.

        +

        void mxmlDelete ( +
            mxml_node_t *node +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to delete
        +
        +

        Discussion

        +

        If the specified node has a parent, this function + first removes the node from its parent using the mxmlRemove() function.

        +

        + + Mini-XML 2.4 mxmlElementDeleteAttr +

        +

        Delete an attribute.

        +

        void mxmlElementDeleteAttr ( +
            mxml_node_t *node, +
            const char *name +
        );

        +

        Parameters

        +
        +
        node
        +
        Element
        +
        name
        +
        Attribute name
        +
        +

        mxmlElementGetAttr

        +

        Get an attribute.

        +

        const char *mxmlElementGetAttr ( +
            mxml_node_t *node, +
            const char *name +
        );

        +

        Parameters

        +
        +
        node
        +
        Element node
        +
        name
        +
        Name of attribute
        +
        +

        Return Value

        +

        Attribute value or NULL

        +

        Discussion

        +

        This function returns NULL if the node is not an + element or the named attribute does not exist.

        +

        mxmlElementSetAttr

        +

        Set an attribute.

        +

        void mxmlElementSetAttr ( +
            mxml_node_t *node, +
            const char *name, +
            const char *value +
        );

        +

        Parameters

        +
        +
        node
        +
        Element node
        +
        name
        +
        Name of attribute
        +
        value
        +
        Attribute value
        +
        +

        Discussion

        +

        If the named attribute already exists, the value + of the attribute is replaced by the new string value. The string value + is copied into the element node. This function does nothing if the node + is not an element.

        +

        + + Mini-XML 2.3 mxmlElementSetAttrf

        +

        Set an attribute with a formatted value.

        +

        void mxmlElementSetAttrf ( +
            mxml_node_t *node, +
            const char *name, +
            const char *format, +
            ... +
        );

        +

        Parameters

        +
        +
        node
        +
        Element node
        +
        name
        +
        Name of attribute
        +
        format
        +
        Printf-style attribute value
        +
        ...
        +
        Additional arguments as needed
        +
        +

        Discussion

        +

        If the named attribute already exists, the value + of the attribute is replaced by the new formatted string. The formatted + string value is copied into the element node. This function does + nothing if the node is not an element.

        +

        +mxmlEntityAddCallback

        +

        Add a callback to convert entities to Unicode.

        +

        int mxmlEntityAddCallback ( +
            mxml_entity_cb_t cb +
        );

        +

        Parameters

        +
        +
        cb
        +
        Callback function to add
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        mxmlEntityGetName

        +

        Get the name that corresponds to the character + value.

        +

        const char *mxmlEntityGetName ( +
            int val +
        );

        +

        Parameters

        +
        +
        val
        +
        Character value
        +
        +

        Return Value

        +

        Entity name or NULL

        +

        Discussion

        +

        If val does not need to be represented by a named + entity, NULL is returned.

        +

        mxmlEntityGetValue

        +

        Get the character corresponding to a named + entity.

        +

        int mxmlEntityGetValue ( +
            const char *name +
        );

        +

        Parameters

        +
        +
        name
        +
        Entity name
        +
        +

        Return Value

        +

        Character value or -1 on error

        +

        Discussion

        +

        The entity name can also be a numeric constant. -1 + is returned if the name is not known.

        +

        +mxmlEntityRemoveCallback

        +

        Remove a callback.

        +

        void mxmlEntityRemoveCallback ( +
            mxml_entity_cb_t cb +
        );

        +

        Parameters

        +
        +
        cb
        +
        Callback function to remove
        +
        +

        mxmlFindElement

        +

        Find the named element.

        +

        mxml_node_t *mxmlFindElement + ( +
            mxml_node_t *node, +
            mxml_node_t *top, +
            const char *name, +
            const char *attr, +
            const char *value, +
            int descend +
        );

        +

        Parameters

        +
        +
        node
        +
        Current node
        +
        top
        +
        Top node
        +
        name
        +
        Element name or NULL for any
        +
        attr
        +
        Attribute name, or NULL for none
        +
        value
        +
        Attribute value, or NULL for any
        +
        descend
        +
        Descend into tree - MXML_DESCEND, + MXML_NO_DESCEND, or MXML_DESCEND_FIRST
        +
        +

        Return Value

        +

        Element node or NULL

        +

        Discussion

        +

        The search is constrained by the name, attribute + name, and value; any NULL names or values are treated as wildcards, so + different kinds of searches can be implemented by looking for all + elements of a given name or all elements with a specific attribute. The + descend argument determines whether the search descends into child + nodes; normally you will use MXML_DESCEND_FIRST for the initial search + and MXML_NO_DESCEND to find additional direct descendents of the node. + The top node argument constrains the search to a particular node's + children.

        +

        mxmlIndexDelete

        +

        Delete an index.

        +

        void mxmlIndexDelete ( +
            mxml_index_t *ind +
        );

        +

        Parameters

        +
        +
        ind
        +
        Index to delete
        +
        +

        mxmlIndexEnum

        +

        Return the next node in the index.

        +

        mxml_node_t *mxmlIndexEnum ( +
            mxml_index_t *ind +
        );

        +

        Parameters

        +
        +
        ind
        +
        Index to enumerate
        +
        +

        Return Value

        +

        Next node or NULL if there is none

        +

        Discussion

        +

        Nodes are returned in the sorted order of the + index.

        +

        mxmlIndexFind

        +

        Find the next matching node.

        +

        mxml_node_t *mxmlIndexFind ( +
            mxml_index_t *ind, +
            const char *element, +
            const char *value +
        );

        +

        Parameters

        +
        +
        ind
        +
        Index to search
        +
        element
        +
        Element name to find, if any
        +
        value
        +
        Attribute value, if any
        +
        +

        Return Value

        +

        Node or NULL if none found

        +

        Discussion

        +

        You should call mxmlIndexReset() prior to using + this function for the first time with a particular set of "element" and + "value" strings. Passing NULL for both "element" and "value" is + equivalent to calling mxmlIndexEnum().

        +

        mxmlIndexNew

        +

        Create a new index.

        +

        mxml_index_t *mxmlIndexNew + ( +
            mxml_node_t *node, +
            const char *element, +
            const char *attr +
        );

        +

        Parameters

        +
        +
        node
        +
        XML node tree
        +
        element
        +
        Element to index or NULL for all
        +
        attr
        +
        Attribute to index or NULL for none
        +
        +

        Return Value

        +

        New index

        +

        Discussion

        +

        The index will contain all nodes that contain the + named element and/or attribute. If both "element" and "attr" are NULL, + then the index will contain a sorted list of the elements in the node + tree. Nodes are sorted by element name and optionally by attribute + value if the "attr" argument is not NULL.

        +

        mxmlIndexReset

        +

        Reset the enumeration/find pointer in the index + and return the first node in the index.

        +

        mxml_node_t *mxmlIndexReset + ( +
            mxml_index_t *ind +
        );

        +

        Parameters

        +
        +
        ind
        +
        Index to reset
        +
        +

        Return Value

        +

        First node or NULL if there is none

        +

        Discussion

        +

        This function should be called prior to using + mxmlIndexEnum() or mxmlIndexFind() for the first time.

        +

        mxmlLoadFd

        +

        Load a file descriptor into an XML node tree.

        +

        mxml_node_t *mxmlLoadFd ( +
            mxml_node_t *top, +
            int fd, +
            mxml_load_cb_t cb +
        );

        +

        Parameters

        +
        +
        top
        +
        Top node
        +
        fd
        +
        File descriptor to read from
        +
        cb
        +
        Callback function or MXML_NO_CALLBACK
        +
        +

        Return Value

        +

        First node or NULL if the file could not be read.

        +

        Discussion

        +

        The nodes in the specified file are added to the + specified top node. If no top node is provided, the XML file MUST be + well-formed with a single parent node like <?xml> for the entire file. + The callback function returns the value type that should be used for + child nodes. If MXML_NO_CALLBACK is specified then all child nodes will + be either MXML_ELEMENT or MXML_TEXT nodes. +
        +
        The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type.

        +

        mxmlLoadFile

        +

        Load a file into an XML node tree.

        +

        mxml_node_t *mxmlLoadFile ( +
            mxml_node_t *top, +
            FILE *fp, +
            mxml_load_cb_t cb +
        );

        +

        Parameters

        +
        +
        top
        +
        Top node
        +
        fp
        +
        File to read from
        +
        cb
        +
        Callback function or MXML_NO_CALLBACK
        +
        +

        Return Value

        +

        First node or NULL if the file could not be read.

        +

        Discussion

        +

        The nodes in the specified file are added to the + specified top node. If no top node is provided, the XML file MUST be + well-formed with a single parent node like <?xml> for the entire file. + The callback function returns the value type that should be used for + child nodes. If MXML_NO_CALLBACK is specified then all child nodes will + be either MXML_ELEMENT or MXML_TEXT nodes. +
        +
        The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type.

        +

        mxmlLoadString

        +

        Load a string into an XML node tree.

        +

        mxml_node_t *mxmlLoadString + ( +
            mxml_node_t *top, +
            const char *s, +
            mxml_load_cb_t cb +
        );

        +

        Parameters

        +
        +
        top
        +
        Top node
        +
        s
        +
        String to load
        +
        cb
        +
        Callback function or MXML_NO_CALLBACK
        +
        +

        Return Value

        +

        First node or NULL if the string has errors.

        +

        Discussion

        +

        The nodes in the specified string are added to the + specified top node. If no top node is provided, the XML string MUST be + well-formed with a single parent node like <?xml> for the entire + string. The callback function returns the value type that should be + used for child nodes. If MXML_NO_CALLBACK is specified then all child + nodes will be either MXML_ELEMENT or MXML_TEXT nodes. +
        +
        The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type.

        +

        + + Mini-XML 2.3 mxmlNewCDATA

        +

        Create a new CDATA node.

        +

        mxml_node_t *mxmlNewCDATA ( +
            mxml_node_t *parent, +
            const char *data +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node or MXML_NO_PARENT
        +
        data
        +
        Data string
        +
        +

        Return Value

        +

        New node

        +

        Discussion

        +

        The new CDATA node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new CDATA node has no parent. The data string must + be nul-terminated and is copied into the new node. CDATA nodes use the + MXML_ELEMENT type.

        +

        + + Mini-XML 2.1 mxmlNewCustom

        +

        Create a new custom data node.

        +

        mxml_node_t *mxmlNewCustom ( +
            mxml_node_t *parent, +
            void *data, +
            mxml_custom_destroy_cb_t + destroy +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node or MXML_NO_PARENT
        +
        data
        +
        Pointer to data
        +
        destroy
        +
        Function to destroy data
        +
        +

        Return Value

        +

        New node

        +

        Discussion

        +

        The new custom node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new element node has no parent. NULL can be passed + when the data in the node is not dynamically allocated or is separately + managed.

        +

        mxmlNewElement

        +

        Create a new element node.

        +

        mxml_node_t *mxmlNewElement + ( +
            mxml_node_t *parent, +
            const char *name +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node or MXML_NO_PARENT
        +
        name
        +
        Name of element
        +
        +

        Return Value

        +

        New node

        +

        Discussion

        +

        The new element node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new element node has no parent.

        +

        mxmlNewInteger

        +

        Create a new integer node.

        +

        mxml_node_t *mxmlNewInteger + ( +
            mxml_node_t *parent, +
            int integer +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node or MXML_NO_PARENT
        +
        integer
        +
        Integer value
        +
        +

        Return Value

        +

        New node

        +

        Discussion

        +

        The new integer node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new integer node has no parent.

        +

        mxmlNewOpaque

        +

        Create a new opaque string.

        +

        mxml_node_t *mxmlNewOpaque ( +
            mxml_node_t *parent, +
            const char *opaque +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node or MXML_NO_PARENT
        +
        opaque
        +
        Opaque string
        +
        +

        Return Value

        +

        New node

        +

        Discussion

        +

        The new opaque node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new opaque node has no parent. The opaque string + must be nul-terminated and is copied into the new node.

        +

        mxmlNewReal

        +

        Create a new real number node.

        +

        mxml_node_t *mxmlNewReal ( +
            mxml_node_t *parent, +
            double real +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node or MXML_NO_PARENT
        +
        real
        +
        Real number value
        +
        +

        Return Value

        +

        New node

        +

        Discussion

        +

        The new real number node is added to the end of + the specified parent's child list. The constant MXML_NO_PARENT can be + used to specify that the new real number node has no parent.

        +

        mxmlNewText

        +

        Create a new text fragment node.

        +

        mxml_node_t *mxmlNewText ( +
            mxml_node_t *parent, +
            int whitespace, +
            const char *string +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node or MXML_NO_PARENT
        +
        whitespace
        +
        1 = leading whitespace, 0 = no whitespace
        +
        string
        +
        String
        +
        +

        Return Value

        +

        New node

        +

        Discussion

        +

        The new text node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new text node has no parent. The whitespace + parameter is used to specify whether leading whitespace is present + before the node. The text string must be nul-terminated and is copied + into the new node.

        +

        mxmlNewTextf

        +

        Create a new formatted text fragment node.

        +

        mxml_node_t *mxmlNewTextf ( +
            mxml_node_t *parent, +
            int whitespace, +
            const char *format, +
            ... +
        );

        +

        Parameters

        +
        +
        parent
        +
        Parent node or MXML_NO_PARENT
        +
        whitespace
        +
        1 = leading whitespace, 0 = no whitespace
        +
        format
        +
        Printf-style frmat string
        +
        ...
        +
        Additional args as needed
        +
        +

        Return Value

        +

        New node

        +

        Discussion

        +

        The new text node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new text node has no parent. The whitespace + parameter is used to specify whether leading whitespace is present + before the node. The format string must be nul-terminated and is + formatted into the new node.

        +

        + + Mini-XML 2.3 mxmlNewXML

        +

        Create a new XML document tree.

        +

        mxml_node_t *mxmlNewXML ( +
            const char *version +
        );

        +

        Parameters

        +
        +
        version
        +
        Version number to use
        +
        +

        Return Value

        +

        New ?xml node

        +

        Discussion

        +

        The "version" argument specifies the version + number to put in the ?xml element node. If NULL, version 1.0 is + assumed.

        +

        + + Mini-XML 2.3 mxmlRelease

        +

        Release a node.

        +

        int mxmlRelease ( +
            mxml_node_t *node +
        );

        +

        Parameters

        +
        +
        node
        +
        Node
        +
        +

        Return Value

        +

        New reference count

        +

        Discussion

        +

        When the reference count reaches zero, the node + (and any children) is deleted via mxmlDelete().

        +

        mxmlRemove

        +

        Remove a node from its parent.

        +

        void mxmlRemove ( +
            mxml_node_t *node +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to remove
        +
        +

        Discussion

        +

        Does not free memory used by the node - use + mxmlDelete() for that. This function does nothing if the node has no + parent.

        +

        + + Mini-XML 2.3 mxmlRetain

        +

        Retain a node.

        +

        int mxmlRetain ( +
            mxml_node_t *node +
        );

        +

        Parameters

        +
        +
        node
        +
        Node
        +
        +

        Return Value

        +

        New reference count

        +

        + + Mini-XML 2.3 mxmlSAXLoadFd

        +

        Load a file descriptor into an XML node tree + using a SAX callback.

        +

        mxml_node_t *mxmlSAXLoadFd ( +
            mxml_node_t *top, +
            int fd, +
            mxml_load_cb_t cb, +
            mxml_sax_cb_t sax_cb, +
            void *sax_data +
        );

        +

        Parameters

        +
        +
        top
        +
        Top node
        +
        fd
        +
        File descriptor to read from
        +
        cb
        +
        Callback function or MXML_NO_CALLBACK
        +
        sax_cb
        +
        SAX callback or MXML_NO_CALLBACK
        +
        sax_data
        +
        SAX user data
        +
        +

        Return Value

        +

        First node or NULL if the file could not be read.

        +

        Discussion

        +

        The nodes in the specified file are added to the + specified top node. If no top node is provided, the XML file MUST be + well-formed with a single parent node like <?xml> for the entire file. + The callback function returns the value type that should be used for + child nodes. If MXML_NO_CALLBACK is specified then all child nodes will + be either MXML_ELEMENT or MXML_TEXT nodes. +
        +
        The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type. +
        +
        The SAX callback must call mxmlRetain() for any nodes that need to + be kept for later use. Otherwise, nodes are deleted when the parent + node is closed or after each data, comment, CDATA, or directive node.

        +

        + + Mini-XML 2.3 mxmlSAXLoadFile

        +

        Load a file into an XML node tree using a SAX + callback.

        +

        mxml_node_t *mxmlSAXLoadFile + ( +
            mxml_node_t *top, +
            FILE *fp, +
            mxml_load_cb_t cb, +
            mxml_sax_cb_t sax_cb, +
            void *sax_data +
        );

        +

        Parameters

        +
        +
        top
        +
        Top node
        +
        fp
        +
        File to read from
        +
        cb
        +
        Callback function or MXML_NO_CALLBACK
        +
        sax_cb
        +
        SAX callback or MXML_NO_CALLBACK
        +
        sax_data
        +
        SAX user data
        +
        +

        Return Value

        +

        First node or NULL if the file could not be read.

        +

        Discussion

        +

        The nodes in the specified file are added to the + specified top node. If no top node is provided, the XML file MUST be + well-formed with a single parent node like <?xml> for the entire file. + The callback function returns the value type that should be used for + child nodes. If MXML_NO_CALLBACK is specified then all child nodes will + be either MXML_ELEMENT or MXML_TEXT nodes. +
        +
        The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type. +
        +
        The SAX callback must call mxmlRetain() for any nodes that need to + be kept for later use. Otherwise, nodes are deleted when the parent + node is closed or after each data, comment, CDATA, or directive node.

        +

        + + Mini-XML 2.3 mxmlSAXLoadString

        +

        Load a string into an XML node tree using a SAX + callback.

        +

        mxml_node_t + *mxmlSAXLoadString ( +
            mxml_node_t *top, +
            const char *s, +
            mxml_load_cb_t cb, +
            mxml_sax_cb_t sax_cb, +
            void *sax_data +
        );

        +

        Parameters

        +
        +
        top
        +
        Top node
        +
        s
        +
        String to load
        +
        cb
        +
        Callback function or MXML_NO_CALLBACK
        +
        sax_cb
        +
        SAX callback or MXML_NO_CALLBACK
        +
        sax_data
        +
        SAX user data
        +
        +

        Return Value

        +

        First node or NULL if the string has errors.

        +

        Discussion

        +

        The nodes in the specified string are added to the + specified top node. If no top node is provided, the XML string MUST be + well-formed with a single parent node like <?xml> for the entire + string. The callback function returns the value type that should be + used for child nodes. If MXML_NO_CALLBACK is specified then all child + nodes will be either MXML_ELEMENT or MXML_TEXT nodes. +
        +
        The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type. +
        +
        The SAX callback must call mxmlRetain() for any nodes that need to + be kept for later use. Otherwise, nodes are deleted when the parent + node is closed or after each data, comment, CDATA, or directive node.

        +

        mxmlSaveAllocString +

        +

        Save an XML node tree to an allocated string.

        +

        char *mxmlSaveAllocString ( +
            mxml_node_t *node, +
            mxml_save_cb_t cb +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to write
        +
        cb
        +
        Whitespace callback or MXML_NO_CALLBACK
        +
        +

        Return Value

        +

        Allocated string or NULL

        +

        Discussion

        +

        This function returns a pointer to a string + containing the textual representation of the XML node tree. The string + should be freed using the free() function when you are done with it. + NULL is returned if the node would produce an empty string or if the + string cannot be allocated. +
        +
        The callback argument specifies a function that returns a + whitespace string or NULL before and after each element. If + MXML_NO_CALLBACK is specified, whitespace will only be added before + MXML_TEXT nodes with leading whitespace and before attribute names + inside opening element tags.

        +

        mxmlSaveFd

        +

        Save an XML tree to a file descriptor.

        +

        int mxmlSaveFd ( +
            mxml_node_t *node, +
            int fd, +
            mxml_save_cb_t cb +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to write
        +
        fd
        +
        File descriptor to write to
        +
        cb
        +
        Whitespace callback or MXML_NO_CALLBACK
        +
        +

        Return Value

        +

        0 on success, -1 on error.

        +

        Discussion

        +

        The callback argument specifies a function that + returns a whitespace string or NULL before and after each element. If + MXML_NO_CALLBACK is specified, whitespace will only be added before + MXML_TEXT nodes with leading whitespace and before attribute names + inside opening element tags.

        +

        mxmlSaveFile

        +

        Save an XML tree to a file.

        +

        int mxmlSaveFile ( +
            mxml_node_t *node, +
            FILE *fp, +
            mxml_save_cb_t cb +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to write
        +
        fp
        +
        File to write to
        +
        cb
        +
        Whitespace callback or MXML_NO_CALLBACK
        +
        +

        Return Value

        +

        0 on success, -1 on error.

        +

        Discussion

        +

        The callback argument specifies a function that + returns a whitespace string or NULL before and after each element. If + MXML_NO_CALLBACK is specified, whitespace will only be added before + MXML_TEXT nodes with leading whitespace and before attribute names + inside opening element tags.

        +

        mxmlSaveString

        +

        Save an XML node tree to a string.

        +

        int mxmlSaveString ( +
            mxml_node_t *node, +
            char *buffer, +
            int bufsize, +
            mxml_save_cb_t cb +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to write
        +
        buffer
        +
        String buffer
        +
        bufsize
        +
        Size of string buffer
        +
        cb
        +
        Whitespace callback or MXML_NO_CALLBACK
        +
        +

        Return Value

        +

        Size of string

        +

        Discussion

        +

        This function returns the total number of bytes + that would be required for the string but only copies (bufsize - 1) + characters into the specified buffer. +
        +
        The callback argument specifies a function that returns a + whitespace string or NULL before and after each element. If + MXML_NO_CALLBACK is specified, whitespace will only be added before + MXML_TEXT nodes with leading whitespace and before attribute names + inside opening element tags.

        +

        + + Mini-XML 2.3 mxmlSetCDATA

        +

        Set the element name of a CDATA node.

        +

        int mxmlSetCDATA ( +
            mxml_node_t *node, +
            const char *data +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to set
        +
        data
        +
        New data string
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        Discussion

        +

        The node is not changed if it is not a CDATA + element node.

        +

        + + Mini-XML 2.1 mxmlSetCustom

        +

        Set the data and destructor of a custom data + node.

        +

        int mxmlSetCustom ( +
            mxml_node_t *node, +
            void *data, +
            mxml_custom_destroy_cb_t + destroy +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to set
        +
        data
        +
        New data pointer
        +
        destroy
        +
        New destructor function
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        Discussion

        +

        The node is not changed if it is not a custom + node.

        +

        +mxmlSetCustomHandlers

        +

        Set the handling functions for custom data.

        +

        void mxmlSetCustomHandlers ( +
            mxml_custom_load_cb_t + load, +
            mxml_custom_save_cb_t save +
        );

        +

        Parameters

        +
        +
        load
        +
        Load function
        +
        save
        +
        Save function
        +
        +

        Discussion

        +

        The load function accepts a node pointer and a + data string and must return 0 on success and non-zero on error. +
        +
        The save function accepts a node pointer and must return a malloc'd + string on success and NULL on error.

        +

        mxmlSetElement

        +

        Set the name of an element node.

        +

        int mxmlSetElement ( +
            mxml_node_t *node, +
            const char *name +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to set
        +
        name
        +
        New name string
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        Discussion

        +

        The node is not changed if it is not an element + node.

        +

        mxmlSetErrorCallback +

        +

        Set the error message callback.

        +

        void mxmlSetErrorCallback ( +
            mxml_error_cb_t cb +
        );

        +

        Parameters

        +
        +
        cb
        +
        Error callback function
        +
        +

        mxmlSetInteger

        +

        Set the value of an integer node.

        +

        int mxmlSetInteger ( +
            mxml_node_t *node, +
            int integer +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to set
        +
        integer
        +
        Integer value
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        Discussion

        +

        The node is not changed if it is not an integer + node.

        +

        mxmlSetOpaque

        +

        Set the value of an opaque node.

        +

        int mxmlSetOpaque ( +
            mxml_node_t *node, +
            const char *opaque +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to set
        +
        opaque
        +
        Opaque string
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        Discussion

        +

        The node is not changed if it is not an opaque + node.

        +

        mxmlSetReal

        +

        Set the value of a real number node.

        +

        int mxmlSetReal ( +
            mxml_node_t *node, +
            double real +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to set
        +
        real
        +
        Real number value
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        Discussion

        +

        The node is not changed if it is not a real number + node.

        +

        mxmlSetText

        +

        Set the value of a text node.

        +

        int mxmlSetText ( +
            mxml_node_t *node, +
            int whitespace, +
            const char *string +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to set
        +
        whitespace
        +
        1 = leading whitespace, 0 = no whitespace
        +
        string
        +
        String
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        Discussion

        +

        The node is not changed if it is not a text node.

        +

        mxmlSetTextf

        +

        Set the value of a text node to a formatted + string.

        +

        int mxmlSetTextf ( +
            mxml_node_t *node, +
            int whitespace, +
            const char *format, +
            ... +
        );

        +

        Parameters

        +
        +
        node
        +
        Node to set
        +
        whitespace
        +
        1 = leading whitespace, 0 = no whitespace
        +
        format
        +
        Printf-style format string
        +
        ...
        +
        Additional arguments as needed
        +
        +

        Return Value

        +

        0 on success, -1 on failure

        +

        Discussion

        +

        The node is not changed if it is not a text node.

        +

        + + Mini-XML 2.3 mxmlSetWrapMargin

        +

        Set the the wrap margin when saving XML data.

        +

        void mxmlSetWrapMargin ( +
            int column +
        );

        +

        Parameters

        +
        +
        column
        +
        Column for wrapping, 0 to disable wrapping
        +
        +

        Discussion

        +

        Wrapping is disabled when "column" is 0.

        +

        mxmlWalkNext

        +

        Walk to the next logical node in the tree.

        +

        mxml_node_t *mxmlWalkNext ( +
            mxml_node_t *node, +
            mxml_node_t *top, +
            int descend +
        );

        +

        Parameters

        +
        +
        node
        +
        Current node
        +
        top
        +
        Top node
        +
        descend
        +
        Descend into tree - MXML_DESCEND, + MXML_NO_DESCEND, or MXML_DESCEND_FIRST
        +
        +

        Return Value

        +

        Next node or NULL

        +

        Discussion

        +

        The descend argument controls whether the first + child is considered to be the next node. The top node argument + constrains the walk to the node's children.

        +

        mxmlWalkPrev

        +

        Walk to the previous logical node in the tree.

        +

        mxml_node_t *mxmlWalkPrev ( +
            mxml_node_t *node, +
            mxml_node_t *top, +
            int descend +
        );

        +

        Parameters

        +
        +
        node
        +
        Current node
        +
        top
        +
        Top node
        +
        descend
        +
        Descend into tree - MXML_DESCEND, + MXML_NO_DESCEND, or MXML_DESCEND_FIRST
        +
        +

        Return Value

        +

        Previous node or NULL

        +

        Discussion

        +

        The descend argument controls whether the previous + node's last child is considered to be the previous node. The top node + argument constrains the walk to the node's children.

        +

        Data Types

        +

        mxml_attr_t

        +

        An XML element attribute value.

        +

        typedef struct mxml_attr_s + mxml_attr_t;

        +

        +mxml_custom_destroy_cb_t

        +

        Custom data destructor

        +

        typedef void (*mxml_custom_destroy_cb_t)(void *);

        +

        +mxml_custom_load_cb_t

        +

        Custom data load callback function

        +

        typedef int (*mxml_custom_load_cb_t)( +mxml_node_t *, const char *);

        +

        +mxml_custom_save_cb_t

        +

        Custom data save callback function

        +

        typedef char *(*mxml_custom_save_cb_t)( +mxml_node_t *);

        +

        + + Mini-XML 2.1 mxml_custom_t

        +

        An XML custom value.

        +

        typedef struct mxml_custom_s + mxml_custom_t;

        +

        mxml_element_t

        +

        An XML element value.

        +

        typedef struct mxml_element_s + mxml_element_t;

        +

        mxml_entity_cb_t

        +

        Entity callback function

        +

        typedef int (*mxml_entity_cb_t)(const char *);

        +

        mxml_error_cb_t

        +

        Error callback function

        +

        typedef void (*mxml_error_cb_t)(const char *);

        +

        mxml_index_t

        +

        An XML node index.

        +

        typedef struct mxml_index_s + mxml_index_t;

        +

        mxml_load_cb_t

        +

        Load callback function

        +

        typedef mxml_type_t + (*mxml_load_cb_t)(mxml_node_t *);

        +

        mxml_node_t

        +

        An XML node.

        +

        typedef struct mxml_node_s + mxml_node_t;

        +

        mxml_save_cb_t

        +

        Save callback function

        +

        typedef const char *(*mxml_save_cb_t)( +mxml_node_t *, int);

        +

        mxml_sax_cb_t

        +

        SAX callback function

        +

        typedef void (*mxml_sax_cb_t)( +mxml_node_t *, mxml_sax_event_t, void *);

        +

        mxml_sax_event_t

        +

        SAX event type.

        +

        typedef enum +mxml_sax_event_e mxml_sax_event_t;

        +

        mxml_text_t

        +

        An XML text value.

        +

        typedef struct mxml_text_s + mxml_text_t;

        +

        mxml_type_t

        +

        The XML node type.

        +

        typedef enum mxml_type_e + mxml_type_t;

        +

        mxml_value_t

        +

        An XML node value.

        +

        typedef union mxml_value_u + mxml_value_t;

        +

        Structures

        +

        mxml_attr_s

        +

        An XML element attribute value.

        +

        struct mxml_attr_s { +
            char *name; +
            char *value; +
        };

        +

        Members

        +
        +
        name
        +
        Attribute name
        +
        value
        +
        Attribute value
        +
        +

        + + Mini-XML 2.1 mxml_custom_s

        +

        An XML custom value.

        +

        struct mxml_custom_s { +
            void *data; +
            mxml_custom_destroy_cb_t + destroy; +
        };

        +

        Members

        +
        +
        data
        +
        Pointer to (allocated) custom data
        +
        destroy
        +
        Pointer to destructor function
        +
        +

        mxml_element_s

        +

        An XML element value.

        +

        struct mxml_element_s { +
            mxml_attr_t *attrs; +
            char *name; +
            int num_attrs; +
        };

        +

        Members

        +
        +
        attrs
        +
        Attributes
        +
        name
        +
        Name of element
        +
        num_attrs
        +
        Number of attributes
        +
        +

        mxml_index_s

        +

        An XML node index.

        +

        struct mxml_index_s { +
            int alloc_nodes; +
            char *attr; +
            int cur_node; +
            mxml_node_t **nodes; +
            int num_nodes; +
        };

        +

        Members

        +
        +
        alloc_nodes
        +
        Allocated nodes in index
        +
        attr
        +
        Attribute used for indexing or NULL
        +
        cur_node
        +
        Current node
        +
        nodes
        +
        Node array
        +
        num_nodes
        +
        Number of nodes in index
        +
        +

        mxml_node_s

        +

        An XML node.

        +

        struct mxml_node_s { +
            struct mxml_node_s *child; +
            struct mxml_node_s *last_child; +
            struct mxml_node_s *next; +
            struct mxml_node_s *parent; +
            struct mxml_node_s *prev; +
            int ref_count; +
            mxml_type_t type; +
            void *user_data; +
            mxml_value_t value; +
        };

        +

        Members

        +
        +
        child
        +
        First child node
        +
        last_child
        +
        Last child node
        +
        next
        +
        Next node under same parent
        +
        parent
        +
        Parent node
        +
        prev
        +
        Previous node under same parent
        +
        ref_count
        +
        Use count
        +
        type
        +
        Node type
        +
        user_data
        +
        User data
        +
        value
        +
        Node value
        +
        +

        mxml_text_s

        +

        An XML text value.

        +

        struct mxml_text_s { +
            char *string; +
            int whitespace; +
        };

        +

        Members

        +
        +
        string
        +
        Fragment string
        +
        whitespace
        +
        Leading whitespace?
        +
        +

        Unions

        +

        mxml_value_u

        +

        An XML node value.

        +

        union mxml_value_u { +
            mxml_custom_t custom; +
            mxml_element_t element; +
            int integer; +
            char *opaque; +
            double real; +
            mxml_text_t text; +
        };

        +

        Members

        +
        +
        custom + +  Mini-XML 2.1 
        +
        Custom data
        +
        element
        +
        Element
        +
        integer
        +
        Integer number
        +
        opaque
        +
        Opaque string
        +
        real
        +
        Real number
        +
        text
        +
        Text fragment
        +
        +

        Constants

        +

        mxml_sax_event_e

        +

        SAX event type.

        +

        Constants

        +
        +
        MXML_SAX_CDATA
        +
        CDATA node
        +
        MXML_SAX_COMMENT
        +
        Comment node
        +
        MXML_SAX_DATA
        +
        Data node
        +
        MXML_SAX_DIRECTIVE
        +
        Processing directive node
        +
        MXML_SAX_ELEMENT_CLOSE
        +
        Element closed
        +
        MXML_SAX_ELEMENT_OPEN
        +
        Element opened
        +
        +

        mxml_type_e

        +

        The XML node type.

        +

        Constants

        +
        +
        MXML_CUSTOM + +  Mini-XML 2.1 
        +
        Custom data
        +
        MXML_ELEMENT
        +
        XML element with attributes
        +
        MXML_IGNORE + +  Mini-XML 2.3 
        +
        Ignore/throw away node
        +
        MXML_INTEGER
        +
        Integer value
        +
        MXML_OPAQUE
        +
        Opaque string
        +
        MXML_REAL
        +
        Real value
        +
        MXML_TEXT
        +
        Text fragment
        +
        +
      +

      +Contents +Previous +Next + + diff --git a/www/docfiles/relnotes.html b/www/docfiles/relnotes.html index 73b3d4b..7e2c378 100644 --- a/www/docfiles/relnotes.html +++ b/www/docfiles/relnotes.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + @@ -30,7 +30,27 @@ A { text-decoration: none }

      BRelease Notes

      -

      Changes in Mini-XML 2.5

      +

      Changes in Mini-XML 2.6

      +
        +
      • Documentation fixes (STR #91, STR #92)
      • +
      • The mxmldoc program did not handle typedef comments properly (STR + #72)
      • +
      • Added support for "long long" printf formats.
      • +
      • The XML parser now rejects UTF-8 XML files that start with a BOM + (STR #89)
      • +
      • The mxmldoc program now supports generating Xcode documentation + sets.
      • +
      • mxmlSave*() did not output UTF-8 correctly on some platforms.
      • +
      • mxmlNewXML() now adds encoding="utf-8" in the ?xml directive to + avoid problems with non-conformant XML parsers that assume something + other than UTF-8 as the default encoding.
      • +
      • Wrapping was not disabled when mxmlSetWrapMargin(0) was called, and + "<?xml ... ?>" was always followed by a newline (STR #76)
      • +
      • The mxml.pc.in file was broken (STR #79)
      • +
      • The mxmldoc program now handles "typedef enum name {} name" + correctly (STR #72)
      • +
      +

      Changes in Mini-XML 2.5

      • The mxmldoc program now makes greater use of CSS and supports a --css option to embed an alternate stylesheet.
      • @@ -47,7 +67,7 @@ hspace="10" src="B.gif" width="100">Release Notes top level of a document (STR #67)
      • Spaces around the "=" in attributes were not supported (STR #67)
      -

      Changes in Mini-XML 2.4

      +

      Changes in Mini-XML 2.4

      • Fixed shared library build problems on HP-UX and Mac OS X.
      • The mxmldoc program did not output argument descriptions for @@ -67,7 +87,7 @@ hspace="10" src="B.gif" width="100">Release Notes
      • mxmlWalkNext() and mxmlWalkPrev() did not work correctly when called with a node with no children as the top node (STR #53)
      -

      Changes in Mini-XML 2.3

      +

      Changes in Mini-XML 2.3

      • Added two exceptions to the LGPL to support static linking of applications against Mini-XML
      • @@ -105,12 +125,12 @@ hspace="10" src="B.gif" width="100">Release Notes
      • mxmlLoad*() did not treat custom data as opaque, so whitespace characters would be lost
      -

      Changes in Mini-XML 2.2.2

      +

      Changes in Mini-XML 2.2.2

      • mxmlLoad*() did not treat custom data as opaque, so whitespace characters would be lost.
      -

      Changes in Mini-XML 2.2.1

      +

      Changes in Mini-XML 2.2.1

      • mxmlLoadFd(), mxmlLoadFile(), and mxmlLoadString() now correctly return NULL on error (STR #21)
      • @@ -121,7 +141,7 @@ hspace="10" src="B.gif" width="100">Release Notes proper permissions on UNIX/Linux/OSX.
      • Fixed a MingW/Cygwin compilation problem (STR #18)
      -

      Changes in Mini-XML 2.2

      +

      Changes in Mini-XML 2.2

      • Added shared library support (STR #17)
      • mxmlLoad*() now returns an error when an XML stream contains illegal @@ -135,7 +155,7 @@ hspace="10" src="B.gif" width="100">Release Notes
      • Added checking for invalid comment termination ("--->" is not allowed)
      -

      Changes in Mini-XML 2.1

      +

      Changes in Mini-XML 2.1

      • Added support for custom data nodes (STR #6)
      • Now treat UTF-8 sequences which are longer than necessary as an @@ -146,7 +166,7 @@ hspace="10" src="B.gif" width="100">Release Notes
      • Added mxmlLoadFd() and mxmlSaveFd() functions.
      • Fixed multi-word UTF-16 handling.
      -

      Changes in Mini-XML 2.0

      +

      Changes in Mini-XML 2.0

      • New programmers manual.
      • Added Visual C++ project files for Microsoft Windows users.
      • @@ -179,7 +199,7 @@ hspace="10" src="B.gif" width="100">Release Notes destination path and install path. This caused problems when building and installing with MingW.
      -

      Changes in Mini-XML 1.3

      +

      Changes in Mini-XML 1.3

      • Fixes for mxmldoc.
      • Added support for reading standard HTML entity names.
      • @@ -195,7 +215,7 @@ hspace="10" src="B.gif" width="100">Release Notes
      • The load and save functions now properly handle quoted element and attribute name strings properly, e.g. for !DOCTYPE declarations.
      -

      Changes in Mini-XML 1.2

      +

      Changes in Mini-XML 1.2

      • Added new "set" methods to set the value of a node.
      • Added new formatted text methods mxmlNewTextf() and mxmlSetTextf() @@ -208,13 +228,13 @@ hspace="10" src="B.gif" width="100">Release Notes
      • Added --with/without-snprintf configure option to control the snprintf() and vsnprintf() function checks.
      -

      Changes in Mini-XML 1.1.2

      +

      Changes in Mini-XML 1.1.2

      • The mxml(3) man page wasn't updated for the string functions.
      • mxmlSaveString() returned the wrong number of characters.
      • mxml_add_char() updated the buffer pointer in the wrong place.
      -

      Changes in Mini-XML 1.1.1

      +

      Changes in Mini-XML 1.1.1

      • The private mxml_add_ch() function did not update the start-of-buffer pointer which could cause a crash when using @@ -225,7 +245,7 @@ hspace="10" src="B.gif" width="100">Release Notes
      • Added a mxmlSaveAllocString() convenience function for saving an XML node tree to an allocated string.
      -

      Changes in Mini-XML 1.1

      +

      Changes in Mini-XML 1.1

      • The mxmlLoadFile() function now uses dynamically allocated string buffers for element names, attribute names, and attribute values. @@ -237,7 +257,7 @@ hspace="10" src="B.gif" width="100">Release Notes
      • Add emulation of strdup() if the local platform does not provide the function.
      -

      Changes in Mini-XML 1.0

      +

      Changes in Mini-XML 1.0

      • The mxmldoc program now handles function arguments, structures, unions, enumerations, classes, and typedefs properly.
      • @@ -245,7 +265,7 @@ hspace="10" src="B.gif" width="100">Release Notes code.
      • Added man pages and packaging files.
      -

      Changes in Mini-XML 0.93

      +

      Changes in Mini-XML 0.93

      • New mxmldoc example program that is also used to create and update code documentation using XML and produce HTML reference pages.
      • @@ -270,15 +290,15 @@ hspace="10" src="B.gif" width="100">Release Notes
      • mxmlSaveFile() now supports a whitespace callback to provide more human-readable XML output under program control.
      -

      Changes in Mini-XML 0.92

      +

      Changes in Mini-XML 0.92

      • mxmlSaveFile() didn't return a value on success.
      -

      Changes in Mini-XML 0.91

      +

      Changes in Mini-XML 0.91

      • mxmlWalkNext() would go into an infinite loop.
      -

      Changes in Mini-XML 0.9

      +

      Changes in Mini-XML 0.9

      • Initial public release.
      diff --git a/www/docfiles/schema.html b/www/docfiles/schema.html index 5ef8101..62b2c15 100644 --- a/www/docfiles/schema.html +++ b/www/docfiles/schema.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - + diff --git a/www/index.php b/www/index.php index 91f40f3..7880785 100644 --- a/www/index.php +++ b/www/index.php @@ -11,11 +11,23 @@ include_once "phplib/poll.php"; html_header(); +$fp = fopen("data/software.md5", "r"); +$line = fgets($fp, 255); +$data = explode(" ", $line); +fclose($fp); + +$version = $data[1]; +$file = $data[2]; + ?> -

      Mini-XML logoMini-XML: Lightweight XML -Library

      + + +

      Mini-XML: Lightweight XML Library

      Mini-XML is a small XML library that you can use to read and write XML and XML-like data files in your application without requiring large non-standard diff --git a/www/mxml.html b/www/mxml.html index 59f7843..bc1b180 100644 --- a/www/mxml.html +++ b/www/mxml.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.5 +Mini-XML Programmers Manual, Version 2.6 - +