## Contents

- Enumerations
- Functions
- Structures
- Types
- Unions

## Enumerations

- `mxml_type_e`

### mxml_type_e

#### Description

The XML node type.

#### Values

Name | Description
--- | ---
`MXML_CUSTOM` | Custom data
`MXML_ELEMENT` | XML element with attributes
`MXML_INTEGER` | Integer value
`MXML_OPAQUE` | Opaque string
`MXML_REAL` | Real value
`MXML_TEXT` | Text fragment

## Functions

- `mxmlAdd()`
- `mxmlDelete()`
- `mxmlElementGetAttr()`
- `mxmlElementSetAttr()`
- `mxmlEntityAddCallback()`
- `mxmlEntityGetName()`
- `mxmlEntityGetValue()`
- `mxmlEntityRemoveCallback()`
- `mxmlFindElement()`
- `mxmlIndexDelete()`
- `mxmlIndexEnum()`
- `mxmlIndexFind()`
- `mxmlIndexNew()`
- `mxmlIndexReset()`
- `mxmlLoadFd()`
- `mxmlLoadFile()`
- `mxmlLoadString()`
- `mxmlNewCustom()`
- `mxmlNewElement()`
- `mxmlNewInteger()`
- `mxmlNewOpaque()`
- `mxmlNewReal()`
- `mxmlNewText()`
- `mxmlNewTextf()`
- `mxmlRemove()`
- `mxmlSaveAllocString()`
- `mxmlSaveFd()`
- `mxmlSaveFile()`
- `mxmlSaveString()`
- `mxmlSetCustom()`
- `mxmlSetCustomHandlers()`
- `mxmlSetElement()`
- `mxmlSetErrorCallback()`
- `mxmlSetInteger()`
- `mxmlSetOpaque()`
- `mxmlSetReal()`
- `mxmlSetText()`
- `mxmlSetTextf()`
- `mxmlWalkNext()`
- `mxmlWalkPrev()`

### mxmlAdd()

#### Description

Add a node to a tree. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`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

#### Returns

Nothing.

### mxmlDelete()

#### Description

Delete a node and all of its children. If the specified node has a parent, this function first removes the node from its parent using the mxmlRemove() function.

#### Syntax

    void
    mxmlDelete(
        mxml_node_t * node);

#### Arguments

Name | Description
--- | ---
`node` | Node to delete

#### Returns

Nothing.

### mxmlElementGetAttr()

#### Description

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

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | Element node
`name` | Name of attribute

#### Returns

Attribute value or NULL

### mxmlElementSetAttr()

#### Description

Set an attribute. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | Element node
`name` | Name of attribute
`value` | Attribute value

#### Returns

Nothing.

### mxmlEntityAddCallback()

#### Description

Add a callback to convert entities to Unicode.

#### Syntax

    int
    mxmlEntityAddCallback(
        int (*cb)(const char *name));

#### Arguments

Name | Description
--- | ---
`(*cb)(const char *name)` | Callback function to add

#### Returns

0 on success, -1 on failure

### mxmlEntityGetName()

#### Description

Get the name that corresponds to the character value. If val does not need to be represented by a named entity, NULL is returned.

#### Syntax

    const char *
    mxmlEntityGetName(
        int val);

#### Arguments

Name | Description
--- | ---
`val` | Character value

#### Returns

Entity name or NULL

### mxmlEntityGetValue()

#### Description

Get the character corresponding to a named entity. The entity name can also be a numeric constant. -1 is returned if the name is not known.

#### Syntax

    int
    mxmlEntityGetValue(
        const char * name);

#### Arguments

Name | Description
--- | ---
`name` | Entity name

#### Returns

Character value or -1 on error

### mxmlEntityRemoveCallback()

#### Description

Remove a callback.

#### Syntax

    void
    mxmlEntityRemoveCallback(
        int (*cb)(const char *name));

#### Arguments

Name | Description
--- | ---
`(*cb)(const char *name)` | Callback function to remove

#### Returns

Nothing.

### mxmlFindElement()

#### Description

Find the named element. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`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

#### Returns

Element node or NULL

### mxmlIndexDelete()

#### Description

Delete an index.

#### Syntax

    void
    mxmlIndexDelete(
        mxml_index_t * ind);

#### Arguments

Name | Description
--- | ---
`ind` | Index to delete

#### Returns

Nothing.

### mxmlIndexEnum()

#### Description

Return the next node in the index. Nodes are returned in the sorted order of the index.

#### Syntax

    mxml_node_t *
    mxmlIndexEnum(
        mxml_index_t * ind);

#### Arguments

Name | Description
--- | ---
`ind` | Index to enumerate

#### Returns

Next node or NULL if there is none

### mxmlIndexFind()

#### Description

Find the next matching node. 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().

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`ind` | Index to search
`element` | Element name to find, if any
`value` | Attribute value, if any

#### Returns

Node or NULL if none found

### mxmlIndexNew()

#### Description

Create a new index. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | XML node tree
`element` | Element to index or NULL for all
`attr` | Attribute to index or NULL for none

#### Returns

New index

### mxmlIndexReset()

#### Description

Reset the enumeration/find pointer in the index and return the first node in the index. This function should be called prior to using mxmlIndexEnum() or mxmlIndexFind() for the first time.

#### Syntax

    mxml_node_t *
    mxmlIndexReset(
        mxml_index_t * ind);

#### Arguments

Name | Description
--- | ---
`ind` | Index to reset

#### Returns

First node or NULL if there is none

### mxmlLoadFd()

#### Description

Load a file descriptor into an XML node tree. 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.

#### Syntax

    mxml_node_t *
    mxmlLoadFd(
        mxml_node_t * top,
        int fd,
        mxml_type_t (*cb)(mxml_node_t *node));

#### Arguments

Name | Description
--- | ---
`top` | Top node
`fd` | File descriptor to read from
`(*cb)(mxml_node_t *node)` | Callback function or MXML_NO_CALLBACK

#### Returns

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

### mxmlLoadFile()

#### Description

Load a file into an XML node tree. 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.

#### Syntax

    mxml_node_t *
    mxmlLoadFile(
        mxml_node_t * top,
        FILE * fp,
        mxml_type_t (*cb)(mxml_node_t *node));

#### Arguments

Name | Description
--- | ---
`top` | Top node
`fp` | File to read from
`(*cb)(mxml_node_t *node)` | Callback function or MXML_NO_CALLBACK

#### Returns

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

### mxmlLoadString()

#### Description

Load a string into an XML node tree. 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.

#### Syntax

    mxml_node_t *
    mxmlLoadString(
        mxml_node_t * top,
        const char * s,
        mxml_type_t (*cb)(mxml_node_t *node));

#### Arguments

Name | Description
--- | ---
`top` | Top node
`s` | String to load
`(*cb)(mxml_node_t *node)` | Callback function or MXML_NO_CALLBACK

#### Returns

First node or NULL if the string has errors.

### mxmlNewCustom()

#### Description

Create a new custom data node. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`parent` | Parent node or MXML_NO_PARENT
`data` | Pointer to data
`(*destroy)(void *)` | Function to destroy data

#### Returns

New node

### mxmlNewElement()

#### Description

Create a new element node. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`parent` | Parent node or MXML_NO_PARENT
`name` | Name of element

#### Returns

New node

### mxmlNewInteger()

#### Description

Create a new integer node. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`parent` | Parent node or MXML_NO_PARENT
`integer` | Integer value

#### Returns

New node

### mxmlNewOpaque()

#### Description

Create a new opaque string. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`parent` | Parent node or MXML_NO_PARENT
`opaque` | Opaque string

#### Returns

New node

### mxmlNewReal()

#### Description

Create a new real number node. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`parent` | Parent node or MXML_NO_PARENT
`real` | Real number value

#### Returns

New node

### mxmlNewText()

#### Description

Create a new text fragment node. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`parent` | Parent node or MXML_NO_PARENT
`whitespace` | 1 = leading whitespace, 0 = no whitespace
`string` | String

#### Returns

New node

### mxmlNewTextf()

#### Description

Create a new formatted text fragment node. 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.

#### Syntax

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

#### Arguments

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

#### Returns

New node

### mxmlRemove()

#### Description

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

#### Syntax

    void
    mxmlRemove(
        mxml_node_t * node);

#### Arguments

Name | Description
--- | ---
`node` | Node to remove

#### Returns

Nothing.

### mxmlSaveAllocString()

#### Description

Save an XML node tree to an allocated string. 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.

#### Syntax

    char *
    mxmlSaveAllocString(
        mxml_node_t * node,
        const char * (*cb)(mxml_node_t *node, int ws));

#### Arguments

Name | Description
--- | ---
`node` | Node to write
`(*cb)(mxml_node_t *node, int ws)` | Whitespace callback or MXML_NO_CALLBACK

#### Returns

Allocated string or NULL

### mxmlSaveFd()

#### Description

Save an XML tree to a file descriptor. 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.

#### Syntax

    int
    mxmlSaveFd(
        mxml_node_t * node,
        int fd,
        const char * (*cb)(mxml_node_t *node, int ws));

#### Arguments

Name | Description
--- | ---
`node` | Node to write
`fd` | File descriptor to write to
`(*cb)(mxml_node_t *node, int ws)` | Whitespace callback or MXML_NO_CALLBACK

#### Returns

0 on success, -1 on error.

### mxmlSaveFile()

#### Description

Save an XML tree to a file. 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.

#### Syntax

    int
    mxmlSaveFile(
        mxml_node_t * node,
        FILE * fp,
        const char * (*cb)(mxml_node_t *node, int ws));

#### Arguments

Name | Description
--- | ---
`node` | Node to write
`fp` | File to write to
`(*cb)(mxml_node_t *node, int ws)` | Whitespace callback or MXML_NO_CALLBACK

#### Returns

0 on success, -1 on error.

### mxmlSaveString()

#### Description

Save an XML node tree to a string. 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.

#### Syntax

    int
    mxmlSaveString(
        mxml_node_t * node,
        char * buffer,
        int bufsize,
        const char * (*cb)(mxml_node_t *node, int ws));

#### Arguments

Name | Description
--- | ---
`node` | Node to write
`buffer` | String buffer
`bufsize` | Size of string buffer
`(*cb)(mxml_node_t *node, int ws)` | Whitespace callback or MXML_NO_CALLBACK

#### Returns

Size of string

### mxmlSetCustom()

#### Description

Set the data and destructor of a custom data node. The node is not changed if it is not a custom node.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | Node to set
`data` | New data pointer
`(*destroy)(void *)` | New destructor function

#### Returns

0 on success, -1 on failure

### mxmlSetCustomHandlers()

#### Description

Set the handling functions for custom data. 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.

#### Syntax

    void
    mxmlSetCustomHandlers(
        mxml_custom_load_cb_t load,
        mxml_custom_save_cb_t save);

#### Arguments

Name | Description
--- | ---
`load` | Load function
`save` | Save function

#### Returns

Nothing.

### mxmlSetElement()

#### Description

Set the name of an element node. The node is not changed if it is not an element node.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | Node to set
`name` | New name string

#### Returns

0 on success, -1 on failure

### mxmlSetErrorCallback()

#### Description

Set the error message callback.

#### Syntax

    void
    mxmlSetErrorCallback(
        void (*cb)(const char *));

#### Arguments

Name | Description
--- | ---
`(*cb)(const char *)` | Error callback function

#### Returns

Nothing.

### mxmlSetInteger()

#### Description

Set the value of an integer node. The node is not changed if it is not an integer node.

#### Syntax

    int
    mxmlSetInteger(
        mxml_node_t * node,
        int integer);

#### Arguments

Name | Description
--- | ---
`node` | Node to set
`integer` | Integer value

#### Returns

0 on success, -1 on failure

### mxmlSetOpaque()

#### Description

Set the value of an opaque node. The node is not changed if it is not an opaque node.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | Node to set
`opaque` | Opaque string

#### Returns

0 on success, -1 on failure

### mxmlSetReal()

#### Description

Set the value of a real number node. The node is not changed if it is not a real number node.

#### Syntax

    int
    mxmlSetReal(
        mxml_node_t * node,
        double real);

#### Arguments

Name | Description
--- | ---
`node` | Node to set
`real` | Real number value

#### Returns

0 on success, -1 on failure

### mxmlSetText()

#### Description

Set the value of a text node. The node is not changed if it is not a text node.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | Node to set
`whitespace` | 1 = leading whitespace, 0 = no whitespace
`string` | String

#### Returns

0 on success, -1 on failure

### mxmlSetTextf()

#### Description

Set the value of a text node to a formatted string. The node is not changed if it is not a text node.

#### Syntax

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

#### Arguments

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

#### Returns

0 on success, -1 on failure

### mxmlWalkNext()

#### Description

Walk to the next logical node in the tree. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | Current node
`top` | Top node
`descend` | Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST

#### Returns

Next node or NULL

### mxmlWalkPrev()

#### Description

Walk to the previous logical node in the tree. 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.

#### Syntax

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

#### Arguments

Name | Description
--- | ---
`node` | Current node
`top` | Top node
`descend` | Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST

#### Returns

Previous node or NULL

## Structures

- `mxml_attr_s`
- `mxml_custom_s`
- `mxml_index_s`
- `mxml_node_s`
- `mxml_text_s`
- `mxml_value_s`

### mxml_attr_s

#### Description

An XML element attribute value.

#### Definition

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

#### Members

Name | Description
--- | ---
`name` | Attribute name
`value` | Attribute value

### mxml_custom_s

#### Description

An XML custom value.

#### Definition

    struct mxml_custom_s
    {
      void * data;
    };

#### Members

Name | Description
--- | ---
`data` | Pointer to (allocated) custom data

### mxml_index_s

#### Description

An XML node index.

#### Definition

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

#### Members

Name | Description
--- | ---
`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

#### Description

An XML node.

#### Definition

    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;
      mxml_type_t type;
      mxml_value_t value;
    };

#### Members

Name | Description
--- | ---
`child` | First child node
`last_child` | Last child node
`next` | Next node under same parent
`parent` | Parent node
`prev` | Previous node under same parent
`type` | Node type
`value` | Node value

### mxml_text_s

#### Description

An XML text value.

#### Definition

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

#### Members

Name | Description
--- | ---
`string` | Fragment string
`whitespace` | Leading whitespace?

### mxml_value_s

#### Description

An XML element value.

#### Definition

    struct mxml_value_s
    {
      mxml_attr_t * attrs;
      char * name;
      int num_attrs;
    };

#### Members

Name | Description
--- | ---
`attrs` | Attributes
`name` | Name of element
`num_attrs` | Number of attributes

## Types

- `mxml_attr_t`
- `mxml_custom_t`
- `mxml_element_t`
- `mxml_index_t`
- `mxml_node_t`
- `mxml_text_t`
- `mxml_type_t`
- `mxml_value_t`

### mxml_attr_t

#### Description

An XML element attribute value.

#### Definition

    typedef struct mxml_attr_s mxml_attr_t;

### mxml_custom_t

#### Description

An XML custom value.

#### Definition

    typedef struct mxml_custom_s mxml_custom_t;

### mxml_element_t

#### Description

An XML element value.

#### Definition

    typedef struct mxml_value_s mxml_element_t;

### mxml_index_t

#### Description

An XML node index.

#### Definition

    typedef struct mxml_index_s mxml_index_t;

### mxml_node_t

#### Description

An XML node.

#### Definition

    typedef struct mxml_node_s mxml_node_t;

### mxml_text_t

#### Description

An XML text value.

#### Definition

    typedef struct mxml_text_s mxml_text_t;

### mxml_type_t

#### Description

The XML node type.

#### Definition

    typedef enum mxml_type_e mxml_type_t;

### mxml_value_t

#### Description

An XML node value.

#### Definition

    typedef union mxml_value_u mxml_value_t;

## Unions

- `mxml_value_u`

### mxml_value_u

#### Description

An XML node value.

#### Definition

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

#### Members

Name | Description
--- | ---
`custom` | Custom data
`element` | Element
`integer` | Integer number
`opaque` | Opaque string
`real` | Real number
`text` | Text fragment