Source Code : implements EntityResolver

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

implements EntityResolver

   
import java.io.IOException;

import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

public class SimpleEntityResolver implements EntityResolver {

  private static final String USAGE_TERMS_ID = "http://www.n.com/t.xml";

  private static final String USAGE_TERMS_LOCAL_URI = "C:\t.xml";

  public InputSource resolveEntity(String publicID, String systemID) throws IOException,
      SAXException {

    if (systemID.equals(USAGE_TERMS_ID)) {
      return new InputSource(USAGE_TERMS_LOCAL_URI);
    }

    return null;
  }

}

   
    
  

Thank with us