unity.scopes.qt.XmlReader

Class that downloads http XML files synchronously. More...

#include <unity/scopes/qt/XmlReader.h>

Public Member Functions

QXmlStreamReaderSptr read (QUrl const &uri) const
 Downloads a remote XML document and returns a parser containing the data. More...
 
QXmlStreamReaderSptr read (QString const &host, QXmlStreamReaderParameters const &parameters) const
 Downloads a remote XML document and returns a parser containing the data. More...
 

Detailed Description

Class that downloads http XML files synchronously.

Executes a remote HTTP query synchronously to return a XML parser filled with the downloaded data.

Member Function Documentation

QXmlStreamReaderSptr unity::scopes::qt::XmlReader::read ( QUrl const &  uri) const

Downloads a remote XML document and returns a parser containing the data.

Parameters
uriURI to download
Returns
shared pointer of a QXmlStreamReader containing the downloaded data.
QXmlStreamReaderSptr unity::scopes::qt::XmlReader::read ( QString const &  host,
QXmlStreamReaderParameters const &  parameters 
) const

Downloads a remote XML document and returns a parser containing the data.

Parameters
hostthe remote host name
parametersThe parameters that will build the final query, defined by a list of pairs of key and value
Returns
shared pointer of a QXmlStreamReader containing the downloaded data.