title: How to read string as XML with QDomDocument object in QT
body: <p>I am receiving string as a XML document with this function:</p>
  
  <pre><code>void HttpWindow::replyFinished(QNetworkReply *reply)
  {
       QString data = reply-&gt;readAll().trimmed();
       bool value=document-&gt;setContent(&amp;data);
  }
  </code></pre>
  
  <p>and here is my slot and signal:</p>
  
  <pre><code>connect(reply, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
  </code></pre>
  
  <p>When I put above code I get error that there is not pre-defined function that receive one string as I have sended...Can somone try to correct this so I can see how to put this Qstring value into xml document. So I can read XML</p>
  
  <p>Thank you</p>
  
  <p>EDIT:
  these are the functions that I have to choose, I have tried all but it seems I am not sending right paremeters:</p>
  
  <pre><code> // Qt extensions
      bool setContent(const QByteArray&amp; text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
      bool setContent(const QString&amp; text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
      bool setContent(QIODevice* dev, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
      bool setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
      bool setContent(const QByteArray&amp; text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
      bool setContent(const QString&amp; text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
      bool setContent(QIODevice* dev, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
      bool setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
  </code></pre>
  
  <p>EDIT 2:
  I can't compile it, I can give you this code:</p>
  
  <pre><code>httpwindow.cpp: In member function 'void HttpWindow::replyFinished(QNetworkReply*)':
  httpwindow.cpp:140: error: no matching function for call to 'QDomDocument::setContent(QString*)'
  ..\..\..\..\Desktop\Qt\4.7.4\mingw\include/QtXml/qdom.h:343: note: candidates are: bool QDomDocument::setContent(const QByteArray&amp;, bool, QString*, int*, int*)
  ..\..\..\..\Desktop\Qt\4.7.4\mingw\include/QtXml/qdom.h:344: note:                 bool QDomDocument::setContent(const QString&amp;, bool, QString*, int*, int*)
  ..\..\..\..\Desktop\Qt\4.7.4\mingw\include/QtXml/qdom.h:345: note:                 bool QDomDocument::setContent(QIODevice*, bool, QString*, int*, int*)
  ..\..\..\..\Desktop\Qt\4.7.4\mingw\include/QtXml/qdom.h:346: note:                 bool QDomDocument::setContent(QXmlInputSource*, bool, QString*, int*, int*)
  ..\..\..\..\Desktop\Qt\4.7.4\mingw\include/QtXml/qdom.h:347: note:                 bool QDomDocument::setContent(const QByteArray&amp;, QString*, int*, int*)
  ..\..\..\..\Desktop\Qt\4.7.4\mingw\include/QtXml/qdom.h:348: note:                 bool QDomDocument::setContent(const QString&amp;, QString*, int*, int*)
  ..\..\..\..\Desktop\Qt\4.7.4\mingw\include/QtXml/qdom.h:349: note:                 bool QDomDocument::setContent(QIODevice*, QString*, int*, int*)
  ..\..\..\..\Desktop\Qt\4.7.4\mingw\include/QtXml/qdom.h:350: note:                 bool QDomDocument::setContent(QXmlInputSource*, QXmlReader*, QString*, int*, int*)
  </code></pre>
  
  <p>Or tell me what to do to get that Qdebug output. You mean like <code>Qdebug&lt;&lt;data</code> ?</p>