aboutsummaryrefslogtreecommitdiff
path: root/xmlutils.cc
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-06-07 21:22:45 +0200
committerJavier <dev.git@javispedro.com>2015-06-07 21:22:45 +0200
commita69e97943539a8abc4d2762638c169dc19c88516 (patch)
treef3516ea29745db65971247cee4c260b49f1067b2 /xmlutils.cc
downloadscribiu-a69e97943539a8abc4d2762638c169dc19c88516.tar.gz
scribiu-a69e97943539a8abc4d2762638c169dc19c88516.zip
initial import
Diffstat (limited to 'xmlutils.cc')
-rw-r--r--xmlutils.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmlutils.cc b/xmlutils.cc
new file mode 100644
index 0000000..350949c
--- /dev/null
+++ b/xmlutils.cc
@@ -0,0 +1,13 @@
+#include "xmlutils.h"
+
+bool advanceToFirstChildElement(QXmlStreamReader &r, const char *tag)
+{
+ while (r.readNextStartElement()) {
+ if (r.name() == tag) {
+ return true;
+ } else {
+ r.skipCurrentElement();
+ }
+ }
+ return false;
+}