| java.lang.Object com.sun.xml.dtdparser.DTDParser
DTDParser | public class DTDParser (Code) | | This implements parsing of XML 1.0 DTDs.
This conforms to the portion of the XML 1.0 specification related
to the external DTD subset.
For multi-language applications (such as web servers using XML
processing to create dynamic content), a method supports choosing
a locale for parser diagnostics which is both understood by the
message recipient and supported by the parser.
This parser produces a stream of parse events. It supports some
features (exposing comments, CDATA sections, and entity references)
which are not required to be reported by conformant XML processors.
author: David Brownell author: Janet Koenig author: Kohsuke KAWAGUCHI version: $Id: DTDParser.java,v 1.1 2005/05/31 22:28:54 kohsuke Exp $ |
Inner Class :static class NameCache | |
Inner Class :static class NameCacheEntry | |
TYPE_ENUMERATION | final public static String TYPE_ENUMERATION(Code) | | |
declaredElements | final protected Set declaredElements(Code) | | |
messages | final static Catalog messages(Code) | | |
chooseLocale | public Locale chooseLocale(String languages) throws SAXException(Code) | | Chooses a client locale to use for diagnostics, using the first
language specified in the list that is supported by this parser.
That locale is then set using
setLocale(). Such a list could be provided by a variety of user
preference mechanisms, including the HTTP Accept-Language
header field.
Parameters: languages - Array of language specifiers, ordered with the mostpreferable one at the front. For example, "en-ca" then "fr-ca",followed by "zh_CN". Both RFC 1766 and Java styles are supported. The chosen locale, or null. See Also: MessageCatalog |
getColumnNumber | public int getColumnNumber()(Code) | | |
getDtdHandler | public DTDEventListener getDtdHandler()(Code) | | Returns the handler used to for DTD parsing events.
|
getEntityResolver | public EntityResolver getEntityResolver()(Code) | | Returns the object used to resolve entities
|
getLineNumber | public int getLineNumber()(Code) | | |
getLocale | public Locale getLocale()(Code) | | Returns the diagnostic locale.
|
setDtdHandler | public void setDtdHandler(DTDEventListener handler)(Code) | | Used by applications to set handling of DTD parsing events.
|
setEntityResolver | public void setEntityResolver(EntityResolver r)(Code) | | Lets applications control entity resolution.
|
setLocale | public void setLocale(Locale l) throws SAXException(Code) | | Used by applications to request locale for diagnostics.
Parameters: l - The locale to use, or null to use system defaults(which may include only message IDs). |
|
|