I have a weird problem while using QXmlQuery.
The following code compiles and runs fine on my laptop at home (Qt 4.4.0)
Code:
#include <qxml> #include <qxmlquery> #include <qfile> #include <QCoreApplication> #include <stringlist> int main(int argc, char* argv[]) { QXmlQuery query; query.bindVariable("xmlDocument", &xmlfile); query.setQuery("doc($xmlDocument)/a//c[@name='c2name']/string()"); QStringList res; query.evaluateTo(&res); return;}
However when I try it at work (Qt 4.3.6) it compiles, but when I run it it crashes on startup with a message saying: The application could not be initialized (i.e. it doesn't even get as far as the first line of code). I googled around but couldn't find whether this is a known bug of Qt 4.3.6 or not. It seems to be a problem with the QtXmlPatternsd4.lib (?)
Unfortunately I am not allowed to update to 4.4.0 at work :mad: . Anybody know whether there is a fix for this? Or do I have to implement my own XML parser if I can't use XMLQuery? :(