Qt Utilities 6.14.3
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Loading...
Searching...
No Matches
xmlparsermacros.h
Go to the documentation of this file.
1
7// ensure there are no conflicting macros defined
9
10#define iftag(tagName) if (xmlReader.name() == QLatin1String(tagName))
11#define eliftag(tagName) else if (xmlReader.name() == QLatin1String(tagName))
12#define else_skip \
13 else \
14 { \
15 xmlReader.skipCurrentElement(); \
16 }
17#define children while (xmlReader.readNextStartElement())
18#define text (xmlReader.readElementText(QXmlStreamReader::ErrorOnUnexpectedElement))
19#define attribute(attributeName) (xmlReader.attributes().value(QLatin1String(attributeName)))
20#define attributeFlag(attributeName) \
21 (xmlReader.attributes().hasAttribute(QLatin1String(attributeName)) \
22 && xmlReader.attributes().value(QLatin1String(attributeName)) != QLatin1String("false"))
Undefines macros to utilize XML parsing using QXmlStreamReader.