#! /usr/bin/env ruby
require "nokogiri"
html = <<~EOF
<html>
<body>
<div>123 Fake St.<br>City, State 65432</div>
</body>
</html>
EOF
doc = Nokogiri::HTML(html)
address = doc.at_css("div")
address.inspect # => "#<Nokogiri::XML::Element:0x78 name=\"div\" children=[#<Nokogiri::XML::Text:0x3c \"123 Fake St.\">, #<Nokogiri::XML::Element:0x50 name=\"br\">, #<Nokogiri::XML::Text:0x64 \"City, State 65432\">]>"
address.content # => "123 Fake St.City, State 65432"
address.text # => "123 Fake St.City, State 65432"
address.inner_text # => "123 Fake St.City, State 65432"
address.to_s # => "<div>123 Fake St.<br>City, State 65432</div>"
address.to_html # => "<div>123 Fake St.<br>City, State 65432</div>"
address.to_xml # => "<div>123 Fake St.<br/>City, State 65432</div>"
address.to_xhtml # => "<div>123 Fake St.<br />City, State 65432</div>"
address.inner_html # => "123 Fake St.<br>City, State 65432"