Hi, After reply from the network access manager i have to do the following but it doesn't show the response content. Is any problem with my code.
This is my Qt code:
void Sample::parseXml(QNetworkReply *reply)
{
qDebug()<<reply->readAll();
if(doc->setContent(reply)){
while(!n.isNull()) {
QDomElement e
= n.
toElement();
// try to convert the node to an element. if(!e.isNull()) {
qDebug() << qPrintable(e.tagName())<< endl;// the node really is an element.
}
n = n.nextSibling();
}
}
}
void Sample::parseXml(QNetworkReply *reply)
{
qDebug()<<reply->readAll();
QDomDocument* doc = new QDomDocument();
if(doc->setContent(reply)){
QDomElement docElem =doc->documentElement();
QDomNode n = docElem.firstChild();
while(!n.isNull()) {
QDomElement e = n.toElement(); // try to convert the node to an element.
if(!e.isNull()) {
qDebug() << qPrintable(e.tagName())<< endl;// the node really is an element.
}
n = n.nextSibling();
}
}
}
To copy to clipboard, switch view to plain text mode
Please help me.
Bookmarks