public class XsdValidation extends Object
Modifier and Type | Class and Description |
---|---|
static class |
XsdValidation.Result
Enumerates possible results of the parse.
|
Constructor and Description |
---|
XsdValidation() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Main method.
|
static XsdValidation.Result |
validateDoc(Reporter reporter,
URL docUrl,
String topElName,
String topElNamespaceUri,
boolean includeSummary)
Validates a given document XML document against its declared schema.
|
public static XsdValidation.Result validateDoc(Reporter reporter, URL docUrl, String topElName, String topElNamespaceUri, boolean includeSummary)
Getting this right seems to be remarkably painful. See comments in the implementation for details.
reporter
- destination for validation messagesdocUrl
- URL of XML document to validatetopElName
- expected name for top element; may be nulltopElNamespaceUri
- expected namespace for top element;
only used for reporting messages,
and ignored if topElName is nullincludeSummary
- if true, report an end-of-stage type summarypublic static void main(String[] args) throws IOException
IOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.