diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-14 12:07:02 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-14 12:07:02 +0200 |
commit | 34e88897f13a2fe4b570f2493799e5a4b6b5c2e8 (patch) | |
tree | d65d482676e78e7b63fd2a16ad400c9b0201cca2 /common/eurephia_xml.h | |
parent | 8cdf34c8135b6e9b00ff5e3c7da5dc0ffb8554fb (diff) | |
download | eurephia-34e88897f13a2fe4b570f2493799e5a4b6b5c2e8.tar.gz eurephia-34e88897f13a2fe4b570f2493799e5a4b6b5c2e8.tar.xz eurephia-34e88897f13a2fe4b570f2493799e5a4b6b5c2e8.zip |
Added a simple xmlNode iterator for future usage
Diffstat (limited to 'common/eurephia_xml.h')
-rw-r--r-- | common/eurephia_xml.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/eurephia_xml.h b/common/eurephia_xml.h index cfa0e60..51ee9dd 100644 --- a/common/eurephia_xml.h +++ b/common/eurephia_xml.h @@ -44,6 +44,14 @@ typedef enum _exmlResultType { exmlRESULT = 1, /**< Operation successful. Additi #ifdef HAVE_LIBXML2 #include <libxml/tree.h> +/** + * Simple iterator macro for iterating xmlNode pointers + * + * @param start Pointer to an xmlNode where to start iterating + * @param itn An xmlNode pointer which will be used for the iteration. + */ +#define foreach_xmlnode(start, itn) for( itn = start; itn != NULL; itn = itn->next ) + char *xmlGetAttrValue(xmlAttr *properties, const char *key); xmlNode *xmlFindNode(xmlNode *node, const char *key); |