I am forced to use XML for exchanging information about oders of products. The product might contain sub assemblies that in turn may also contain sub assemblies. I envisioned the following structure, but I am not sure if it is valid to do so in XML.
<?xml version="1.0" encoding="ISO-8859-1"?>
<Order>
<Items>
<Item>
<Name>Assembly A</Name>
<Items>
<Item>
<Name>Assembly B</Name>
<Items>
<Item>
<Name>Assembly C</Name>
<Items />
</Item>
<Item>
<Name>Assembly D</Name>
<Items />
</Item>
</Items>
</Item>
<Item>
<Name>Assembly E</Name>
<Items />
</Item>
</Items>
</Item>
</Items>
</Order>
I truncated all "unnecessary" information to make the example as minimal as possible.
I am not sure if using the nesting is okay, because a colleague told me that it does not conform with XML standards.
I chose the structure because every item/assembly in it self is completly consistent. That means I can parse any level of the hierarchy based on the same "template".
Could you please give me advise if such a structure is valid and adviseable?