class Nokogiri::XML::RelaxNG
“untrusted by default” security policy, but is a limitation of the underlying libraries.
underlying parsing libraries to access network resources. This is counter to Nokogiri’s
NOTE: RelaxNG input is always treated as TRUSTED documents, meaning that they will cause the
The list of errors are Nokogiri::XML::SyntaxError objects.
end
puts error.message
schema.validate(doc).each do |error|
doc = Nokogiri::XML(File.open(ADDRESS_XML_FILE))
schema = Nokogiri::XML::RelaxNG(File.open(ADDRESS_SCHEMA_FILE))
that are returned and print them out:
Validate an XML document against a RelaxNG schema. Loop over the errors
== Synopsis
RelaxNG schema.
Nokogiri::XML::RelaxNG is used for validating XML against a
##