[jdom-interest] Storing DTD (but not XML) inside a Jar file
per.norrman at austers.se
Fri May 13 10:23:33 PDT 2005
Norman Elton skrev:
> First of all, great library. Very powerful; yet simple to use. Thanks.
> Second... I'm bundling my application in a Jar file. The user will
> provide a XML config file to be parsed by JDOM. I want to validate the
> config file against a DTD that is bundled in the Jar file. I saw a
> solution using the ClassLoader to store both the XML and DTD in the
> file, but I want the XML to be stored externally.
> Is this possible? If not with JDOM, can I load/parse the file, then
> send it through another validator?
> Thanks for any advice,
Possible! Just provide SAXBuilder with an EntityResolver that obtains
the DTD from the JAR file.
More information about the jdom-interest