< prev index next >

test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderImpl01.java

Print this page




 140 
 141     /**
 142      * Allow the application to resolve external entities.
 143      *
 144      * @param publicId The public identifier of the external entity
 145      *        being referenced, or null if none was supplied.
 146      * @param systemId The system identifier of the external entity
 147      *        being referenced.
 148      * @return An InputSource object describing the new input source,
 149      *         or null to request that the parser open a regular
 150      *         URI connection to the system identifier.
 151      */
 152     @Override
 153     public InputSource resolveEntity(String publicId, String systemId) {
 154         if (systemId.equals("http://www.myhost.com/today"))
 155             return new InputSource(systemId);
 156         else
 157             return null;
 158     }
 159 }
 160 
 161 


 140 
 141     /**
 142      * Allow the application to resolve external entities.
 143      *
 144      * @param publicId The public identifier of the external entity
 145      *        being referenced, or null if none was supplied.
 146      * @param systemId The system identifier of the external entity
 147      *        being referenced.
 148      * @return An InputSource object describing the new input source,
 149      *         or null to request that the parser open a regular
 150      *         URI connection to the system identifier.
 151      */
 152     @Override
 153     public InputSource resolveEntity(String publicId, String systemId) {
 154         if (systemId.equals("http://www.myhost.com/today"))
 155             return new InputSource(systemId);
 156         else
 157             return null;
 158     }
 159 }


< prev index next >