Qt Utilities  5.6.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
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 else { xmlReader.skipCurrentElement(); }
13 #define children while(xmlReader.readNextStartElement())
14 #define text (xmlReader.readElementText(QXmlStreamReader::ErrorOnUnexpectedElement))
15 #define attribute(attributeName) (xmlReader.attributes().value(QLatin1String(attributeName)))
16 #define attributeFlag(attributeName) (xmlReader.attributes().hasAttribute(QLatin1String(attributeName)) && xmlReader.attributes().value(QLatin1String(attributeName)) != QLatin1String("false"))
Undefines macros to utilize XML parsing using QXmlStreamReader.