You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Kaan Yamanyar <ka...@yamanyar.com> on 2006/08/03 22:02:46 UTC

Declaring DTD From API

Dear all,
 
In the xml's i parsed I recieve some errors due to entities declared in
dtd.
 
In the mail list i found the solution and it really works. It works if i
add
 
"<!DOCTYPE csf-inputs SYSTEM
"\C:\projects\odabul\odabul-web\WEB-INF\src\cities\WTGData.dtd">" to the
XML file.
 
But i can not add this to all xml files.
 
One solution is to add this at runtime with manipulating the stream
given to the XXXDocument.Factory.parse(...,...) method.
 
But I wonder If i can achieve this with using XmlOptions or some other
way?
 
Maybe xmlOptions.setDocumentType(..) is for this reason. But i really
could not find a good documentation about this.
 
Looking forward to hear a solution. 
 
Regards,
 
Kaan Yamanyar