|
From: Stefan B. <bo...@ap...> - 2010-03-25 09:26:53
|
On 2010-03-25, James Sewell <Jam...@ar...> wrote:
> After a bit of playing I got it to work with JAXP 1.4!
Great
> SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
> Schema schema = factory.newSchema();
> Source ss = new StreamSource(inputstream, uri);
> Validator v = schema.newValidator();
> v.validate(ss);
this should be equivalent to XMLUnit's JAXP 1.3 validation with
Validator v = new Validator();
StreamSource is = new StreamSource(inputstream, uri);
boolean isValid = v.isInstanceValid(is);
if not, we should try to figure out why.
Stefan
|