IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

XmlParser Class Reference

A Xml parser. More...

#include <xmlparser.hpp>

List of all members.

Public Member Functions

 XmlParser ()
bool parse (const QString &xmlData)
 Parsing method from a string.
bool parse (QFile &xmlFile)
 Parsing method from a file.
QString lastError () const
 Last error retrieving method.
void clearLastError ()
 Method to clear the last error.

Protected Attributes

QString m_lastError
 String descripting the last error that occured.

Detailed Description

A Xml parser.

This parser is used to parse a string or a file containing Xml. The main method to use is the parse() methode, which take the Xml string or file.

Definition at line 42 of file xmlparser.hpp.


Constructor & Destructor Documentation

XmlParser::XmlParser (  ) 

Member Function Documentation

void XmlParser::clearLastError (  ) 

Method to clear the last error.

This method clears the last error string

QString XmlParser::lastError (  )  const

Last error retrieving method.

Returns:
Return the string describing the last error that occured
bool XmlParser::parse ( const QString &  xmlData  ) 

Parsing method from a string.

Main method of the XmlParser class, it parse a Xml string.

Parameters:
xmlData String containing the Xml to parse
Returns:
Return a boolean to know if an error occured while parsing
bool XmlParser::parse ( QFile &  xmlFile  ) 

Parsing method from a file.

Main method of the XmlParser class, it parse a Xml file. The file must have an authorized extension.

Parameters:
xmlFile File containing the Xml to parse
Returns:
Return a boolean to know if an error occured while parsing

Member Data Documentation

QString XmlParser::m_lastError [protected]

String descripting the last error that occured.

Definition at line 51 of file xmlparser.hpp.

Responsable bénévole de la rubrique Qt : Thibaut Cuvelier -