You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Holger <hl...@googlemail.com> on 2009/12/15 13:20:21 UTC

Xerces output

Hi,

Is there a wrapper available for xml schema validation with xerces-j  
to write the validation report as a file. There are sample for xerces- 
j how to validate via command line? It would be possible the write a  
batch to put the console output into a file but I'm looking for a  
wrapper where you can define the output uri as a parameter of the  
command line. Or is there a wrapper available where a method exist to  
get the errors as a string, callable from a java application?

Greetings

Hle

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Xerces output

Posted by Mukul Gandhi <mu...@apache.org>.
Say, if you attach an error handler to the JAXP validator, then you
would recieve validation errors in error handler call-back methods:
error,
fatalError, or
warning

Then, from SAXParseException object you can retrieve error details
(which you can write to a file, if you wish).

Here are the relevant javadocs:
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/Validator.html
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ErrorHandler.html

On Tue, Dec 15, 2009 at 5:50 PM, Holger <hl...@googlemail.com> wrote:
> Hi,
>
> Is there a wrapper available for xml schema validation with xerces-j to
> write the validation report as a file. There are sample for xerces-j how to
> validate via command line? It would be possible the write a batch to put the
> console output into a file but I'm looking for a wrapper where you can
> define the output uri as a parameter of the command line. Or is there a
> wrapper available where a method exist to get the errors as a string,
> callable from a java application?
>
> Greetings
>
> Hle



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org