diff options
Diffstat (limited to 'tools/gator/daemon/mxml/mxml-get.c')
| -rw-r--r-- | tools/gator/daemon/mxml/mxml-get.c | 452 |
1 files changed, 452 insertions, 0 deletions
diff --git a/tools/gator/daemon/mxml/mxml-get.c b/tools/gator/daemon/mxml/mxml-get.c new file mode 100644 index 00000000..40ed3d08 --- /dev/null +++ b/tools/gator/daemon/mxml/mxml-get.c @@ -0,0 +1,452 @@ +/* + * "$Id: mxml-get.c 451 2014-01-04 21:50:06Z msweet $" + * + * Node get functions for Mini-XML, a small XML-like file parsing library. + * + * Copyright 2014 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * http://www.msweet.org/projects.php/Mini-XML + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * 'mxmlGetCDATA()' - Get the value for a CDATA node. + * + * @code NULL@ is returned if the node is not a CDATA element. + * + * @since Mini-XML 2.7@ + */ + +const char * /* O - CDATA value or NULL */ +mxmlGetCDATA(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT || + strncmp(node->value.element.name, "