aspose file tools*
The moose likes XML and Related Technologies and the fly likes EntityResolver : can it be determined through a system property ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "EntityResolver : can it be determined through a system property ?" Watch "EntityResolver : can it be determined through a system property ?" New topic
Author

EntityResolver : can it be determined through a system property ?

Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Hi,

I'm trying to set a customized EntityResolver (telling the xml parser where to look for XML schema files).
Usually, you'd use the standard syntax - somehting like:
SaxParser parser=new SaxParser();
parser.parser.setEntityResolver(myResolver);

However, I was wondering whether you can set a "global" EntityResolver, to be used as default for all parsers ?
Maybe this can be done through some system property, or a static method somewhere in the parsing XML ?

(BTW, I need it because I'm using some third-party API, that encapsulates a SaxParser, but won't let me access it, so I can't configure it directly).

Thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18908
    
    8

I don't see anything like that, but then the list of "features" and "properties" for XML parsers is basically undocumented. However, would an XML Catalog work in your context? I don't know much about them, basically all I know is that they allow you to do things like caching DTDs locally so you don't keep having to go to the Internet to get them.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: EntityResolver : can it be determined through a system property ?