glebreutov
glebreutov

Reputation: 785

What to use instead validator in jaxb 2.0

JAXB version 1 spec have a Validator object, in version 2 Validator object was deprecated and optional. What do I need to use instead Validator object?

Upvotes: 2

Views: 592

Answers (1)

stacker
stacker

Reputation: 69002

In JAXB 2.0, the setValidating() method has been deprecated. Now, schema validation is performed using the JAXP 1.3 validation API. To validate using JAXB 2.0, create a SchemaFactory

For an example see the Validator Section here

Upvotes: 3

Related Questions