Skip to content

jrobertson/rexle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introducing the Rexle gem

require 'rexle'

s = "<a>ddd<trust colour='red'>abc</trust><ccc>rrr</ccc></a>"
doc = Rexle.new s
r = doc.root.xpath 'trust'
r.first.value
#=> abc

r.first.attributes
#=> {"colour"=>"red"}

s = "<a>ddd<trust>abc</trust><ccc>rrr</ccc></a>"
Rexle.new(s).root.element('trust').value
#=> abc

s = "<a>ddd<trust>abc</trust><ccc><eee>fff</eee></ccc></a>"
Rexle.new(s).root.element('ccc/eee').value
#=> "fff"

Rexle is an XML parser intended for returning elements from an XPath query faster than REXML, and Nokogiri.

Resources

About

Rexle is an XML parser intended for quickly returning elements from an XPath query.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages