Castor itself will only do the validation if the java objects
are generated by the SourceGenerator.
However, you can tell castor to invoke XML parser validation (Xerces, Oracle, JAXP,
etc...)
with the castor.properties file:
# True if xml documents should be validated by the SAX Parser
#
org.exolab.castor.parser.validation=false
org.exolab.castor.parser.namespaces=false
This next property tells castor whether to invoke the
validation in the .java files generated by SourceGenerator (probably not applicable to
your situation).
org.exolab.castor.marshalling.validation=true
> -----Original Message-----
> From: Ashwin Desai [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 18, 2003 1:50 PM
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] XML schema validation
>
>
> I have a XML file that is based off a XML schema
> document. Also, I
> have my own set of Java classes to represent this xml
> document. I am
> able to unmarshall the xml file data to my own java
> objects. But, one
> thing I noted was that Castor did not perform
> validation of the XML
> file against the XML schema.
>
> Is there an option that I can use to signal the unmarshaller to
> perform the schema validation ?
>
> Thanks a lot in advance.
> Regards
> Ashwin.
>
>
> =====
> Ashwin Desai.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
>
> DISCLAIMER:
> This email message is for the sole use of the intended
> recipient(s) and may contain confidential and
> privileged information. Any unauthorized review, use,
> disclosure or distribution is prohibited. If you are
> not the intended recipient, please contact the sender
> by reply email and destroy all copies of the original
> message and attachments.
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev