I want to read an XML file that has a schema declaration in it.
And that\'s all I want to do, read it. I don\'t care if it\'s valid, but I want it to be well formed.
The issue here isn't one of validation. Regardless of validation settings, the parser will still attempt to resolve any references in your document, such as entities, DTDs and (sometimes) schemas. It's only later on that it decides to validate using them (or not). You need to plug in an entity resolver to "intercept" these attempts at de-referencing.
Check out Apache XML Resolver for an easy(ish) way to do this.