c ++ rapidxml node_iterator示例?

use*_*137 6 c++ xml rapidxml

我刚开始使用rapidXML,因为它被推荐给我.现在迭代多个兄弟姐妹我这样做:

//get the first texture node    
xml_node<>* texNode = rootNode->first_node("Texture");
if(texNode != 0){
    string test = texNode->first_attribute("path")->value();
    cout << test << endl;
}
//get all its siblings
while(texNode->next_sibling() != 0){
    string test = texNode->first_attribute("path")->value();
    cout << test << endl;
    texNode = texNode->next_sibling();
}
Run Code Online (Sandbox Code Playgroud)

作为基本测试,它工作正常.无论如何,我遇到了node_iterator,这对我来说似乎是一个额外的迭代器类.无论如何,我找不到任何关于如何使用它的例子,所以我想知道是否有人可以告诉我:)

谢谢!

cop*_*pro 3

我能找到的文档没有类型node_iteratoriterator除了引用输出迭代器之外,我什至找不到该页面上的单词,而您显然不想要它。

它可能是一个内部 API,或者是一个正在开发的 API,所以您现在最好不要使用它。