XML Is Not Injective
codefaster.substack.com
codefaster.substack.com
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.
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>In my limited experience I haven't seen people use the <array> container and the xml parser still works, although it is a good idea.