# repair cutted XML code by closing the tags # work even if the XML is cut into a tag. # example: # transform '
hello ]*$/m,'') depth-=1 depth.downto(0).each { |x| res<<= %{#{parents[x]}>} } res end