users@jaxb.java.net

Re: Detect errors in xml files

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Fri, 9 Jan 2009 12:40:25 +0100

use the xsd schema to validate the xml ..

that solves the types and ranges problems...
f you need also business validation on the xml data, use a listener of
the JAXB parser to validate these cases...

if this solution fits your requirements, ask for an example

On Fri, Jan 9, 2009 at 12:37 PM, mimoune <lhafi_at_yahoo.fr> wrote:
>
> Hi,
>
> i need to get data from xml, my problem is that i need to know the xml file
> errors (like elements missing or data type) to report the errors to other
> users..
>
> what i was trying to do is unmarshal the xml file and with get methods to
> check if i have errors with try catch, bt i don't get any errors..
>
> example
>
> try{
> double valor = getInvoiceSeriesCode();
> } catch(Exception e){
> error = true;
> e.printStackTrace();
> }
>
> but that way i have no message erros..
>
> some help? and sorry for my english
> --
> View this message in context: http://www.nabble.com/Detect-errors-in-xml-files-tp21370693p21370693.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>