No commit activity in last 3 years
No release in over 3 years
Provides methods to normalize MODS XML according to the Stanford guidelines
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0
~> 0.53

Runtime

~> 1.8
 Project Readme

Build Status Gem Version

Stanford::Mods::Normalizer

Provides methods to normalize MODS XML according to the Stanford guidelines

Usage:

Normalizing an xml document

  require 'stanford/mods/normalizer'
  input_file = 'bb936cg6081.xml' # starting mods document
  output_file = 'bb936cg6081-cleaned.xml' # cleaned up mods document
  mods_xml = File.open(input_file) # read it in
  mods_xml_doc = Nokogiri::XML(mods_xml) # create a nokogiri doc
  normalizer = Stanford::Mods::Normalizer.new
  normalizer.normalize_document(mods_xml_doc.root) # normalize it
  File.write(output_file,mods_xml_doc.to_xml) # write it out