summaryrefslogtreecommitdiff
path: root/src/utils/xml.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2007-04-22 13:39:22 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2007-04-22 13:39:22 +0000
commit9398626764574fa536dca3806490f88970d2f056 (patch)
treeb8a5f938d6d6447846773a6270802c3595077222 /src/utils/xml.h
parentccf4dd308bcb8a592ece2d86102bbaa7080f0f7e (diff)
downloadMana-9398626764574fa536dca3806490f88970d2f056.tar.gz
Mana-9398626764574fa536dca3806490f88970d2f056.tar.bz2
Mana-9398626764574fa536dca3806490f88970d2f056.tar.xz
Mana-9398626764574fa536dca3806490f88970d2f056.zip
Added a macro for XML child node iterations to make the code more terse and easier to read.
Diffstat (limited to 'src/utils/xml.h')
-rw-r--r--src/utils/xml.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/xml.h b/src/utils/xml.h
index bf01fc96..db4c264a 100644
--- a/src/utils/xml.h
+++ b/src/utils/xml.h
@@ -46,4 +46,7 @@ namespace XML
getProperty(xmlNodePtr node, const char *name, const std::string &def);
}
+#define for_each_xml_child_node(var, parent) \
+ for (xmlNodePtr var = parent->xmlChildrenNode; var; var = var->next)
+
#endif