I have this HTML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note><div><strong>this is note 2</strong>. it has a url.</div></en-note>
I want to extract this from it:
<div><strong>this is note 2</strong>. it has a url.</div>
At the moment, I am doing this:
html_doc.xpath('//en-note').each do |a_tag|
p a_tag.content
end
Which gets me this:
"this is note 2. it has a url."
How can I change the code so that the actual HTML is returned, not just the text?
Simply use
to_s