Poonarge
14th July 2014, 09:58
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())
{
QString err = sr.errorString();
qDebug() << err;
}
Any advice would be much appreciated.
Regards,
Richard
Current code:
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;
}
Any advice would be much appreciated.
Regards,
Richard