Sha256: d9f6bac0cc3c7e0d23dc5aa1e636c00d0a27e8b31020fee6c04be4ca0a5df7ca
Contents?: true
Size: 361 Bytes
Versions: 1
Compression:
Stored size: 361 Bytes
Contents
require 'nokogiri' module MoneyXmlValidator def self.validate(utf_source) gem_root = File.expand_path("../..", __FILE__) path = "#{gem_root}/lib/money_xml_validator/money_xsd/_Document.xsd" io = File.open(path) schema = Nokogiri::XML::Schema(io) doc = Nokogiri::XML(utf_source) errors = schema.validate(doc) errors end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
money_xml_validator-0.0.1 | lib/money_xml_validator.rb |