class Nokogiri::XML::Node

def content= string

Set the Node's content to a Text node containing +string+. The string gets XML escaped, not interpreted as markup.
###
def content= string
  self.native_content = encode_special_chars(string.to_s)
end