勧められてから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();
}
基本的なテストとして、正常に動作します。とにかく、これを行うための余分なイテレータクラスのように見える node_iterator に出くわしました。とにかく、私はそれを使用する方法の例を見つけることができなかったので、誰かが私に見せてくれるかどうか疑問に思っていました:)
ありがとう!