【发布时间】:2014-10-09 01:22:44
【问题描述】:
我正在开发一个应用程序来使用 xerces-c-3.1.1 在 Netbeans 8.0.1 上使用 C++ 读取 XML 文件。
我有一个定义为 DOMNode* 类型的变量,如下所示
DOMNode* attribute=attributes->item(aIndex);
当我在调试器中展开属性时,它会显示一个函数 getNodeType(),它返回一个类型变量。但是,当我添加代码时
NodeType value=attribute->getNodeType();
我收到错误消息
error: ‘NodeType’ was not declared in this scope
【问题讨论】:
-
你可以试试
::xercesc::DOMNode::NodeType而不是写NodeType -
xercesc::DOMNode::NodeType 有效!!非常感谢,
标签: xerces-c