Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 0e93f2e Dec 11, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Release v1.1 Dec 11, 2018
spec Run simplecov unconditionally. Dec 11, 2018
.gitignore Things to ignore Feb 5, 2015
.rspec Color makes you happy. Feb 5, 2015
.travis.yml Update travis build matrix Aug 8, 2018
Gemfile Update travis build matrix Aug 8, 2018
LICENSE add LICENSE Sep 13, 2012 Rename NOM to nom-xml Dec 3, 2012
Rakefile Update travis build matrix Aug 8, 2018
nom-xml.gemspec Specify newer versions of development dependencies Feb 5, 2015


Build Status

A library to help you tame sprawling XML schemas.

nom-xml allows you to define a “terminology” to ease translation between XML and ruby objects – you can query the xml for Nodes or node values without ever writing a line of XPath. nom-xml is built on top of nokogiri decorators, which means you can mix-and-match NOM accessors with nokogiri xpaths, xml manipulation, and traversing and it will just work.

Some Handy Links

Here are some resources to help you learn more about nom-xml:

An Example

<?xml version="1.0"?>
<!-- from -->
	<name>Avocado Dip</name>
	<serving units="g">29</serving>
	<calories total="110" fat="100"/>
require 'nom/xml'

# load the source document as normal
doc = Nokogiri::XML my_source_document

doc.set_terminology do |t|

  t.vitamins do |v|

  t.minerals do |m|
    m.calcium :path => 'ca'
    m.iron :path => 'fe'

doc.nom! == 'Avocado Dip'
doc.minerals.calcium.text == '0'
You can’t perform that action at this time.