Tag: schema validation

  • Nokogiri XML schema validation with multiple schema files

    When using Nokogiri to validate an XML document against multiple XML Schema files using import declarations, ensure that you use File.open rather than File.read as shown in the Nokogiri::XML::Schema documentation. This will allow Nokogiri to navigate to and read these imported schemas. Thanks to this StackOverflow post. a.xsd b.xsd example.xml validate.rb