I have a xml document with a node which has children nodes but I want to iterate over specific nodes which names are stored in the array, for example:
const char* childrenNodes[]={"childNodeA", "childNodeC", "childNodeK"};
I can use next_sibling function which takes as an argument the element of the above array. Do you have any idea how to implement such loop using pugixml ?
There are two overrides of
next_siblingYou're concentrating on the second one. Rather use the first one that doesn't take a parameter, and then just check if the node name is in the array