C ++ RapidXML Node_iterator示例? [英] c++ rapidxml node_iterator example?

查看:110
本文介绍了C ++ RapidXML Node_iterator示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于向我推荐了RapidXML,所以我才开始使用RapidXML.现在要遍历多个兄弟姐妹,我这样做:

I just started using rapidXML since it was recommended to me. Right now to iterate over multiple siblings i do this:

//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();
}

作为基本测试,它可以正常工作.无论如何,我遇到了node_iterator,它似乎是为我执行此操作的一个额外的迭代器类.无论如何,我找不到任何有关如何使用它的示例,所以我想知道是否有人可以向我展示:)

as a basic test and it works fine. Anyways, I came across node_iterator which seems to be an extra iterator class to do this for me. anyways, I could not find any example on how to use it, so I was wondering if some one could show me :)

谢谢!

推荐答案

文档可以找到没有node_iterator类型的文档.除了参考您显然不想要的输出迭代器之外,我什至在该页面上找不到单词iterator.

The documentation that I could find documents no node_iterator type. I can't even find the word iterator on that page except in reference to output iterators, which you clearly don't want.

可能是内部API或正在开发中的API,所以最好不要立即使用它.

It could be that it's an internal API, or one under development, so you're probably best not to use it right now.

这篇关于C ++ RapidXML Node_iterator示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆