com.sun.xml.tree
Interface DocumentEx
- All Known Implementing Classes:
- XmlDocument
- public abstract interface DocumentEx
- extends Document, ElementFactory, XmlReadable, XmlWritable
This interface extends the DOM Document model by supporting
application-specialized element creation and printing, and
by exposing the URI with which the document is associated.
Fields inherited from class org.w3c.dom.Node |
ATTRIBUTE_NODE,
CDATA_SECTION_NODE,
COMMENT_NODE,
DOCUMENT_FRAGMENT_NODE,
DOCUMENT_NODE,
DOCUMENT_TYPE_NODE,
ELEMENT_NODE,
ENTITY_NODE,
ENTITY_REFERENCE_NODE,
NOTATION_NODE,
PROCESSING_INSTRUCTION_NODE,
TEXT_NODE |
Method Summary |
java.util.Locale |
chooseLocale(java.lang.String[] languages)
Chooses a client locale to use for diagnostics, using the first
language specified in the list that is supported by this DOM
implementation. |
ElementEx |
getElementExById(java.lang.String id)
Returns the element whose ID is given by the parameter; or null
if no such element is known. |
ElementFactory |
getElementFactory()
Returns the element factory to be used by this document. |
java.util.Locale |
getLocale()
Returns the locale to be used for diagnostic messages. |
java.lang.String |
getSystemId()
Returns the system ID (a URI) associated with the document,
or null if this is unknown. |
void |
setElementFactory(ElementFactory factory)
Assigns the element factory to be used by this document. |
void |
setLocale(java.util.Locale locale)
Assigns the locale to be used for diagnostic messages. |
Methods inherited from interface org.w3c.dom.Document |
createAttribute,
createCDATASection,
createComment,
createDocumentFragment,
createElement,
createEntityReference,
createProcessingInstruction,
createTextNode,
getDoctype,
getDocumentElement,
getElementsByTagName,
getImplementation |
Methods inherited from interface org.w3c.dom.Node |
appendChild,
cloneNode,
getAttributes,
getChildNodes,
getFirstChild,
getLastChild,
getNextSibling,
getNodeName,
getNodeType,
getNodeValue,
getOwnerDocument,
getParentNode,
getPreviousSibling,
hasChildNodes,
insertBefore,
removeChild,
replaceChild,
setNodeValue |
getSystemId
public java.lang.String getSystemId()
- Returns the system ID (a URI) associated with the document,
or null if this is unknown.
setElementFactory
public void setElementFactory(ElementFactory factory)
- Assigns the element factory to be used by this document.
getElementFactory
public ElementFactory getElementFactory()
- Returns the element factory to be used by this document.
getElementExById
public ElementEx getElementExById(java.lang.String id)
- Returns the element whose ID is given by the parameter; or null
if no such element is known.
- Parameters:
id
- The value of the ID attribute which will be matched
by any element which is returned.
getLocale
public java.util.Locale getLocale()
- Returns the locale to be used for diagnostic messages.
setLocale
public void setLocale(java.util.Locale locale)
- Assigns the locale to be used for diagnostic messages.
Multi-language applications, such as web servers dealing with
clients from different locales, need the ability to interact
with clients in languages other than the server's default.
When a Document is created, its locale is the default
locale for the virtual machine.
- See Also:
chooseLocale(java.lang.String[])
chooseLocale
public java.util.Locale chooseLocale(java.lang.String[] languages)
- Chooses a client locale to use for diagnostics, using the first
language specified in the list that is supported by this DOM
implementation. That locale is then automatically assigned 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 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.- Returns:
- The chosen locale, or null.
- See Also:
MessageCatalog
Submit Feedback to xml-feedback@java.sun.com
Copyright © 1998-1999 Sun Microsystems, Inc. All Rights Reserved.
Sun Microsystems, Inc.
901 San Antonio Road
Palo Alto, California, 94303, U.S.A.