Creating a very "abstract" xml parser is not easy and it's quite error-prone. You have to know some (or at least one) parent or common tag names in order to have a starting point for any deeper "abstract" parsing. Basically, you have to move the parser step by step checking everything in the way. For example, you could use a simple function as an entry point for the following function when you meet a specific tag:
However, with this approach, things can get extremely complicated if there are nested tags, for example:<p> <note> <p>...</p> </note> </p>
Maybe it would be easier to subclass QXmlStreamReader but it would help to provide some sample xml data and more info on what exactly you want to do.