How to validate XML data against DTD

Solution Verified - Updated -


I am trying to validate xml data against dtd file and tried using like below and it is throwing error as "Failed to resolve endpoint: validator://file:dtd/pce_security.dtd due to: The markup in the document preceding the root element must be well-formed."

         <to uri="validator:file:dtd/pce_security.dtd"></to>
            <to uri="mock:valid"></to>
            <to uri="mock:invalid"></to>
            <log message="Catch: Error in parsing ${body}"></log>
            <to uri="mock:finally"></to>
            <log message="Finally: Error in parsing ${body}"></log>

By looking at web it seems camel validator does not support dtd. Could you please check and let us know how to validate xml data against dtd.


  • Red Hat JBoss Fuse 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content