I disagree with you.
A XML file is, by definition, a [context-free grammar](https://en.wikipedia.org/wiki/Context-free_grammar), the same type of grammars used to specify programming languages.
I will make it clearer with the examples below:
/* a simple data structure */
struct Point {
int x;
int y;
};
<point>
<int name="x"></int>
<int name="y"></int>
</point>
/* a recursive data structure */
struct Person {
std::string name;
std::vector<Person> children;
};
<person>
<string name="name"></string>
<vector type="person">
<person>
<string name="name"></string>
<vector type="person">
</vector>
</person>
<person>
<string name="name"></string>
<vector type="person">
</vector>
</person>
</vector>
</person>
To me, it is immediate to see the correct data structure in both examples.If I had to write the second one in JSON, for instance, I would lose the "template type-information" of the list (vector).