summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-05-29 18:00:13 +0200
committerDavid Sommerseth <davids@redhat.com>2009-05-29 18:00:13 +0200
commit033bd9e5008120546f8d6c973376e848f7a67f00 (patch)
tree684131dc8517005b216097f9724f211e66cf0574 /src
parent9c5a1096acfbca059542c905b45860f17c08a619 (diff)
downloadpython-dmidecode-033bd9e5008120546f8d6c973376e848f7a67f00.tar.gz
python-dmidecode-033bd9e5008120546f8d6c973376e848f7a67f00.tar.xz
python-dmidecode-033bd9e5008120546f8d6c973376e848f7a67f00.zip
Added a simple helper macro to simplify xmlNode traversing
Diffstat (limited to 'src')
-rw-r--r--src/dmixml.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dmixml.h b/src/dmixml.h
index b1ca6d9..f394137 100644
--- a/src/dmixml.h
+++ b/src/dmixml.h
@@ -30,6 +30,8 @@
#include <libxml/tree.h>
#include <libxml/xpath.h>
+#define foreach_xmlnode(n, itn) for( itn = n; itn != NULL; itn = itn->next )
+
xmlAttr *dmixml_AddAttribute(xmlNode *node, const char *atrname, const char *fmt, ...);
xmlNode *dmixml_AddTextChild(xmlNode *node, const char *tagname, const char *fmt, ...);
xmlNode *dmixml_AddTextContent(xmlNode *node, const char *fmt, ...);