mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Updated API code snippet in readme for GitHub #117
This commit is contained in:
parent
0e944616a5
commit
f482d4d213
2 changed files with 14 additions and 9 deletions
14
README.md
14
README.md
|
|
@ -74,12 +74,12 @@ The [CLI documentation](./docs/cli.md) shows further configuration options.
|
|||
The Validator can also be used in own Java Applications via the API. An example use of the API as follows:
|
||||
|
||||
```java
|
||||
Path scenarios = Paths.get("scenarios.xml");
|
||||
Configuration config = Configuration.load(scenarios.toUri());
|
||||
Input document = InputFactory.read(testDocument);
|
||||
|
||||
URL scenarios = this.getClass().getClassLoader().getResource("scenarios.xml");
|
||||
Configuration config = Configuration.load(scenarios.toURI()).build(ProcessorProvider.getProcessor());
|
||||
Check validator = new DefaultCheck(config);
|
||||
Result validationResult = validator.checkInput(document);
|
||||
|
||||
Input document = InputFactory.read(testDocument);
|
||||
Result report = validator.checkInput(document);
|
||||
|
||||
// examine the result here
|
||||
```
|
||||
|
|
@ -139,8 +139,8 @@ To use the standalone version with Maven coordinates, add the respective classif
|
|||
|
||||
This section describes the next steps planned in the Validator development.
|
||||
|
||||
* Release version 1.6.0 based on Java 11 and using Jakarta 4.x. - Autumn 2025
|
||||
* Drop support of version 1.5.x when version 1.6 is released
|
||||
* Version 1.5.x is frozen - no maintainance, no support
|
||||
* Version 1.6.x - no feature development, but maintainance and best-effort support
|
||||
* Develop version 2.0.0 which will include major API incompatibilities - Winter 2025
|
||||
* Rework scenarios.xml
|
||||
* Rework report output engine
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue