Sandeep- This echoes back to a problem quite a few months (possibly a year or two) ago. If you are using the Xerces parser, there is a way to tell it to ignore that DOCTYPE. As I remember though, you have to create the parser yourself, configure it correctly and then have Castor use that parser rather than allowing Castor to create a parser. The problem stems from Castor only being able to turn ON parser features, and in this case you actually need to turn OFF a feature.
For more info, see this old post: http://www.mail-archive.com/[email protected]/msg02609.html Stephen On 1/10/07, Sandeep <[EMAIL PROTECTED]> wrote:
Hi I am working on a project to apply data binding to a legacy xml client-server application. For every xml that my server returns, it has the following header part: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE comp SYSTEM 'http://10.72.181.103:8088/comp_server.dtd'> <comp> ..... </comp> The dtd file comp_server.dtd is non-existent. It was there as part of some kind of server's internal logic. Now, my castor is failing saying unable to locate comp_server.dtd which is obvious. My question is, how can I make castor to ignore that DOCTYPE element. Currently, I am doing a crude way of String.substring and passing only <comp> ... </comp> to castor. But this is a hack!! ~Sandeep --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
--------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

