summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
blob: 190d6106d31d5acfe368d13c6be08520ea4ec86c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! [0]
QXmlQuery query;
query.setQuery("<e/>, 1, 'two'");
QXmlResultItems result;

if (query.isValid()) {
    query.evaluateTo(&result);
    QXmlItem item(result.next());
    while (!item.isNull()) {
        // use item
        item = result.next();
    }
    if (result.hasError())
        /* Runtime error! */;
}
//! [0]