LibraryToggle FramesPrintFeedback
Option Default Description
useDom false Apache Camel 2.0: Whether DOMSource/{{DOMResult}} or SaxSource/{{SaxResult}} should be used by the validator.
useSharedSchema true Camel 2.3: Whether the Schema instance should be shared or not. This option is introduced to work around a JDK 1.6.x bug. Xerces should not have this issue.

The following example shows how to configure a route from endpoint direct:start which then goes to one of two endpoints, either mock:valid or mock:invalid based on whether or not the XML matches the given schema (which is supplied on the classpath).

<camelContext xmlns="">
        <from uri="direct:start"/>
            <to uri="validator:org/apache/camel/component/validator/schema.xsd"/>
            <to uri="mock:valid"/>
                <to uri="mock:invalid"/>
                <to uri="mock:finally"/>
Comments powered by Disqus