Frequently Asked Questions
How does this tool represent attributes and text when converting XML to YAML?
It uses the same internal shape as the JSON converter: attributes become @name keys and text content becomes #text when needed.
Do repeated XML elements become YAML lists?
Yes. When the same child tag appears multiple times, the converter stores those values in an array and renders them as YAML list items with dashes.
Why are some YAML values quoted even when they look simple?
The converter quotes empty strings, values with YAML-special characters, leading or trailing spaces, newlines, and strings that look like booleans or numbers. That prevents YAML from silently retyping them.
Does it keep comments or the XML declaration?
No. It converts the parsed document element into a plain object structure, so comments and the original declaration are not carried into the YAML output.
Why does invalid XML give me nothing back?
Because the converter stops at the parse stage. If DOMParser returns a parsererror, the output is cleared and the error message is shown instead of partial YAML.