Changing the DTD

import org.xml.sax.*;
import java.io.*;

public class LocalResolver implements EntityResolver {
 
   public InputSource resolveEntity (String publicID, String systemID)
   {
     if (publicID.equals("-//Apple Computer//DTD PLIST 1.0//EN")) {
       InputStream in = new FileInputStream("plist.dtd");
       return new InputSource(in);
     } 
     else {
       return null;
     }
   }
 }

Previous | Next | Top | Cafe con Leche

Copyright 2005-2007 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified September 23, 2005