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); }
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"); }
void h() { hurl(); }