com.sun.xml.dtdparser.ExternalEntity Maven / Gradle / Ivy
Go to download
Old JAXB Binding Compiler. Contains source code needed for binding customization files into java sources.
In other words: the *tool* to generate java classes for the given xml representation.
/*
* @(#)XmlChars.java 1.1 00/08/05
*
* Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
*/
package com.sun.xml.dtdparser;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import java.io.IOException;
import java.net.URL;
final class ExternalEntity extends EntityDecl {
String systemId; // resolved URI (not relative)
String publicId; // "-//xyz//....//en"
String notation;
public ExternalEntity(InputEntity in) {
}
public InputSource getInputSource(EntityResolver r)
throws IOException, SAXException {
InputSource retval;
retval = r.resolveEntity(publicId, systemId);
// SAX sez if null is returned, use the URI directly
if (retval == null)
retval = Resolver.createInputSource(new URL(systemId), false);
return retval;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy