This is for a tool in our system that will verify that it can load an XML file with Saxon, and list any problems. So I want to have Saxon load the file and throw an exception if it can't fully parse it. This test has an option to be given a schema file so it validates against the schema if it exists.
This is for our Java version so need to use the Java API. I tried to port over the C# Validate example (there is no Java validate that I could find) but the API is quite a bit different.
And if possible, get a list of errors it found parsing.