org.freehep.xml.util
Class ClassPathEntityResolver
java.lang.Object
org.freehep.xml.util.ClassPathEntityResolver
- All Implemented Interfaces:
- EntityResolver
public class ClassPathEntityResolver
- extends Object
- implements EntityResolver
An implementation of an EntityResolver which can be used to locate
DTD files located on the current java class path
- Version:
- $Id: ClassPathEntityResolver.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Tony Johnson (tonyj@slac.stanford.edu)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassPathEntityResolver
public ClassPathEntityResolver(String DTDName,
Class root)
- Create a ClassPathEntityResolver that will handle a single DTD.
- Parameters:
DTDName
- The DTDName to resolve (e.g. myStuff.dtd)root
- A class in the same package as the DTD
ClassPathEntityResolver
public ClassPathEntityResolver(Class root,
String DTDPrefix)
- Create a ClassPathEntityResolver that can handle a collection of DTD's
- Parameters:
root
- A class in the package to be used as the root of the DTD pathDTDPrefix
- A string containing the prefix for the DTD to match
resolveEntity
public InputSource resolveEntity(String publicId,
String systemId)
throws SAXException
- Specified by:
resolveEntity
in interface EntityResolver
- Throws:
SAXException
Copyright © 2000-2007 FreeHEP. All Rights Reserved.