ich habe ein XML Dokument was ich mittels XQuery auswerten möchte.
Dabei möchte ich einzelne Datensätze auslesen und diese in einer struktur ablegen.
Code: Alles auswählen
struct person
{
QString name,vorname;
};
// oder auch
boost::tuple<QString,QString> person;
http://doc.qtsoftware.com/4.5/xmlpatter ... cinfo.html
Code: Alles auswählen
QStringList times;
QStringList directions;
QXmlQuery query;
query.setQuery(timesQueryUrl);
query.evaluateTo(×);
query.setQuery(directionsQueryUrl);
query.evaluateTo(&directions);
if (times.count() != directions.count()) // something went wrong...
return TimeInformation::List();
TimeInformation::List information;
for (int i = 0; i < times.count(); ++i)
information.append(TimeInformation(times.at(i).simplified(), directions.at(i).simplified()));
Oder muss ich die einzelnen daten jeweils über eine QStringList auslesen, um sie dann zu den Objekten zuverwursten?
phlox