improved xml formatter for extra array data
removed slash from Traversable
changed dom creation type
added nested array handling for extra data
added tests, modified docs, improved error handling on wrong tag names
#6137 - reducing nesting level
#6137 - minor cleanups, removing useless `else` block
#6137 - avoiding `elseif` where not needed
#6137 - simplified return value for the generated XML, avoiding writing it to a variable
#6137 - simplified ternary, alignment, spacing
#6137 - swapping type checks to reduce overhead
Merge branch 'feature/#6137-formatter-xml-extra-improvement' into develop

Close #6137