Formatting XML with Nokogiri

What’s the best/recommended way to format XML with nokogiri?

I would like to be able to have all the nodes indented with a “\t”
instead of " " two spaces, and have max two attributes per line.

Do I have to use regular expressions on the xml string with gsub or is
there a better alternative?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs