format an xml string in Ruby

exceneWreva

New Member
given an xml string like this : \[code\]<some><nested><xml>value</xml></nested></some>\[/code\]what's the best option(using ruby) to format it readable like :\[code\]<some> <nested> <xml>value</xml> </nested></some>\[/code\]I've found an answer here: what's the best way to format an xml string in ruby?, which is really helpful. But it formats xml like:\[code\]<some> <nested> <xml> value </xml> </nested></some>\[/code\]As my xml string is a little big in length. So it is not readable in this format.Thanks in advance!
 
Back
Top