I think there might be an error in the examples as the second example does not have a single root element.<p>If you need to spot an array vs an element, you have to use a container tag to express it. This is the same structure as is needed to encode algebraic data types.<p><pre><code> element: <a>b0</a>
array of two elements: <array><a>b0</a><a>b1</a></array>
array of one element: <array><a>b0</a></array></code></pre>
This seems like a misunderstanding of XML. XML has no built in concept of arrays or properties. This is a problem with your application of XML, not XML itself.