I am using libxml2 to validate an XML file using a Schema. Like this:
schema = XML::Schema.from_string(schema_string)
parser = XML::Parser.new
parser.string = xml
doc = parser.parse
result = doc.validate_schema(schema)
This works and if the XML doc is invalid the error is written to
standard output. Is there a way to capture this output? I need to
relay this information to the client application. Grateful for any
assistance.