M
Mike Baroukh
Hi all.
I'd like to keep locals dtds with my application and use them with a
local resolver.
I found 2 ways :
- on my parser, I can specify an EntityResolver with
setEntityResolver(). Problem : A parser I've not made (from another lib
for example) will not use my resolver.
- If I use Xerces, I can I can define variable
"org.apache.xerces.xni.parser.XMLParserConfiguration" in System
properties wich point to a class wich use my resolver. This way, every
application that use Xerces will use my Resolver (and by defining
javax.xml.parsers.SAXParserFactory I can specify that Xerces will be the
default Parser). Problem : I must use Xerces.
But is there an "universal way" that will work what ever parser I use
and for all parser created via Dom or Sax Factory ?
Mike
I'd like to keep locals dtds with my application and use them with a
local resolver.
I found 2 ways :
- on my parser, I can specify an EntityResolver with
setEntityResolver(). Problem : A parser I've not made (from another lib
for example) will not use my resolver.
- If I use Xerces, I can I can define variable
"org.apache.xerces.xni.parser.XMLParserConfiguration" in System
properties wich point to a class wich use my resolver. This way, every
application that use Xerces will use my Resolver (and by defining
javax.xml.parsers.SAXParserFactory I can specify that Xerces will be the
default Parser). Problem : I must use Xerces.
But is there an "universal way" that will work what ever parser I use
and for all parser created via Dom or Sax Factory ?
Mike