RE: [castor-dev] Can we validate the value of a XML field, before UnMarshalling ?
Thank You ! Bindu. I'll try this"Shekar, Bindu" <[EMAIL PROTECTED]> wrote: Shalini, If you want to verify the value of a particular element of an object, you nee to write a handler for that particular element. For an example, if you've a double field in your object, you can define the castor xml as for this element as Where the above DoubleFieldHandler will extends from AbstractFieldHandler. In the above DoubleFieldHandler, you need to write setValue and getValue method using reflection. In setValue method, you can verify the value and if not valid one you can throw and exception. Hope this helps you. regards bindus -Original Message-From: Shalni Kumar [mailto:[EMAIL PROTECTED]Sent: Friday, June 10, 2005 9:58 AMTo: [email protected]: [castor-dev] Can we validate the value of a XML field, before UnMarshalling ? Hi !! I have a input XML String which i unmarshall(using Castor) and read values from it. Now I want to check the value of one field before I unmarshall and only if that field has a valid value, i want to continue with the unmarshalling, if not i just want to throw an error. Please give me some suggestions on how i can do this ? Hope to get some reply ! :-) Shalini __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Discover Yahoo! Have fun online with music videos, cool games, IM & more. Check it out!
RE: [castor-dev] Can we validate the value of a XML field, before UnMarshalling ?
Shalini, If you want to verify the value of a particular element of an object, you nee to write a handler for that particular element. For an example, if you've a double field in your object, you can define the castor xml as for this element as Where the above DoubleFieldHandler will extends from AbstractFieldHandler. In the above DoubleFieldHandler, you need to write setValue and getValue method using reflection. In setValue method, you can verify the value and if not valid one you can throw and exception. Hope this helps you. regards bindus -Original Message-From: Shalni Kumar [mailto:[EMAIL PROTECTED]Sent: Friday, June 10, 2005 9:58 AMTo: [email protected]: [castor-dev] Can we validate the value of a XML field, before UnMarshalling ? Hi !! I have a input XML String which i unmarshall(using Castor) and read values from it. Now I want to check the value of one field before I unmarshall and only if that field has a valid value, i want to continue with the unmarshalling, if not i just want to throw an error. Please give me some suggestions on how i can do this ? Hope to get some reply ! :-) Shalini __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[castor-dev] Can we validate the value of a XML field, before UnMarshalling ?
Hi !! I have a input XML String which i unmarshall(using Castor) and read values from it. Now I want to check the value of one field before I unmarshall and only if that field has a valid value, i want to continue with the unmarshalling, if not i just want to throw an error. Please give me some suggestions on how i can do this ? Hope to get some reply ! :-) ShaliniPaul Spencer <[EMAIL PROTECTED]> wrote: How to marshall a Double to the XML file without a comma, i.e. 1000.00?Paul Spencer-If you wish to unsubscribe from this list, please send an empty message to the following address:[EMAIL PROTECTED]- Discover Yahoo! Have fun online with music videos, cool games, IM & more. Check it out!
[castor-dev] Can we validate the value of a XML field, before UnMarshalling ?
Hi !! I have a input XML String which i unmarshall(using Castor) and read values from it. Now I want to check the value of one field before I unmarshall and only if that field has a valid value, i want to continue with the unmarshalling, if not i just want to throw an error. Please give me some suggestions on how i can do this ? Hope to get some reply ! :-) Shalini__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[castor-dev] Can we validate the value of a XML field, before UnMarshalling ?
Hi !! I have a input XML String which i unmarshall(using Castor) and read values from it. Now I want to check the value of one field before I unmarshall and only if that field has a valid value, i want to continue with the unmarshalling, if not i just want to throw an error. Please give me some suggestions on how i can do this ? Hope to get some reply ! :-) ShaliniPaul Spencer <[EMAIL PROTECTED]> wrote: How to marshall a Double to the XML file without a comma, i.e. 1000.00?Paul Spencer-If you wish to unsubscribe from this list, please send an empty message to the following address:[EMAIL PROTECTED]-__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[castor-dev] Can we validate the value of a XML field, before UnMarshalling ?
Hi !! I have a input XML String which i unmarshall(using Castor) and read values from it. Now I want to check the value of one field before I unmarshall and only if that field has a valid value, i want to continue with the unmarshalling, if not i just want to throw an error. Please give me some suggestions on how i can do this ? Hope to get some reply ! :-) ShaliniPaul Spencer <[EMAIL PROTECTED]> wrote: How to marshall a Double to the XML file without a comma, i.e. 1000.00?Paul Spencer-If you wish to unsubscribe from this list, please send an empty message to the following address:[EMAIL PROTECTED]- Discover Yahoo! Get on-the-go sports scores, stock quotes, news & more. Check it out!

