nokogiri xml unescape

Posted by user296507 on Stack Overflow See other posts from Stack Overflow or by user296507
Published on 2010-03-22T01:04:34Z Indexed on 2010/03/22 1:11 UTC
Read the original article Hit count: 410

Filed under:
|
|
|

hi, i'm just trying out nokogiri xml builder, but am having some problem tying to unescape the content. have been spending a bit of time googgling but so far can't find the answer.

any help would be greatly appreciated.

#build xml docoument
builder = Nokogiri::XML::Builder.new do |xml|
    xml.root{
        xml.node {
            xml.value "text1 & text2"
        }
   }

end puts builder.to_xml

output i'm get is "text1 &amp text2"

but i want it to be "text1 & text2"

© Stack Overflow or respective owner

Related posts about nokogiri

Related posts about Xml