Releases: madeindjs/Crystagiri
Releases · madeindjs/Crystagiri
0.4.0-alpha
News
- New parsing engine #12 (thanks to @giuseongit )
- Extends
Crystagiri::Tag
API #13 (thanks to @giuseongit )
0.3.5
0.3.4
0.3.2
0.3.1
0.3.0
0.2.1
0.2.0
0.1.0
Initial release
In this first version you can only parse Html file represented by Crystagiri::HTML
. You can instanciate it from :
doc = Crystagiri::HTML.new "<h1>Crystagiri is awesome!!</h1>"
doc = Crystagiri::HTML.from_file "README.md"
doc = Crystagiri::HTML.from_url "http://example.com/"
Then you can search all XML::Node
by:
- HTML tag
doc.tag("h2") { |node| puts node }
# => <h2> .. </h2>
# => <h2> .. </h2>
# => <h2> .. </h2>
- HTML id
puts doc.at_id("main-content")
# => <div id="main-content"> ... </div>
- HTML class attribute
doc.class("summary") { |node| puts node }
# => <div class="summary"> .. </div>
# => <div class="summary"> .. </div>
# => <div class="summary"> .. </div>