Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 499 Bytes

README.markdown

File metadata and controls

15 lines (12 loc) · 499 Bytes

Usage

require 'rubygems'
require 'nokogiri'
require 'nokogiri_to_hash'
html = '
  <div id="hello" class="container">
    <p>Hello! visit my site <a href="http://kuroir.com">Kuroir.com</a></p>
  </div>
'
p Nokogiri.HTML(html).to_hash
=> [{:div=>{:class=>["container"], :children=>[{:p=>{:children=>[{:a=>{:href=>["http://kuroir.com"], :children=>[]}}]}}], :id=>["hello"]}}]

Cretaed by Mario Ricalde for HTML to SCSS converter.