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 <?xml version="1.0"?>

Avocado Dip Sunnydale 29 11 3 5 210 2 0 1 0 0 0 0 ```

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'