as far as inconsistencies: JSON to YAML is a 1:1 conversion as YAML supports all data structures of JSON(infact a JSON string is considered valid YAML). With XML that is not the case and there is no official guidelines as to perform the conversion so many converters roll their own formatting.
So take your pick as to which you want assuming the input data is as follows:
<nodes>
<node>text</node>
<node2 some_attr="attr_value">
text2
<node3 />
</node2>
</nodes>
Always include attributes and childrenRecommended due to being a consistent format, there is no 'extra processing' in determining if the entry's value is what was the text or if its a collection containing attributes, children and text
nodes:
attributes: {}
children:
node:
attributes: {}
children: {}
value: text
node2:
attributes:
some_attr: attr_value
children:
node3:
attributes: {}
children: {}
value: ""
value: text2
value: ""
Only include attributes and children when such exist, if neither exist, default to text. if text is missing, default to truenodes:
children:
node: text
node2:
attributes:
some_attr: attr_value
children:
node3: true
value: text2