Example #1
0
void XmlElementsReader::open(QString filePath_) {
    filePath = filePath_;

    file->setFileName(filePath);
    if (!file->open(QIODevice::ReadOnly))
        hurl("Cannot open file: '"+filePath+"' for reading.");
    reader->setDevice(file);
}
Example #2
0
void XmlElementsReader::next() {
    if (!reader->hasError() && !reader->isEndDocument()) {
		do {
            reader->readNext();
        } while (!reader->hasError() && !reader->isEndDocument() &&
				!reader->isStartElement() && !reader->isEndElement()); 
	}
    if (reader->hasError()) hurl("Illegal XML syntax");
}
Example #3
0
void h() { hurl(); }