users@jaxb.java.net

Re: Detect errors in xml files

From: mimoune <lhafi_at_yahoo.fr>
Date: Fri, 9 Jan 2009 04:01:17 -0800 (PST)

thank you for your answer..

by only validating i can't treat the error to indicate where exactly has
occured, and about the listner i have no idea how it works, if you can give
an example..

  

Felipe Gaucho wrote:
>
> 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
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/Detect-errors-in-xml-files-tp21370693p21370979.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.