本文整理汇总了C++中QDomNode::isNotation方法的典型用法代码示例。如果您正苦于以下问题:C++ QDomNode::isNotation方法的具体用法?C++ QDomNode::isNotation怎么用?C++ QDomNode::isNotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDomNode
的用法示例。
在下文中一共展示了QDomNode::isNotation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isNotation
bool QDomNodeProto:: isNotation() const
{
QDomNode *item = qscriptvalue_cast<QDomNode*>(thisObject());
if (item)
return item->isNotation();
return false;
}
示例2: parseEntry
void ReadAndWriteXML::parseEntry(const QDomElement &element, QTreeWidgetItem *parent, int parentLevel)
{
// item->setText(0, element.attribute("term"));
QDomNode node = element.firstChild();
while (!node.isNull()) {
//qDebug() << "DomParser::parseEntry node " << node.toElement().tagName();
// qDebug() << "DomParser::parseEntry parsing node " << node.nodeName();
if (node.isElement()) {
//qDebug() << "DomParser::parseEntry "<< node.nodeName()<< " is element ";
QTreeWidgetItem *childitem=new QTreeWidgetItem(parent, QStringList(QString("Type: %1").arg(node.nodeName())));
parseEntry(node.toElement(), childitem,++parentLevel);
QString _attr="";
if (node.hasAttributes()) {
childitem=new QTreeWidgetItem(childitem, QStringList(QString("Attributes node %1").arg(node.nodeName())));
parseAttribute(node.attributes(), childitem, parentLevel);
}
node = node.nextSibling();
continue;
}
if (node.isCDATASection()) {
//qDebug() << "DomParser::parseEntry "<< node.nodeName()<< " is CDATASection --" << node.toText().data() << "--";
new QTreeWidgetItem(parent, QStringList(QString("Type: %1 Value: %2").arg(node.nodeName(),node.toText().data())));
node = node.nextSibling();
continue;
}
if (node.isComment()) {
//qDebug() << "DomParser::parseEntry "<< node.nodeName()<< " is comment --" << node.toText().data() << "--";
new QTreeWidgetItem(parent, QStringList(QString("Type: %1 Value: %2").arg(node.nodeName(),node.toText().data())));
node = node.nextSibling();
continue;
}
if (node.isText()) {
//qDebug() << "DomParser::parseEntry "<< node.nodeName()<< " text --" << node.toText().data() << "--";
new QTreeWidgetItem(parent, QStringList(QString("Type: %1 Value: %2").arg(node.nodeName(),node.toText().data())));
node = node.nextSibling();
continue;
}
if (node.isDocument()) {
//qDebug() << "DomParser::parseEntry "<< node.nodeName()<< " is document ";
QTreeWidgetItem *childitem=new QTreeWidgetItem(parent, QStringList(QString("Type: %1").arg(node.nodeName())));
parseEntry(node.toElement(), childitem,++parentLevel);
node = node.nextSibling();
continue;
}
if (node.isDocumentType()) {
qDebug() << "DomParser::parseEntry "<< node.nodeName()<< " is document type";
QTreeWidgetItem *childitem=new QTreeWidgetItem(parent, QStringList(QString("Type: %1").arg(node.nodeName())));
parseEntry(node.toElement(), childitem,++parentLevel);
node = node.nextSibling();
continue;
}
if (node.isDocumentFragment()) {
qDebug() << "DomParser::parseEntry "<< node.nodeName()<< " is document fragment";
QTreeWidgetItem *childitem=new QTreeWidgetItem(parent, QStringList(QString("Type: %1").arg(node.nodeName())));
parseEntry(node.toElement(), childitem,++parentLevel);
node = node.nextSibling();
continue;
}
if (node.isEntity() || node.isEntityReference () || node.isNotation () || node.isProcessingInstruction ()) {
qDebug() << "DomParser::parseEntry "<< node.nodeName()<< " is not supported";
node = node.nextSibling();
continue;
}
node = node.nextSibling();
}
}