I've got an XML response, and I'm wondering which method is best to use to obtain the required information I need. I want to run through the XML, looking for specific elements and checking the text within.
Current code:
QXmlStreamReader sr(response);
while (!sr.atEnd())
{
sr.readNext();
if(sr.name() == "FeedSubmissionId")
{
QByteArray FeedSubmissionID
= sr.
readElementText().
toUtf8();
GetFeedSubmissionList(FeedSubmissionID);
}
}
if (sr.hasError())
{
qDebug() << err;
}
QXmlStreamReader sr(response);
while (!sr.atEnd())
{
sr.readNext();
if(sr.name() == "FeedSubmissionId")
{
QByteArray FeedSubmissionID = sr.readElementText().toUtf8();
GetFeedSubmissionList(FeedSubmissionID);
}
}
if (sr.hasError())
{
QString err = sr.errorString();
qDebug() << err;
}
To copy to clipboard, switch view to plain text mode
Any advice would be much appreciated.
Regards,
Richard
Bookmarks