I'm using REXML to parse through some XML data sent via POST. The XML is sent correctly formatted with "&" sent as "&
". However, when I try to parse it, I had problems like the &
becoming & and throwing an error. I fixed with gsub, but now it says #<REXML::ParseException: Missing end tag for 'br'
Anyone have any experience parsing through XML sent via POST on Rails?
def parse
xml = params["xml_data"]
xml = xml.gsub(/&/,"&")
doc, posts = REXML::Document.new(xml), []
end