开始加入类来处理各种元素

Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
facat@lab.com
2014-11-22 11:32:12 +08:00
parent 3a555bd2c1
commit f502f0dc62
8 changed files with 182 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
#include "BasicElementInfo.h"
//#include <iostream>
bool BasicElementInfo::parseBasicInfo(QXmlStreamReader &reader)
{
// std::cout<<"father"<<"\n";
QStringRef elementName;
QStringRef id;
elementName=reader.name();
qDebug()<<reader.name()<<"\n";
if(reader.attributes().hasAttribute("rdf:ID"))
{
qDebug()<<reader.attributes().value("rdf:ID")<<"\n";
id=reader.attributes().value("rdf:ID");
}
while(!reader.atEnd() && !reader.hasError())
{
reader.readNext();
if(reader.isEndElement() && reader.name()==elementName)
{
break;
}
}
this->name=elementName;
this->id=id;
return true;
}