Reads the infos of a tournament of a xml file. More...
#include <xmlReader.h>
Public Member Functions | |
XmlReader () | |
XmlReader (QString filename) | |
Tournament * | read () |
Tournament * | read (QString fileN) |
Private Attributes | |
QString | filename |
Reads the infos of a tournament of a xml file.
XmlReader opens a xml file, reads the data and stores it into a tournament object. The xml file has to have this structure:
<tournament> <teams> <team id="1"> <name>Teamname</name> <info>Additional Information</info> <icon>relativeFilename.jpg</icon> <pick>0<pick> </team> </teams>
<games> <game id="6"> <team1>1</team1> <team2>2</team2> <result>0:0</result> <date>2008-06-24 17:00</date> <descr>Additional Game Information</descr> </game>
</games> </tournament>
Remember: the game IDs have to be in reversed order (final game has highest number, etc.).
Definition at line 50 of file xmlReader.h.
XmlReader::XmlReader | ( | ) |
Definition at line 3 of file xmlReader.cpp.
XmlReader::XmlReader | ( | QString | filename | ) |
Definition at line 8 of file xmlReader.cpp.
Tournament * XmlReader::read | ( | QString | fileN | ) |
Reads data from the file with name "fileN".
Definition at line 18 of file xmlReader.cpp.
Tournament * XmlReader::read | ( | void | ) |
Reads data from the file with name "filename".
Definition at line 13 of file xmlReader.cpp.
QString XmlReader::filename [private] |
Definition at line 67 of file xmlReader.h.