I originally asked this on Stack Overflow and the first response referred me to here.

I'm trying to find a service, library, utility, whatever that converts XML to YAML and includes comments. It's easy to find a lot of XML to YAML converters, but I can't find one that includes XML comments in the YAML output. For example, using the XML input below:

<!-- This section has a comment -->
    <ChildElement id="1" />
    <ChildElement id="2" />

I want the YAML output to be:

# This section has a comment
   _id: 1
   _id: 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.