A summary of data about the Ruby ecosystem.

https://github.com/savonrb/nori

XML to Hash translator
https://github.com/savonrb/nori

Keywords from Contributors

rubygem mvc activerecord activejob sidekiq rspec feature-flag soap soap-client crash-reporting

Last synced: about 4 hours ago
JSON representation

Repository metadata

XML to Hash translator

README.md

Nori

CI
Gem Version
Code Climate

Really simple XML parsing ripped from Crack, which ripped it from Merb.

Nori supports pluggable parsers and ships with both REXML and Nokogiri implementations.
It defaults to Nokogiri since v2.0.0, but you can change it to use REXML via:

Nori.new(:parser => :rexml)  # or :nokogiri

Make sure Nokogiri is in your LOAD_PATH when parsing XML, because Nori tries to load it when it's needed.

Examples

Nori.new.parse("<tag>This is the content</tag>")
# => {"tag"=>"This is the content"}

Nori.new.parse('<foo />')
#=> {"foo"=>nil}

Nori.new.parse('<foo bar />')
#=> {}

Nori.new.parse('<foo bar="baz"/>')
#=> {"foo"=>{"@bar"=>"baz"}}

Nori.new.parse('<foo bar="baz">Content</foo>')
#=> {"foo"=>"Content"}

Nori::StringWithAttributes

You can access a string node's attributes via attributes.

result = Nori.new.parse('<foo bar="baz">Content</foo>')
#=> {"foo"=>"Content"}

result["foo"].class
# => Nori::StringWithAttributes

result["foo"].attributes
# => {"bar"=>"baz"}

advanced_typecasting

Nori can automatically convert string values to TrueClass, FalseClass, Time, Date, and DateTime:

# "true" and "false" String values are converted to `TrueClass` and `FalseClass`.
Nori.new.parse("<value>true</value>")
# => {"value"=>true}

# String values matching xs:time, xs:date and xs:dateTime are converted to `Time`, `Date` and `DateTime` objects.
Nori.new.parse("<value>09:33:55.7Z</value>")
# => {"value"=>2022-09-29 09:33:55.7 UTC

# disable with advanced_typecasting: false
Nori.new(advanced_typecasting: false).parse("<value>true</value>")
# => {"value"=>"true"}

strip_namespaces

Nori can strip the namespaces from your XML tags. This feature is disabled by default.

Nori.new.parse('<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"></soap:Envelope>')
# => {"soap:Envelope"=>{"@xmlns:soap"=>"http://schemas.xmlsoap.org/soap/envelope/"}}

Nori.new(:strip_namespaces => true).parse('<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"></soap:Envelope>')
# => {"Envelope"=>{"@xmlns:soap"=>"http://schemas.xmlsoap.org/soap/envelope/"}}

convert_tags_to

Nori lets you specify a custom formula to convert XML tags to Hash keys using convert_tags_to.

Nori.new.parse('<userResponse><accountStatus>active</accountStatus></userResponse>')
# => {"userResponse"=>{"accountStatus"=>"active"}}

parser = Nori.new(:convert_tags_to => lambda { |tag| Nori::StringUtils.snakecase(tag).to_sym })
parser.parse('<userResponse><accountStatus>active</accountStatus></userResponse>')
# => {:user_response=>{:account_status=>"active"}}

convert_dashes_to_underscores

By default, Nori will automatically convert dashes in tag names to underscores.

Nori.new.parse('<any-tag>foo bar</any-tag>')
# => {"any_tag"=>"foo bar"}

# disable with convert_dashes_to_underscores
parser = Nori.new(:convert_dashes_to_underscores => false)
parser.parse('<any-tag>foo bar</any-tag>')
# => {"any-tag"=>"foo bar"}

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 213
Total Committers: 37
Avg Commits per committer: 5.757
Development Distribution Score (DDS): 0.521

Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
rubiii me@r****m 102
John Nunemaker n****r@g****m 30
Tim Jarratt t****t@g****m 14
Wynn Netherland w****d@g****m 11
Peter Cai 2****i 9
Olle Jonsson o****n@g****m 8
weidenfreak m****n@b****e 4
Korny Sietsma k****y@s****m 3
robuye r****k@g****m 3
Gene Drabkin g****n@g****m 2
Tim Jarratt p****t@g****m 1
Sergey Baev s****v@a****u 1
Jussi Koljonen j****n@m****m 1
Henry Hsu h****u@z****m 1
Alethea Rose a****a@a****m 1
Andrzej Kajetanowicz a****z@g****m 1
Douglas Eichelberger d****g 1
Felix Wang m****x@g****m 1
sanemat o****n@g****m 1
gaaady g****y@g****m 1
edmz e****z@g****m 1
deadprogrammer r****s@g****m 1
barberj b****n@g****m 1
Yuri Zubov y****u@g****m 1
Tim Riley t****m@o****m 1
Thomas Jachmann s****f@t****m 1
Tamal White t****e@a****m 1
Sandro Turriate s****e@g****m 1
Michael Chu 1****u 1
László Bácsi l****c@l****u 1
and 7 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 7 days ago

Total issues: 55
Total pull requests: 54
Average time to close issues: over 1 year
Average time to close pull requests: 7 months
Total issue authors: 52
Total pull request authors: 40
Average comments per issue: 3.42
Average comments per pull request: 1.76
Merged pull request: 32
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: 3 days
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 1.0
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/savonrb/nori

Top Issue Authors

  • pokonski (2)
  • inossidabile (2)
  • rubiii (2)
  • arkes (1)
  • ArnoldMEDLINQ (1)
  • toobulkeh (1)
  • barberj (1)
  • mrnovalles (1)
  • arjunmenon (1)
  • jedbeard (1)
  • munshkr (1)
  • burlesona (1)
  • james-em (1)
  • pcai (1)
  • sathish316 (1)

Top Pull Request Authors

  • olleolleolle (9)
  • robuye (4)
  • ekzobrain (2)
  • Pepan (2)
  • mchu (2)
  • thomasjachmann (1)
  • gaaady (1)
  • anandagrawal84 (1)
  • HarlemSquirrel (1)
  • alethea (1)
  • barberj (1)
  • hsume2 (1)
  • weidenfreak (1)
  • yuri-zubov (1)
  • joshwlewis (1)

Top Issue Labels

  • support (4)
  • bug (4)
  • improvement (2)
  • Help wanted (1)
  • feature (1)
  • release (1)
  • roadmap (1)

Top Pull Request Labels

  • bug (1)

Package metadata

gem.coop: nori

XML to Hash translator

  • Homepage: https://github.com/savonrb/nori
  • Documentation: http://www.rubydoc.info/gems/nori/
  • Licenses: MIT
  • Latest release: 2.7.1 (published over 1 year ago)
  • Last Synced: 2026-03-01T20:31:31.791Z (2 days ago)
  • Versions: 25
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 120,675,281 Total
  • Docker Downloads: 587,942,693
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.092%
    • Docker downloads count: 0.157%
    • Downloads: 0.211%
  • Maintainers (4)
  • Advisories:
rubygems.org: nori

XML to Hash translator

  • Homepage: https://github.com/savonrb/nori
  • Documentation: http://www.rubydoc.info/gems/nori/
  • Licenses: MIT
  • Latest release: 2.7.1 (published over 1 year ago)
  • Last Synced: 2026-03-01T09:57:14.093Z (2 days ago)
  • Versions: 25
  • Dependent Packages: 173
  • Dependent Repositories: 7,179
  • Downloads: 120,666,832 Total
  • Docker Downloads: 587,942,693
  • Rankings:
    • Downloads: 0.189%
    • Docker downloads count: 0.189%
    • Dependent packages count: 0.205%
    • Dependent repos count: 0.38%
    • Average: 1.282%
    • Forks count: 3.065%
    • Stargazers count: 3.666%
  • Maintainers (4)
  • Advisories:
debian-10: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Documentation: https://packages.debian.org/buster/ruby-nori
  • Licenses:
  • Latest release: 2.6.0-1 (published 20 days ago)
  • Last Synced: 2026-02-13T04:23:28.258Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.04: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Licenses:
  • Latest release: 2.6.0-1.1 (published 20 days ago)
  • Last Synced: 2026-02-11T06:44:52.779Z (20 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-11: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Documentation: https://packages.debian.org/bullseye/ruby-nori
  • Licenses:
  • Latest release: 2.6.0-1.1 (published 21 days ago)
  • Last Synced: 2026-02-13T08:23:00.076Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.10: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Licenses:
  • Latest release: 2.6.0-1.1 (published 18 days ago)
  • Last Synced: 2026-02-13T18:27:32.168Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Licenses:
  • Latest release: 2.6.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T07:18:51.595Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Licenses:
  • Latest release: 2.6.0-1.1 (published 18 days ago)
  • Last Synced: 2026-02-13T09:53:08.133Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-22.04: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Licenses:
  • Latest release: 2.6.0-1.1 (published 18 days ago)
  • Last Synced: 2026-02-13T13:21:44.591Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Documentation: https://packages.debian.org/bookworm/ruby-nori
  • Licenses:
  • Latest release: 2.6.0-1.1 (published 19 days ago)
  • Last Synced: 2026-02-12T23:36:31.536Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-24.04: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Licenses:
  • Latest release: 2.6.0-1.1 (published 25 days ago)
  • Last Synced: 2026-02-06T15:38:45.566Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-13: ruby-nori

  • Homepage: https://github.com/savonrb/nori
  • Documentation: https://packages.debian.org/trixie/ruby-nori
  • Licenses: mit
  • Latest release: 2.6.0-1.1 (published 19 days ago)
  • Last Synced: 2026-02-13T13:17:56.382Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Dependencies

Gemfile rubygems
  • rexml ~> 3.2
nori.gemspec rubygems
  • nokogiri >= 1.4.0 development
  • rake ~> 12.3.3 development
  • rspec ~> 3.11.0 development
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • ruby/setup-ruby v1 composite

Score: 30.281313890485574