public class DTDParser extends Object
Modifier and Type | Field and Description |
---|---|
protected Set |
declaredElements |
static String |
TYPE_CDATA |
static String |
TYPE_ENTITIES |
static String |
TYPE_ENTITY |
static String |
TYPE_ENUMERATION |
static String |
TYPE_ID |
static String |
TYPE_IDREF |
static String |
TYPE_IDREFS |
static String |
TYPE_NMTOKEN |
static String |
TYPE_NMTOKENS |
static String |
TYPE_NOTATION |
Constructor and Description |
---|
DTDParser() |
Modifier and Type | Method and Description |
---|---|
Locale |
chooseLocale(String[] languages)
Chooses a client locale to use for diagnostics, using the first
language specified in the list that is supported by this parser.
|
int |
getColumnNumber() |
DTDEventListener |
getDtdHandler()
Returns the handler used to for DTD parsing events.
|
EntityResolver |
getEntityResolver()
Returns the object used to resolve entities
|
int |
getLineNumber() |
Locale |
getLocale()
Returns the diagnostic locale.
|
String |
getPublicId() |
String |
getSystemId() |
void |
parse(InputSource in)
Parse a DTD.
|
void |
parse(String uri)
Parse a DTD.
|
void |
setDtdHandler(DTDEventListener handler)
Used by applications to set handling of DTD parsing events.
|
void |
setEntityResolver(EntityResolver r)
Lets applications control entity resolution.
|
void |
setLocale(Locale l)
Used by applications to request locale for diagnostics.
|
public static final String TYPE_CDATA
public static final String TYPE_ID
public static final String TYPE_IDREF
public static final String TYPE_IDREFS
public static final String TYPE_ENTITY
public static final String TYPE_ENTITIES
public static final String TYPE_NMTOKEN
public static final String TYPE_NMTOKENS
public static final String TYPE_NOTATION
public static final String TYPE_ENUMERATION
protected final Set declaredElements
public void setLocale(Locale l) throws SAXException
l
- The locale to use, or null to use system defaults
(which may include only message IDs).SAXException
public Locale getLocale()
public Locale chooseLocale(String[] languages) throws SAXException
languages
- Array of language specifiers, ordered with the most
preferable one at the front. For example, "en-ca" then "fr-ca",
followed by "zh_CN". Both RFC 1766 and Java styles are supported.SAXException
MessageCatalog
public void setEntityResolver(EntityResolver r)
public EntityResolver getEntityResolver()
public void setDtdHandler(DTDEventListener handler)
public DTDEventListener getDtdHandler()
public void parse(InputSource in) throws IOException, SAXException
IOException
SAXException
public void parse(String uri) throws IOException, SAXException
IOException
SAXException
public String getPublicId()
public String getSystemId()
public int getLineNumber()
public int getColumnNumber()
Copyright © 2005-2013 Oracle. All Rights Reserved.