Updated DOM Level 2 Core classes to latest errata. See

http://www.w3.org/2000/11/DOM-Level-2-errata core-18.  Javadoc fixes.


git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225921 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
edwingo 2001-08-01 23:24:39 +00:00
parent c4ca9aa4a8
commit 5ab0e788b4
14 changed files with 456 additions and 173 deletions

View File

@ -13,7 +13,7 @@
package org.w3c.dom; package org.w3c.dom;
/** /**
* The <code>Attr</code> interface represents an attribute in an * The <code>Attr</code> interface represents an attribute in an
* <code>Element</code> object. Typically the allowable values for the * <code>Element</code> object. Typically the allowable values for the
* attribute are defined in a document type definition. * attribute are defined in a document type definition.
* <p><code>Attr</code> objects inherit the <code>Node</code> interface, but * <p><code>Attr</code> objects inherit the <code>Node</code> interface, but
@ -33,7 +33,7 @@ package org.w3c.dom;
* DOM need to be aware that <code>Attr</code> nodes have some things in * DOM need to be aware that <code>Attr</code> nodes have some things in
* common with other objects inheriting the <code>Node</code> interface, but * common with other objects inheriting the <code>Node</code> interface, but
* they also are quite distinct. * they also are quite distinct.
* <p> The attribute's effective value is determined as follows: if this * <p>The attribute's effective value is determined as follows: if this
* attribute has been explicitly assigned any value, that value is the * attribute has been explicitly assigned any value, that value is the
* attribute's effective value; otherwise, if there is a declaration for * attribute's effective value; otherwise, if there is a declaration for
* this attribute, and that declaration includes a default value, then that * this attribute, and that declaration includes a default value, then that
@ -41,19 +41,19 @@ package org.w3c.dom;
* attribute does not exist on this element in the structure model until it * attribute does not exist on this element in the structure model until it
* has been explicitly added. Note that the <code>nodeValue</code> attribute * has been explicitly added. Note that the <code>nodeValue</code> attribute
* on the <code>Attr</code> instance can also be used to retrieve the string * on the <code>Attr</code> instance can also be used to retrieve the string
* version of the attribute's value(s). * version of the attribute's value(s).
* <p>In XML, where the value of an attribute can contain entity references, * <p>In XML, where the value of an attribute can contain entity references,
* the child nodes of the <code>Attr</code> node may be either * the child nodes of the <code>Attr</code> node may be either
* <code>Text</code> or <code>EntityReference</code> nodes (when these are * <code>Text</code> or <code>EntityReference</code> nodes (when these are
* in use; see the description of <code>EntityReference</code> for * in use; see the description of <code>EntityReference</code> for
* discussion). Because the DOM Core is not aware of attribute types, it * discussion). Because the DOM Core is not aware of attribute types, it
* treats all attribute values as simple strings, even if the DTD or schema * treats all attribute values as simple strings, even if the DTD or schema
* declares them as having tokenized types. * declares them as having tokenized types.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>. * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
*/ */
public interface Attr extends Node { public interface Attr extends Node {
/** /**
* Returns the name of this attribute. * Returns the name of this attribute.
*/ */
public String getName(); public String getName();
@ -69,14 +69,14 @@ public interface Attr extends Node {
* implementation will then make a new attribute available with * implementation will then make a new attribute available with
* <code>specified</code> set to <code>false</code> and the default * <code>specified</code> set to <code>false</code> and the default
* value (if one exists). * value (if one exists).
* <br>In summary: If the attribute has an assigned value in the document * <br>In summary: If the attribute has an assigned value in the document
* then <code>specified</code> is <code>true</code>, and the value is * then <code>specified</code> is <code>true</code>, and the value is
* the assigned value. If the attribute has no assigned value in the * the assigned value.If the attribute has no assigned value in the
* document and has a default value in the DTD, then * document and has a default value in the DTD, then
* <code>specified</code> is <code>false</code>, and the value is the * <code>specified</code> is <code>false</code>, and the value is the
* default value in the DTD. If the attribute has no assigned value in * default value in the DTD.If the attribute has no assigned value in
* the document and has a value of #IMPLIED in the DTD, then the * the document and has a value of #IMPLIED in the DTD, then the
* attribute does not appear in the structure model of the document. If * attribute does not appear in the structure model of the document.If
* the <code>ownerElement</code> attribute is <code>null</code> (i.e. * the <code>ownerElement</code> attribute is <code>null</code> (i.e.
* because it was just created or was set to <code>null</code> by the * because it was just created or was set to <code>null</code> by the
* various removal and cloning operations) <code>specified</code> is * various removal and cloning operations) <code>specified</code> is
@ -98,6 +98,19 @@ public interface Attr extends Node {
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/ */
public String getValue(); public String getValue();
/**
* On retrieval, the value of the attribute is returned as a string.
* Character and general entity references are replaced with their
* values. See also the method <code>getAttribute</code> on the
* <code>Element</code> interface.
* <br>On setting, this creates a <code>Text</code> node with the unparsed
* contents of the string. I.e. any characters that an XML processor
* would recognize as markup are instead treated as literal text. See
* also the method <code>setAttribute</code> on the <code>Element</code>
* interface.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public void setValue(String value) public void setValue(String value)
throws DOMException; throws DOMException;

View File

@ -24,8 +24,8 @@ package org.w3c.dom;
* contain characters that need to be escaped outside of CDATA sections and * contain characters that need to be escaped outside of CDATA sections and
* that, depending on the character encoding ("charset") chosen for * that, depending on the character encoding ("charset") chosen for
* serialization, it may be impossible to write out some characters as part * serialization, it may be impossible to write out some characters as part
* of a CDATA section. * of a CDATA section.
* <p> The <code>CDATASection</code> interface inherits from the * <p>The <code>CDATASection</code> interface inherits from the
* <code>CharacterData</code> interface through the <code>Text</code> * <code>CharacterData</code> interface through the <code>Text</code>
* interface. Adjacent <code>CDATASection</code> nodes are not merged by use * interface. Adjacent <code>CDATASection</code> nodes are not merged by use
* of the <code>normalize</code> method of the <code>Node</code> interface. * of the <code>normalize</code> method of the <code>Node</code> interface.

View File

@ -44,6 +44,21 @@ public interface CharacterData extends Node {
*/ */
public String getData() public String getData()
throws DOMException; throws DOMException;
/**
* The character data of the node that implements this interface. The DOM
* implementation may not put arbitrary limits on the amount of data
* that may be stored in a <code>CharacterData</code> node. However,
* implementation limits may mean that the entirety of a node's data may
* not fit into a single <code>DOMString</code>. In such cases, the user
* may call <code>substringData</code> to retrieve the data in
* appropriately sized pieces.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
public void setData(String data) public void setData(String data)
throws DOMException; throws DOMException;
@ -56,8 +71,8 @@ public interface CharacterData extends Node {
/** /**
* Extracts a range of data from the node. * Extracts a range of data from the node.
* @param offsetStart offset of substring to extract. * @param offset Start offset of substring to extract.
* @param countThe number of 16-bit units to extract. * @param count The number of 16-bit units to extract.
* @return The specified substring. If the sum of <code>offset</code> and * @return The specified substring. If the sum of <code>offset</code> and
* <code>count</code> exceeds the <code>length</code>, then all 16-bit * <code>count</code> exceeds the <code>length</code>, then all 16-bit
* units to the end of the data are returned. * units to the end of the data are returned.
@ -77,7 +92,7 @@ public interface CharacterData extends Node {
* Append the string to the end of the character data of the node. Upon * Append the string to the end of the character data of the node. Upon
* success, <code>data</code> provides access to the concatenation of * success, <code>data</code> provides access to the concatenation of
* <code>data</code> and the <code>DOMString</code> specified. * <code>data</code> and the <code>DOMString</code> specified.
* @param argThe <code>DOMString</code> to append. * @param arg The <code>DOMString</code> to append.
* @exception DOMException * @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/ */
@ -86,8 +101,8 @@ public interface CharacterData extends Node {
/** /**
* Insert a string at the specified 16-bit unit offset. * Insert a string at the specified 16-bit unit offset.
* @param offsetThe character offset at which to insert. * @param offset The character offset at which to insert.
* @param argThe <code>DOMString</code> to insert. * @param arg The <code>DOMString</code> to insert.
* @exception DOMException * @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
* negative or greater than the number of 16-bit units in * negative or greater than the number of 16-bit units in
@ -101,8 +116,8 @@ public interface CharacterData extends Node {
/** /**
* Remove a range of 16-bit units from the node. Upon success, * Remove a range of 16-bit units from the node. Upon success,
* <code>data</code> and <code>length</code> reflect the change. * <code>data</code> and <code>length</code> reflect the change.
* @param offsetThe offset from which to start removing. * @param offset The offset from which to start removing.
* @param countThe number of 16-bit units to delete. If the sum of * @param count The number of 16-bit units to delete. If the sum of
* <code>offset</code> and <code>count</code> exceeds * <code>offset</code> and <code>count</code> exceeds
* <code>length</code> then all 16-bit units from <code>offset</code> * <code>length</code> then all 16-bit units from <code>offset</code>
* to the end of the data are deleted. * to the end of the data are deleted.
@ -120,14 +135,14 @@ public interface CharacterData extends Node {
/** /**
* Replace the characters starting at the specified 16-bit unit offset * Replace the characters starting at the specified 16-bit unit offset
* with the specified string. * with the specified string.
* @param offsetThe offset from which to start replacing. * @param offset The offset from which to start replacing.
* @param countThe number of 16-bit units to replace. If the sum of * @param count The number of 16-bit units to replace. If the sum of
* <code>offset</code> and <code>count</code> exceeds * <code>offset</code> and <code>count</code> exceeds
* <code>length</code>, then all 16-bit units to the end of the data * <code>length</code>, then all 16-bit units to the end of the data
* are replaced; (i.e., the effect is the same as a <code>remove</code> * are replaced; (i.e., the effect is the same as a <code>remove</code>
* method call with the same range, followed by an <code>append</code> * method call with the same range, followed by an <code>append</code>
* method invocation). * method invocation).
* @param argThe <code>DOMString</code> with which the range must be * @param arg The <code>DOMString</code> with which the range must be
* replaced. * replaced.
* @exception DOMException * @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is

View File

@ -18,10 +18,10 @@ package org.w3c.dom;
* because data is lost, or because the implementation has become unstable). * because data is lost, or because the implementation has become unstable).
* In general, DOM methods return specific error values in ordinary * In general, DOM methods return specific error values in ordinary
* processing situations, such as out-of-bound errors when using * processing situations, such as out-of-bound errors when using
* <code>NodeList</code>. * <code>NodeList</code>.
* <p>Implementations should raise other exceptions under other circumstances. * <p>Implementations should raise other exceptions under other circumstances.
* For example, implementations should raise an implementation-dependent * For example, implementations should raise an implementation-dependent
* exception if a <code>null</code> argument is passed. * exception if a <code>null</code> argument is passed.
* <p>Some languages and object systems do not support the concept of * <p>Some languages and object systems do not support the concept of
* exceptions. For such systems, error conditions may be indicated using * exceptions. For such systems, error conditions may be indicated using
* native error reporting mechanisms. For some bindings, for example, * native error reporting mechanisms. For some bindings, for example,

View File

@ -21,17 +21,13 @@ package org.w3c.dom;
public interface DOMImplementation { public interface DOMImplementation {
/** /**
* Test if the DOM implementation implements a specific feature. * Test if the DOM implementation implements a specific feature.
* @param featureThe name of the feature to test (case-insensitive). The * @param feature The name of the feature to test (case-insensitive). The
* values used by DOM features are defined throughout the DOM Level 2 * values used by DOM features are defined throughout the DOM Level 2
* specifications and listed in the section. The name must be an XML * specifications and listed in the section. The name must be an XML
* name. To avoid possible conflicts, as a convention, names referring * name. To avoid possible conflicts, as a convention, names referring
* to features defined outside the DOM specification should be made * to features defined outside the DOM specification should be made
* unique by reversing the name of the Internet domain name of the * unique.
* person (or the organization that the person belongs to) who defines * @param version This is the version number of the feature to test. In
* the feature, component by component, and using this as a prefix.
* For instance, the W3C SVG Working Group defines the feature
* "org.w3c.dom.svg".
* @param versionThis is the version number of the feature to test. In
* Level 2, the string can be either "2.0" or "1.0". If the version is * Level 2, the string can be either "2.0" or "1.0". If the version is
* not specified, supporting any version of the feature causes the * not specified, supporting any version of the feature causes the
* method to return <code>true</code>. * method to return <code>true</code>.
@ -47,11 +43,10 @@ public interface DOMImplementation {
* default attribute additions do not occur. It is expected that a * default attribute additions do not occur. It is expected that a
* future version of the DOM will provide a way for populating a * future version of the DOM will provide a way for populating a
* <code>DocumentType</code>. * <code>DocumentType</code>.
* <br>HTML-only DOM implementations do not need to implement this method. * @param qualifiedName The qualified name of the document type to be
* @param qualifiedNameThe qualified name of the document type to be * created.
* created. * @param publicId The external subset public identifier.
* @param publicIdThe external subset public identifier. * @param systemId The external subset system identifier.
* @param systemIdThe external subset system identifier.
* @return A new <code>DocumentType</code> node with * @return A new <code>DocumentType</code> node with
* <code>Node.ownerDocument</code> set to <code>null</code>. * <code>Node.ownerDocument</code> set to <code>null</code>.
* @exception DOMException * @exception DOMException
@ -59,6 +54,12 @@ public interface DOMImplementation {
* contains an illegal character. * contains an illegal character.
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed. * malformed.
* <br>NOT_SUPPORTED_ERR: May be raised by DOM implementations which do
* not support the <code>"XML"</code> feature, if they choose not to
* support this method. Other features introduced in the future, by
* the DOM WG or in extensions defined by other groups, may also
* demand support for this method; please consult the definition of
* the feature to see if it requires this method.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public DocumentType createDocumentType(String qualifiedName, public DocumentType createDocumentType(String qualifiedName,
@ -67,13 +68,13 @@ public interface DOMImplementation {
throws DOMException; throws DOMException;
/** /**
* Creates an XML <code>Document</code> object of the specified type with * Creates a DOM Document object of the specified type with its document
* its document element. HTML-only DOM implementations do not need to * element.
* implement this method. * @param namespaceURI The namespace URI of the document element to
* @param namespaceURIThe namespace URI of the document element to create. * create.
* @param qualifiedNameThe qualified name of the document element to be * @param qualifiedName The qualified name of the document element to be
* created. * created.
* @param doctypeThe type of document to be created or <code>null</code>. * @param doctype The type of document to be created or <code>null</code>.
* When <code>doctype</code> is not <code>null</code>, its * When <code>doctype</code> is not <code>null</code>, its
* <code>Node.ownerDocument</code> attribute is set to the document * <code>Node.ownerDocument</code> attribute is set to the document
* being created. * being created.
@ -86,10 +87,19 @@ public interface DOMImplementation {
* <code>namespaceURI</code> is <code>null</code>, or if the * <code>namespaceURI</code> is <code>null</code>, or if the
* <code>qualifiedName</code> has a prefix that is "xml" and the * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/XML/1998/namespace" . * http://www.w3.org/XML/1998/namespace" , or if the DOM
* implementation does not support the <code>"XML"</code> feature but
* a non-null namespace URI was provided, since namespaces were
* defined by XML.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already * <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
* been used with a different document or was created from a different * been used with a different document or was created from a different
* implementation. * implementation.
* <br>NOT_SUPPORTED_ERR: May be raised by DOM implementations which do
* not support the "XML" feature, if they choose not to support this
* method. Other features introduced in the future, by the DOM WG or
* in extensions defined by other groups, may also demand support for
* this method; please consult the definition of the feature to see if
* it requires this method.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Document createDocument(String namespaceURI, public Document createDocument(String namespaceURI,

View File

@ -59,10 +59,10 @@ public interface Document extends Node {
* and attached to the element. * and attached to the element.
* <br>To create an element with a qualified name and namespace URI, use * <br>To create an element with a qualified name and namespace URI, use
* the <code>createElementNS</code> method. * the <code>createElementNS</code> method.
* @param tagNameThe name of the element type to instantiate. For XML, * @param tagName The name of the element type to instantiate. For XML,
* this is case-sensitive. For HTML, the <code>tagName</code> * this is case-sensitive. For HTML, the <code>tagName</code>
* parameter may be provided in any case, but it must be mapped to the * parameter may be provided in any case, but it must be mapped to the
* canonical uppercase form by the DOM implementation. * canonical uppercase form by the DOM implementation.
* @return A new <code>Element</code> object with the * @return A new <code>Element</code> object with the
* <code>nodeName</code> attribute set to <code>tagName</code>, and * <code>nodeName</code> attribute set to <code>tagName</code>, and
* <code>localName</code>, <code>prefix</code>, and * <code>localName</code>, <code>prefix</code>, and
@ -75,21 +75,21 @@ public interface Document extends Node {
throws DOMException; throws DOMException;
/** /**
* Creates an empty <code>DocumentFragment</code> object. * Creates an empty <code>DocumentFragment</code> object.
* @return A new <code>DocumentFragment</code>. * @return A new <code>DocumentFragment</code>.
*/ */
public DocumentFragment createDocumentFragment(); public DocumentFragment createDocumentFragment();
/** /**
* Creates a <code>Text</code> node given the specified string. * Creates a <code>Text</code> node given the specified string.
* @param dataThe data for the node. * @param data The data for the node.
* @return The new <code>Text</code> object. * @return The new <code>Text</code> object.
*/ */
public Text createTextNode(String data); public Text createTextNode(String data);
/** /**
* Creates a <code>Comment</code> node given the specified string. * Creates a <code>Comment</code> node given the specified string.
* @param dataThe data for the node. * @param data The data for the node.
* @return The new <code>Comment</code> object. * @return The new <code>Comment</code> object.
*/ */
public Comment createComment(String data); public Comment createComment(String data);
@ -97,7 +97,7 @@ public interface Document extends Node {
/** /**
* Creates a <code>CDATASection</code> node whose value is the specified * Creates a <code>CDATASection</code> node whose value is the specified
* string. * string.
* @param dataThe data for the <code>CDATASection</code> contents. * @param data The data for the <code>CDATASection</code> contents.
* @return The new <code>CDATASection</code> object. * @return The new <code>CDATASection</code> object.
* @exception DOMException * @exception DOMException
* NOT_SUPPORTED_ERR: Raised if this document is an HTML document. * NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
@ -108,8 +108,8 @@ public interface Document extends Node {
/** /**
* Creates a <code>ProcessingInstruction</code> node given the specified * Creates a <code>ProcessingInstruction</code> node given the specified
* name and data strings. * name and data strings.
* @param targetThe target part of the processing instruction. * @param target The target part of the processing instruction.
* @param dataThe data for the node. * @param data The data for the node.
* @return The new <code>ProcessingInstruction</code> object. * @return The new <code>ProcessingInstruction</code> object.
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified target contains an * INVALID_CHARACTER_ERR: Raised if the specified target contains an
@ -126,7 +126,7 @@ public interface Document extends Node {
* using the <code>setAttributeNode</code> method. * using the <code>setAttributeNode</code> method.
* <br>To create an attribute with a qualified name and namespace URI, use * <br>To create an attribute with a qualified name and namespace URI, use
* the <code>createAttributeNS</code> method. * the <code>createAttributeNS</code> method.
* @param nameThe name of the attribute. * @param name The name of the attribute.
* @return A new <code>Attr</code> object with the <code>nodeName</code> * @return A new <code>Attr</code> object with the <code>nodeName</code>
* attribute set to <code>name</code>, and <code>localName</code>, * attribute set to <code>name</code>, and <code>localName</code>,
* <code>prefix</code>, and <code>namespaceURI</code> set to * <code>prefix</code>, and <code>namespaceURI</code> set to
@ -148,7 +148,7 @@ public interface Document extends Node {
* node is also unbound; (its <code>namespaceURI</code> is * node is also unbound; (its <code>namespaceURI</code> is
* <code>null</code>). The DOM Level 2 does not support any mechanism to * <code>null</code>). The DOM Level 2 does not support any mechanism to
* resolve namespace prefixes. * resolve namespace prefixes.
* @param nameThe name of the entity to reference. * @param name The name of the entity to reference.
* @return The new <code>EntityReference</code> object. * @return The new <code>EntityReference</code> object.
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified name contains an * INVALID_CHARACTER_ERR: Raised if the specified name contains an
@ -161,8 +161,8 @@ public interface Document extends Node {
/** /**
* Returns a <code>NodeList</code> of all the <code>Elements</code> with a * Returns a <code>NodeList</code> of all the <code>Elements</code> with a
* given tag name in the order in which they are encountered in a * given tag name in the order in which they are encountered in a
* preorder traversal of the <code>Document</code> tree. * preorder traversal of the <code>Document</code> tree.
* @param tagnameThe name of the tag to match on. The special value "*" * @param tagname The name of the tag to match on. The special value "*"
* matches all tags. * matches all tags.
* @return A new <code>NodeList</code> object containing all the matched * @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>. * <code>Elements</code>.
@ -255,9 +255,9 @@ public interface Document extends Node {
* types of nodes inheriting from <code>CharacterData</code> copy their * types of nodes inheriting from <code>CharacterData</code> copy their
* <code>data</code> and <code>length</code> attributes from those of * <code>data</code> and <code>length</code> attributes from those of
* the source node.</dd> * the source node.</dd>
* * </dl>
* @param importedNodeThe node to import. * @param importedNode The node to import.
* @param deepIf <code>true</code>, recursively import the subtree under * @param deep If <code>true</code>, recursively import the subtree under
* the specified node; if <code>false</code>, import only the node * the specified node; if <code>false</code>, import only the node
* itself, as explained above. This has no effect on <code>Attr</code> * itself, as explained above. This has no effect on <code>Attr</code>
* , <code>EntityReference</code>, and <code>Notation</code> nodes. * , <code>EntityReference</code>, and <code>Notation</code> nodes.
@ -272,28 +272,57 @@ public interface Document extends Node {
throws DOMException; throws DOMException;
/** /**
* Creates an element of the given qualified name and namespace URI. * Creates an element of the given qualified name and namespace URI.
* HTML-only DOM implementations do not need to implement this method. * @param namespaceURI The namespace URI of the element to create.
* @param namespaceURIThe namespace URI of the element to create. * @param qualifiedName The qualified name of the element type to
* @param qualifiedNameThe qualified name of the element type to
* instantiate. * instantiate.
* @return A new <code>Element</code> object with the following * @return A new <code>Element</code> object with the following
* attributes:AttributeValue<code>Node.nodeName</code> * attributes:
* <code>qualifiedName</code><code>Node.namespaceURI</code> * <table border='1'>
* <code>namespaceURI</code><code>Node.prefix</code>prefix, extracted * <tr>
* <th>Attribute</th>
* <th>Value</th>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeName</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>qualifiedName</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.namespaceURI</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>namespaceURI</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.prefix</code></td>
* <td valign='top' rowspan='1' colspan='1'>prefix, extracted
* from <code>qualifiedName</code>, or <code>null</code> if there is * from <code>qualifiedName</code>, or <code>null</code> if there is
* no prefix<code>Node.localName</code>local name, extracted from * no prefix</td>
* <code>qualifiedName</code><code>Element.tagName</code> * </tr>
* <code>qualifiedName</code> * <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.localName</code></td>
* <td valign='top' rowspan='1' colspan='1'>local name, extracted from
* <code>qualifiedName</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Element.tagName</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>qualifiedName</code></td>
* </tr>
* </table>
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character. * contains an illegal character, per the XML 1.0 specification .
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the * malformed per the Namespaces in XML specification, if the
* <code>qualifiedName</code> has a prefix and the
* <code>namespaceURI</code> is <code>null</code>, or if the * <code>namespaceURI</code> is <code>null</code>, or if the
* <code>qualifiedName</code> has a prefix that is "xml" and the * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/XML/1998/namespace" . * http://www.w3.org/XML/1998/namespace" .
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Element createElementNS(String namespaceURI, public Element createElementNS(String namespaceURI,
@ -301,31 +330,65 @@ public interface Document extends Node {
throws DOMException; throws DOMException;
/** /**
* Creates an attribute of the given qualified name and namespace URI. * Creates an attribute of the given qualified name and namespace URI.
* HTML-only DOM implementations do not need to implement this method. * @param namespaceURI The namespace URI of the attribute to create.
* @param namespaceURIThe namespace URI of the attribute to create. * @param qualifiedName The qualified name of the attribute to
* @param qualifiedNameThe qualified name of the attribute to instantiate. * instantiate.
* @return A new <code>Attr</code> object with the following attributes: * @return A new <code>Attr</code> object with the following attributes:
* AttributeValue<code>Node.nodeName</code>qualifiedName * <table border='1'>
* <code>Node.namespaceURI</code><code>namespaceURI</code> * <tr>
* <code>Node.prefix</code>prefix, extracted from * <th>
* Attribute</th>
* <th>Value</th>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeName</code></td>
* <td valign='top' rowspan='1' colspan='1'>qualifiedName</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* <code>Node.namespaceURI</code></td>
* <td valign='top' rowspan='1' colspan='1'><code>namespaceURI</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* <code>Node.prefix</code></td>
* <td valign='top' rowspan='1' colspan='1'>prefix, extracted from
* <code>qualifiedName</code>, or <code>null</code> if there is no * <code>qualifiedName</code>, or <code>null</code> if there is no
* prefix<code>Node.localName</code>local name, extracted from * prefix</td>
* <code>qualifiedName</code><code>Attr.name</code> * </tr>
* <code>qualifiedName</code><code>Node.nodeValue</code>the empty * <tr>
* string * <td valign='top' rowspan='1' colspan='1'><code>Node.localName</code></td>
* <td valign='top' rowspan='1' colspan='1'>local name, extracted from
* <code>qualifiedName</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Attr.name</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>qualifiedName</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeValue</code></td>
* <td valign='top' rowspan='1' colspan='1'>the empty
* string</td>
* </tr>
* </table>
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character. * contains an illegal character, per the XML 1.0 specification .
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the * malformed per the Namespaces in XML specification, if the
* <code>qualifiedName</code> has a prefix and the
* <code>namespaceURI</code> is <code>null</code>, if the * <code>namespaceURI</code> is <code>null</code>, if the
* <code>qualifiedName</code> has a prefix that is "xml" and the * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/XML/1998/namespace", or if the * http://www.w3.org/XML/1998/namespace", or if the
* <code>qualifiedName</code> is "xmlns" and the * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/2000/xmlns/". * http://www.w3.org/2000/xmlns/".
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Attr createAttributeNS(String namespaceURI, public Attr createAttributeNS(String namespaceURI,
@ -336,9 +399,9 @@ public interface Document extends Node {
* Returns a <code>NodeList</code> of all the <code>Elements</code> with a * Returns a <code>NodeList</code> of all the <code>Elements</code> with a
* given local name and namespace URI in the order in which they are * given local name and namespace URI in the order in which they are
* encountered in a preorder traversal of the <code>Document</code> tree. * encountered in a preorder traversal of the <code>Document</code> tree.
* @param namespaceURIThe namespace URI of the elements to match on. The * @param namespaceURI The namespace URI of the elements to match on. The
* special value "*" matches all namespaces. * special value "*" matches all namespaces.
* @param localNameThe local name of the elements to match on. The * @param localName The local name of the elements to match on. The
* special value "*" matches all local names. * special value "*" matches all local names.
* @return A new <code>NodeList</code> object containing all the matched * @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>. * <code>Elements</code>.
@ -355,8 +418,8 @@ public interface Document extends Node {
* information that says which attributes are of type ID. Attributes * information that says which attributes are of type ID. Attributes
* with the name "ID" are not of type ID unless so defined. * with the name "ID" are not of type ID unless so defined.
* Implementations that do not know whether attributes are of type ID or * Implementations that do not know whether attributes are of type ID or
* not are expected to return <code>null</code>. * not are expected to return <code>null</code>.
* @param elementIdThe unique <code>id</code> value for an element. * @param elementId The unique <code>id</code> value for an element.
* @return The matching element. * @return The matching element.
* @since DOM Level 2 * @since DOM Level 2
*/ */

View File

@ -68,10 +68,11 @@ public interface DocumentType extends Node {
public String getSystemId(); public String getSystemId();
/** /**
* The internal subset as a string.The actual content returned depends on * The internal subset as a string, or <code>null</code> if there is none.
* how much information is available to the implementation. This may * This is does not contain the delimiting square brackets.The actual
* vary depending on various parameters, including the XML processor * content returned depends on how much information is available to the
* used to build the document. * implementation. This may vary depending on various parameters,
* including the XML processor used to build the document.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public String getInternalSubset(); public String getInternalSubset();

View File

@ -39,13 +39,13 @@ public interface Element extends Node {
* case-preserving in XML, as are all of the operations of the DOM. The * case-preserving in XML, as are all of the operations of the DOM. The
* HTML DOM returns the <code>tagName</code> of an HTML element in the * HTML DOM returns the <code>tagName</code> of an HTML element in the
* canonical uppercase form, regardless of the case in the source HTML * canonical uppercase form, regardless of the case in the source HTML
* document. * document.
*/ */
public String getTagName(); public String getTagName();
/** /**
* Retrieves an attribute value by name. * Retrieves an attribute value by name.
* @param nameThe name of the attribute to retrieve. * @param name The name of the attribute to retrieve.
* @return The <code>Attr</code> value as a string, or the empty string * @return The <code>Attr</code> value as a string, or the empty string
* if that attribute does not have a specified or default value. * if that attribute does not have a specified or default value.
*/ */
@ -65,8 +65,8 @@ public interface Element extends Node {
* it as the value of an attribute. * it as the value of an attribute.
* <br>To set an attribute with a qualified name and namespace URI, use * <br>To set an attribute with a qualified name and namespace URI, use
* the <code>setAttributeNS</code> method. * the <code>setAttributeNS</code> method.
* @param nameThe name of the attribute to create or alter. * @param name The name of the attribute to create or alter.
* @param valueValue to set in string form. * @param value Value to set in string form.
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified name contains an * INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character. * illegal character.
@ -83,7 +83,7 @@ public interface Element extends Node {
* and prefix when applicable. * and prefix when applicable.
* <br>To remove an attribute by local name and namespace URI, use the * <br>To remove an attribute by local name and namespace URI, use the
* <code>removeAttributeNS</code> method. * <code>removeAttributeNS</code> method.
* @param nameThe name of the attribute to remove. * @param name The name of the attribute to remove.
* @exception DOMException * @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/ */
@ -94,7 +94,7 @@ public interface Element extends Node {
* Retrieves an attribute node by name. * Retrieves an attribute node by name.
* <br>To retrieve an attribute node by qualified name and namespace URI, * <br>To retrieve an attribute node by qualified name and namespace URI,
* use the <code>getAttributeNodeNS</code> method. * use the <code>getAttributeNodeNS</code> method.
* @param nameThe name (<code>nodeName</code>) of the attribute to * @param name The name (<code>nodeName</code>) of the attribute to
* retrieve. * retrieve.
* @return The <code>Attr</code> node with the specified name ( * @return The <code>Attr</code> node with the specified name (
* <code>nodeName</code>) or <code>null</code> if there is no such * <code>nodeName</code>) or <code>null</code> if there is no such
@ -108,7 +108,7 @@ public interface Element extends Node {
* replaced by the new one. * replaced by the new one.
* <br>To add a new attribute node with a qualified name and namespace * <br>To add a new attribute node with a qualified name and namespace
* URI, use the <code>setAttributeNodeNS</code> method. * URI, use the <code>setAttributeNodeNS</code> method.
* @param newAttrThe <code>Attr</code> node to add to the attribute list. * @param newAttr The <code>Attr</code> node to add to the attribute list.
* @return If the <code>newAttr</code> attribute replaces an existing * @return If the <code>newAttr</code> attribute replaces an existing
* attribute, the replaced <code>Attr</code> node is returned, * attribute, the replaced <code>Attr</code> node is returned,
* otherwise <code>null</code> is returned. * otherwise <code>null</code> is returned.
@ -129,7 +129,7 @@ public interface Element extends Node {
* has a default value it is immediately replaced. The replacing * has a default value it is immediately replaced. The replacing
* attribute has the same namespace URI and local name, as well as the * attribute has the same namespace URI and local name, as well as the
* original prefix, when applicable. * original prefix, when applicable.
* @param oldAttrThe <code>Attr</code> node to remove from the attribute * @param oldAttr The <code>Attr</code> node to remove from the attribute
* list. * list.
* @return The <code>Attr</code> node that was removed. * @return The <code>Attr</code> node that was removed.
* @exception DOMException * @exception DOMException
@ -144,17 +144,20 @@ public interface Element extends Node {
* Returns a <code>NodeList</code> of all descendant <code>Elements</code> * Returns a <code>NodeList</code> of all descendant <code>Elements</code>
* with a given tag name, in the order in which they are encountered in * with a given tag name, in the order in which they are encountered in
* a preorder traversal of this <code>Element</code> tree. * a preorder traversal of this <code>Element</code> tree.
* @param nameThe name of the tag to match on. The special value "*" * @param name The name of the tag to match on. The special value "*"
* matches all tags. * matches all tags.
* @return A list of matching <code>Element</code> nodes. * @return A list of matching <code>Element</code> nodes.
*/ */
public NodeList getElementsByTagName(String name); public NodeList getElementsByTagName(String name);
/** /**
* Retrieves an attribute value by local name and namespace URI. HTML-only * Retrieves an attribute value by local name and namespace URI.
* DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* @param namespaceURIThe namespace URI of the attribute to retrieve. * the DOM Level 1 calls for creating/setting elements and attributes.
* @param localNameThe local name of the attribute to retrieve. * Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the attribute to retrieve.
* @param localName The local name of the attribute to retrieve.
* @return The <code>Attr</code> value as a string, or the empty string * @return The <code>Attr</code> value as a string, or the empty string
* if that attribute does not have a specified or default value. * if that attribute does not have a specified or default value.
* @since DOM Level 2 * @since DOM Level 2
@ -177,25 +180,28 @@ public interface Element extends Node {
* and use <code>setAttributeNodeNS</code> or * and use <code>setAttributeNodeNS</code> or
* <code>setAttributeNode</code> to assign it as the value of an * <code>setAttributeNode</code> to assign it as the value of an
* attribute. * attribute.
* <br>HTML-only DOM implementations do not need to implement this method. * @param namespaceURI The namespace URI of the attribute to create or
* @param namespaceURIThe namespace URI of the attribute to create or
* alter. * alter.
* @param qualifiedNameThe qualified name of the attribute to create or * @param qualifiedName The qualified name of the attribute to create or
* alter. * alter.
* @param valueThe value to set in string form. * @param value The value to set in string form.
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character. * contains an illegal character, per the XML 1.0 specification .
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the * malformed per the Namespaces in XML specification, if the
* <code>qualifiedName</code> has a prefix and the
* <code>namespaceURI</code> is <code>null</code>, if the * <code>namespaceURI</code> is <code>null</code>, if the
* <code>qualifiedName</code> has a prefix that is "xml" and the * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/XML/1998/namespace", or if the * http://www.w3.org/XML/1998/namespace", or if the
* <code>qualifiedName</code> is "xmlns" and the * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/2000/xmlns/". * http://www.w3.org/2000/xmlns/".
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public void setAttributeNS(String namespaceURI, public void setAttributeNS(String namespaceURI,
@ -208,9 +214,12 @@ public interface Element extends Node {
* attribute has a default value it is immediately replaced. The * attribute has a default value it is immediately replaced. The
* replacing attribute has the same namespace URI and local name, as * replacing attribute has the same namespace URI and local name, as
* well as the original prefix. * well as the original prefix.
* <br>HTML-only DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* @param namespaceURIThe namespace URI of the attribute to remove. * the DOM Level 1 calls for creating/setting elements and attributes.
* @param localNameThe local name of the attribute to remove. * Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the attribute to remove.
* @param localName The local name of the attribute to remove.
* @exception DOMException * @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* @since DOM Level 2 * @since DOM Level 2
@ -220,10 +229,13 @@ public interface Element extends Node {
throws DOMException; throws DOMException;
/** /**
* Retrieves an <code>Attr</code> node by local name and namespace URI. * Retrieves an <code>Attr</code> node by local name and namespace URI.
* HTML-only DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* @param namespaceURIThe namespace URI of the attribute to retrieve. * the DOM Level 1 calls for creating/setting elements and attributes.
* @param localNameThe local name of the attribute to retrieve. * Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the attribute to retrieve.
* @param localName The local name of the attribute to retrieve.
* @return The <code>Attr</code> node with the specified attribute local * @return The <code>Attr</code> node with the specified attribute local
* name and namespace URI or <code>null</code> if there is no such * name and namespace URI or <code>null</code> if there is no such
* attribute. * attribute.
@ -236,8 +248,7 @@ public interface Element extends Node {
* Adds a new attribute. If an attribute with that local name and that * Adds a new attribute. If an attribute with that local name and that
* namespace URI is already present in the element, it is replaced by * namespace URI is already present in the element, it is replaced by
* the new one. * the new one.
* <br>HTML-only DOM implementations do not need to implement this method. * @param newAttr The <code>Attr</code> node to add to the attribute list.
* @param newAttrThe <code>Attr</code> node to add to the attribute list.
* @return If the <code>newAttr</code> attribute replaces an existing * @return If the <code>newAttr</code> attribute replaces an existing
* attribute with the same local name and namespace URI, the replaced * attribute with the same local name and namespace URI, the replaced
* <code>Attr</code> node is returned, otherwise <code>null</code> is * <code>Attr</code> node is returned, otherwise <code>null</code> is
@ -250,6 +261,9 @@ public interface Element extends Node {
* attribute of another <code>Element</code> object. The DOM user must * attribute of another <code>Element</code> object. The DOM user must
* explicitly clone <code>Attr</code> nodes to re-use them in other * explicitly clone <code>Attr</code> nodes to re-use them in other
* elements. * elements.
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Attr setAttributeNodeNS(Attr newAttr) public Attr setAttributeNodeNS(Attr newAttr)
@ -260,10 +274,13 @@ public interface Element extends Node {
* <code>Elements</code> with a given local name and namespace URI in * <code>Elements</code> with a given local name and namespace URI in
* the order in which they are encountered in a preorder traversal of * the order in which they are encountered in a preorder traversal of
* this <code>Element</code> tree. * this <code>Element</code> tree.
* <br>HTML-only DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* @param namespaceURIThe namespace URI of the elements to match on. The * the DOM Level 1 calls for creating/setting elements and attributes.
* Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the elements to match on. The
* special value "*" matches all namespaces. * special value "*" matches all namespaces.
* @param localNameThe local name of the elements to match on. The * @param localName The local name of the elements to match on. The
* special value "*" matches all local names. * special value "*" matches all local names.
* @return A new <code>NodeList</code> object containing all the matched * @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>. * <code>Elements</code>.
@ -276,7 +293,7 @@ public interface Element extends Node {
* Returns <code>true</code> when an attribute with a given name is * Returns <code>true</code> when an attribute with a given name is
* specified on this element or has a default value, <code>false</code> * specified on this element or has a default value, <code>false</code>
* otherwise. * otherwise.
* @param nameThe name of the attribute to look for. * @param name The name of the attribute to look for.
* @return <code>true</code> if an attribute with the given name is * @return <code>true</code> if an attribute with the given name is
* specified on this element or has a default value, <code>false</code> * specified on this element or has a default value, <code>false</code>
* otherwise. * otherwise.
@ -287,10 +304,13 @@ public interface Element extends Node {
/** /**
* Returns <code>true</code> when an attribute with a given local name and * Returns <code>true</code> when an attribute with a given local name and
* namespace URI is specified on this element or has a default value, * namespace URI is specified on this element or has a default value,
* <code>false</code> otherwise. HTML-only DOM implementations do not * <code>false</code> otherwise.
* need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* @param namespaceURIThe namespace URI of the attribute to look for. * the DOM Level 1 calls for creating/setting elements and attributes.
* @param localNameThe local name of the attribute to look for. * Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the attribute to look for.
* @param localName The local name of the attribute to look for.
* @return <code>true</code> if an attribute with the given local name * @return <code>true</code> if an attribute with the given local name
* and namespace URI is specified or has a default value on this * and namespace URI is specified or has a default value on this
* element, <code>false</code> otherwise. * element, <code>false</code> otherwise.

View File

@ -61,7 +61,7 @@ public interface Entity extends Node {
/** /**
* For unparsed entities, the name of the notation for the entity. For * For unparsed entities, the name of the notation for the entity. For
* parsed entities, this is <code>null</code>. * parsed entities, this is <code>null</code>.
*/ */
public String getNotationName(); public String getNotationName();

View File

@ -27,7 +27,7 @@ package org.w3c.dom;
public interface NamedNodeMap { public interface NamedNodeMap {
/** /**
* Retrieves a node specified by name. * Retrieves a node specified by name.
* @param nameThe <code>nodeName</code> of a node to retrieve. * @param name The <code>nodeName</code> of a node to retrieve.
* @return A <code>Node</code> (of any type) with the specified * @return A <code>Node</code> (of any type) with the specified
* <code>nodeName</code>, or <code>null</code> if it does not identify * <code>nodeName</code>, or <code>null</code> if it does not identify
* any node in this map. * any node in this map.
@ -43,7 +43,7 @@ public interface NamedNodeMap {
* (those that have a "special" string value) cannot be stored as the * (those that have a "special" string value) cannot be stored as the
* names would clash. This is seen as preferable to allowing nodes to be * names would clash. This is seen as preferable to allowing nodes to be
* aliased. * aliased.
* @param argA node to store in this map. The node will later be * @param arg A node to store in this map. The node will later be
* accessible using the value of its <code>nodeName</code> attribute. * accessible using the value of its <code>nodeName</code> attribute.
* @return If the new <code>Node</code> replaces an existing node the * @return If the new <code>Node</code> replaces an existing node the
* replaced <code>Node</code> is returned, otherwise <code>null</code> * replaced <code>Node</code> is returned, otherwise <code>null</code>
@ -56,6 +56,11 @@ public interface NamedNodeMap {
* <code>Attr</code> that is already an attribute of another * <code>Attr</code> that is already an attribute of another
* <code>Element</code> object. The DOM user must explicitly clone * <code>Element</code> object. The DOM user must explicitly clone
* <code>Attr</code> nodes to re-use them in other elements. * <code>Attr</code> nodes to re-use them in other elements.
* <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
* doesn't belong in this NamedNodeMap. Examples would include trying
* to insert something other than an Attr node into an Element's map
* of attributes, or a non-Entity node into the DocumentType's map of
* Entities.
*/ */
public Node setNamedItem(Node arg) public Node setNamedItem(Node arg)
throws DOMException; throws DOMException;
@ -66,7 +71,7 @@ public interface NamedNodeMap {
* default value, an attribute immediately appears containing the * default value, an attribute immediately appears containing the
* default value as well as the corresponding namespace URI, local name, * default value as well as the corresponding namespace URI, local name,
* and prefix when applicable. * and prefix when applicable.
* @param nameThe <code>nodeName</code> of the node to remove. * @param name The <code>nodeName</code> of the node to remove.
* @return The node removed from this map if a node with such a name * @return The node removed from this map if a node with such a name
* exists. * exists.
* @exception DOMException * @exception DOMException
@ -81,7 +86,7 @@ public interface NamedNodeMap {
* Returns the <code>index</code>th item in the map. If <code>index</code> * Returns the <code>index</code>th item in the map. If <code>index</code>
* is greater than or equal to the number of nodes in this map, this * is greater than or equal to the number of nodes in this map, this
* returns <code>null</code>. * returns <code>null</code>.
* @param indexIndex into this map. * @param index Index into this map.
* @return The node at the <code>index</code>th position in the map, or * @return The node at the <code>index</code>th position in the map, or
* <code>null</code> if that is not a valid index. * <code>null</code> if that is not a valid index.
*/ */
@ -89,15 +94,18 @@ public interface NamedNodeMap {
/** /**
* The number of nodes in this map. The range of valid child node indices * The number of nodes in this map. The range of valid child node indices
* is <code>0</code> to <code>length-1</code> inclusive. * is <code>0</code> to <code>length-1</code> inclusive.
*/ */
public int getLength(); public int getLength();
/** /**
* Retrieves a node specified by local name and namespace URI. HTML-only * Retrieves a node specified by local name and namespace URI.
* DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* @param namespaceURIThe namespace URI of the node to retrieve. * the DOM Level 1 calls for creating/setting elements and attributes.
* @param localNameThe local name of the node to retrieve. * Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the node to retrieve.
* @param localName The local name of the node to retrieve.
* @return A <code>Node</code> (of any type) with the specified local * @return A <code>Node</code> (of any type) with the specified local
* name and namespace URI, or <code>null</code> if they do not * name and namespace URI, or <code>null</code> if they do not
* identify any node in this map. * identify any node in this map.
@ -111,8 +119,7 @@ public interface NamedNodeMap {
* <code>localName</code>. If a node with that namespace URI and that * <code>localName</code>. If a node with that namespace URI and that
* local name is already present in this map, it is replaced by the new * local name is already present in this map, it is replaced by the new
* one. * one.
* <br>HTML-only DOM implementations do not need to implement this method. * @param arg A node to store in this map. The node will later be
* @param argA node to store in this map. The node will later be
* accessible using the value of its <code>namespaceURI</code> and * accessible using the value of its <code>namespaceURI</code> and
* <code>localName</code> attributes. * <code>localName</code> attributes.
* @return If the new <code>Node</code> replaces an existing node the * @return If the new <code>Node</code> replaces an existing node the
@ -126,6 +133,14 @@ public interface NamedNodeMap {
* <code>Attr</code> that is already an attribute of another * <code>Attr</code> that is already an attribute of another
* <code>Element</code> object. The DOM user must explicitly clone * <code>Element</code> object. The DOM user must explicitly clone
* <code>Attr</code> nodes to re-use them in other elements. * <code>Attr</code> nodes to re-use them in other elements.
* <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
* doesn't belong in this NamedNodeMap. Examples would include trying
* to insert something other than an Attr node into an Element's map
* of attributes, or a non-Entity node into the DocumentType's map of
* Entities.
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Node setNamedItemNS(Node arg) public Node setNamedItemNS(Node arg)
@ -138,9 +153,12 @@ public interface NamedNodeMap {
* attribute of the <code>Node</code> interface. If so, an attribute * attribute of the <code>Node</code> interface. If so, an attribute
* immediately appears containing the default value as well as the * immediately appears containing the default value as well as the
* corresponding namespace URI, local name, and prefix when applicable. * corresponding namespace URI, local name, and prefix when applicable.
* <br>HTML-only DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* @param namespaceURIThe namespace URI of the node to remove. * the DOM Level 1 calls for creating/setting elements and attributes.
* @param localNameThe local name of the node to remove. * Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the node to remove.
* @param localName The local name of the node to remove.
* @return The node removed from this map if a node with such a local * @return The node removed from this map if a node with such a local
* name and namespace URI exists. * name and namespace URI exists.
* @exception DOMException * @exception DOMException

View File

@ -29,6 +29,97 @@ package org.w3c.dom;
* ), this returns <code>null</code>. Note that the specialized interfaces * ), this returns <code>null</code>. Note that the specialized interfaces
* may contain additional and more convenient mechanisms to get and set the * may contain additional and more convenient mechanisms to get and set the
* relevant information. * relevant information.
* <p>The values of <code>nodeName</code>,
* <code>nodeValue</code>, and <code>attributes</code> vary according to the
* node type as follows:
* <table border='1'>
* <tr>
* <th>Interface</th>
* <th>nodeName</th>
* <th>nodeValue</th>
* <th>attributes</th>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Attr</td>
* <td valign='top' rowspan='1' colspan='1'>name of
* attribute</td>
* <td valign='top' rowspan='1' colspan='1'>value of attribute</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>CDATASection</td>
* <td valign='top' rowspan='1' colspan='1'><code>"#cdata-section"</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* content of the CDATA Section</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Comment</td>
* <td valign='top' rowspan='1' colspan='1'><code>"#comment"</code></td>
* <td valign='top' rowspan='1' colspan='1'>content of
* the comment</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Document</td>
* <td valign='top' rowspan='1' colspan='1'><code>"#document"</code></td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>DocumentFragment</td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>"#document-fragment"</code></td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>DocumentType</td>
* <td valign='top' rowspan='1' colspan='1'>document type name</td>
* <td valign='top' rowspan='1' colspan='1'>
* null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Element</td>
* <td valign='top' rowspan='1' colspan='1'>tag name</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>NamedNodeMap</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Entity</td>
* <td valign='top' rowspan='1' colspan='1'>entity name</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* EntityReference</td>
* <td valign='top' rowspan='1' colspan='1'>name of entity referenced</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Notation</td>
* <td valign='top' rowspan='1' colspan='1'>notation name</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>
* null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>ProcessingInstruction</td>
* <td valign='top' rowspan='1' colspan='1'>target</td>
* <td valign='top' rowspan='1' colspan='1'>entire content excluding the target</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Text</td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>"#text"</code></td>
* <td valign='top' rowspan='1' colspan='1'>content of the text node</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* </table>
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>. * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
*/ */
public interface Node { public interface Node {
@ -83,7 +174,7 @@ public interface Node {
public static final short NOTATION_NODE = 12; public static final short NOTATION_NODE = 12;
/** /**
* The name of this node, depending on its type; see the table above. * The name of this node, depending on its type; see the table above.
*/ */
public String getNodeName(); public String getNodeName();
@ -99,6 +190,16 @@ public interface Node {
*/ */
public String getNodeValue() public String getNodeValue()
throws DOMException; throws DOMException;
/**
* The value of this node, depending on its type; see the table above.
* When it is defined to be <code>null</code>, setting it has no effect.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
public void setNodeValue(String nodeValue) public void setNodeValue(String nodeValue)
throws DOMException; throws DOMException;
@ -150,7 +251,7 @@ public interface Node {
/** /**
* A <code>NamedNodeMap</code> containing the attributes of this node (if * A <code>NamedNodeMap</code> containing the attributes of this node (if
* it is an <code>Element</code>) or <code>null</code> otherwise. * it is an <code>Element</code>) or <code>null</code> otherwise.
*/ */
public NamedNodeMap getAttributes(); public NamedNodeMap getAttributes();
@ -172,14 +273,15 @@ public interface Node {
* all of its children are inserted, in the same order, before * all of its children are inserted, in the same order, before
* <code>refChild</code>. If the <code>newChild</code> is already in the * <code>refChild</code>. If the <code>newChild</code> is already in the
* tree, it is first removed. * tree, it is first removed.
* @param newChildThe node to insert. * @param newChild The node to insert.
* @param refChildThe reference node, i.e., the node before which the new * @param refChild The reference node, i.e., the node before which the
* node must be inserted. * new node must be inserted.
* @return The node being inserted. * @return The node being inserted.
* @exception DOMException * @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or if * allow children of the type of the <code>newChild</code> node, or if
* the node to insert is one of this node's ancestors. * the node to insert is one of this node's ancestors or this node
* itself.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node. * from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
@ -199,13 +301,14 @@ public interface Node {
* <code>DocumentFragment</code> children, which are inserted in the * <code>DocumentFragment</code> children, which are inserted in the
* same order. If the <code>newChild</code> is already in the tree, it * same order. If the <code>newChild</code> is already in the tree, it
* is first removed. * is first removed.
* @param newChildThe new node to put in the child list. * @param newChild The new node to put in the child list.
* @param oldChildThe node being replaced in the list. * @param oldChild The node being replaced in the list.
* @return The node replaced. * @return The node replaced.
* @exception DOMException * @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or if * allow children of the type of the <code>newChild</code> node, or if
* the node to put in is one of this node's ancestors. * the node to put in is one of this node's ancestors or this node
* itself.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node. * from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of
@ -220,7 +323,7 @@ public interface Node {
/** /**
* Removes the child node indicated by <code>oldChild</code> from the list * Removes the child node indicated by <code>oldChild</code> from the list
* of children, and returns it. * of children, and returns it.
* @param oldChildThe node being removed. * @param oldChild The node being removed.
* @return The node removed. * @return The node removed.
* @exception DOMException * @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
@ -234,24 +337,26 @@ public interface Node {
* Adds the node <code>newChild</code> to the end of the list of children * Adds the node <code>newChild</code> to the end of the list of children
* of this node. If the <code>newChild</code> is already in the tree, it * of this node. If the <code>newChild</code> is already in the tree, it
* is first removed. * is first removed.
* @param newChildThe node to add.If it is a <code>DocumentFragment</code> * @param newChild The node to add.If it is a
* object, the entire contents of the document fragment are moved * <code>DocumentFragment</code> object, the entire contents of the
* into the child list of this node * document fragment are moved into the child list of this node
* @return The node added. * @return The node added.
* @exception DOMException * @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or if * allow children of the type of the <code>newChild</code> node, or if
* the node to append is one of this node's ancestors. * the node to append is one of this node's ancestors or this node
* itself.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node. * from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
* if the previous parent of the node being inserted is readonly.
*/ */
public Node appendChild(Node newChild) public Node appendChild(Node newChild)
throws DOMException; throws DOMException;
/** /**
* Returns whether this node has any children. * Returns whether this node has any children.
* @return <code>true</code> if this node has any children, * @return <code>true</code> if this node has any children,
* <code>false</code> otherwise. * <code>false</code> otherwise.
*/ */
public boolean hasChildNodes(); public boolean hasChildNodes();
@ -275,9 +380,9 @@ public interface Node {
* specified. And, cloning <code>Document</code>, * specified. And, cloning <code>Document</code>,
* <code>DocumentType</code>, <code>Entity</code>, and * <code>DocumentType</code>, <code>Entity</code>, and
* <code>Notation</code> nodes is implementation dependent. * <code>Notation</code> nodes is implementation dependent.
* @param deepIf <code>true</code>, recursively clone the subtree under * @param deep If <code>true</code>, recursively clone the subtree under
* the specified node; if <code>false</code>, clone only the node * the specified node; if <code>false</code>, clone only the node
* itself (and its attributes, if it is an <code>Element</code>). * itself (and its attributes, if it is an <code>Element</code>).
* @return The duplicate node. * @return The duplicate node.
*/ */
public Node cloneNode(boolean deep); public Node cloneNode(boolean deep);
@ -303,10 +408,10 @@ public interface Node {
/** /**
* Tests whether the DOM implementation implements a specific feature and * Tests whether the DOM implementation implements a specific feature and
* that feature is supported by this node. * that feature is supported by this node.
* @param featureThe name of the feature to test. This is the same name * @param feature The name of the feature to test. This is the same name
* which can be passed to the method <code>hasFeature</code> on * which can be passed to the method <code>hasFeature</code> on
* <code>DOMImplementation</code>. * <code>DOMImplementation</code>.
* @param versionThis is the version number of the feature to test. In * @param version This is the version number of the feature to test. In
* Level 2, version 1, this is the string "2.0". If the version is not * Level 2, version 1, this is the string "2.0". If the version is not
* specified, supporting any version of the feature will cause the * specified, supporting any version of the feature will cause the
* method to return <code>true</code>. * method to return <code>true</code>.
@ -352,20 +457,51 @@ public interface Node {
* <code>Document</code> interface, this is always <code>null</code>. * <code>Document</code> interface, this is always <code>null</code>.
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified prefix contains an * INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
* illegal character. * illegal character, per the XML 1.0 specification .
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is * <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
* malformed, if the <code>namespaceURI</code> of this node is * malformed per the Namespaces in XML specification, if the
* <code>null</code>, if the specified prefix is "xml" and the * <code>namespaceURI</code> of this node is <code>null</code>, if the
* <code>namespaceURI</code> of this node is different from " * specified prefix is "xml" and the <code>namespaceURI</code> of this
* http://www.w3.org/XML/1998/namespace", if this node is an attribute * node is different from "http://www.w3.org/XML/1998/namespace", if
* and the specified prefix is "xmlns" and the * this node is an attribute and the specified prefix is "xmlns" and
* <code>namespaceURI</code> of this node is different from " * the <code>namespaceURI</code> of this node is different from "
* http://www.w3.org/2000/xmlns/", or if this node is an attribute and * http://www.w3.org/2000/xmlns/", or if this node is an attribute and
* the <code>qualifiedName</code> of this node is "xmlns" . * the <code>qualifiedName</code> of this node is "xmlns" .
* @since DOM Level 2 * @since DOM Level 2
*/ */
public String getPrefix(); public String getPrefix();
/**
* The namespace prefix of this node, or <code>null</code> if it is
* unspecified.
* <br>Note that setting this attribute, when permitted, changes the
* <code>nodeName</code> attribute, which holds the qualified name, as
* well as the <code>tagName</code> and <code>name</code> attributes of
* the <code>Element</code> and <code>Attr</code> interfaces, when
* applicable.
* <br>Note also that changing the prefix of an attribute that is known to
* have a default value, does not make a new attribute with the default
* value and the original prefix appear, since the
* <code>namespaceURI</code> and <code>localName</code> do not change.
* <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
* <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
* method, such as <code>createElement</code> from the
* <code>Document</code> interface, this is always <code>null</code>.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
* illegal character, per the XML 1.0 specification .
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
* malformed per the Namespaces in XML specification, if the
* <code>namespaceURI</code> of this node is <code>null</code>, if the
* specified prefix is "xml" and the <code>namespaceURI</code> of this
* node is different from "http://www.w3.org/XML/1998/namespace", if
* this node is an attribute and the specified prefix is "xmlns" and
* the <code>namespaceURI</code> of this node is different from "
* http://www.w3.org/2000/xmlns/", or if this node is an attribute and
* the <code>qualifiedName</code> of this node is "xmlns" .
* @since DOM Level 2
*/
public void setPrefix(String prefix) public void setPrefix(String prefix)
throws DOMException; throws DOMException;

View File

@ -25,7 +25,7 @@ public interface NodeList {
* Returns the <code>index</code>th item in the collection. If * Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of nodes in * <code>index</code> is greater than or equal to the number of nodes in
* the list, this returns <code>null</code>. * the list, this returns <code>null</code>.
* @param indexIndex into the collection. * @param index Index into the collection.
* @return The node at the <code>index</code>th position in the * @return The node at the <code>index</code>th position in the
* <code>NodeList</code>, or <code>null</code> if that is not a valid * <code>NodeList</code>, or <code>null</code> if that is not a valid
* index. * index.
@ -34,7 +34,7 @@ public interface NodeList {
/** /**
* The number of nodes in the list. The range of valid child node indices * The number of nodes in the list. The range of valid child node indices
* is 0 to <code>length-1</code> inclusive. * is 0 to <code>length-1</code> inclusive.
*/ */
public int getLength(); public int getLength();

View File

@ -34,6 +34,13 @@ public interface ProcessingInstruction extends Node {
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/ */
public String getData(); public String getData();
/**
* The content of this processing instruction. This is from the first non
* white space character after the target to the character immediately
* preceding the <code>?&gt;</code>.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public void setData(String data) public void setData(String data)
throws DOMException; throws DOMException;

View File

@ -42,7 +42,7 @@ public interface Text extends CharacterData {
* node had a parent node, the new node is inserted as the next sibling * node had a parent node, the new node is inserted as the next sibling
* of the original node. When the <code>offset</code> is equal to the * of the original node. When the <code>offset</code> is equal to the
* length of this node, the new node has no data. * length of this node, the new node has no data.
* @param offsetThe 16-bit unit offset at which to split, starting from * @param offset The 16-bit unit offset at which to split, starting from
* <code>0</code>. * <code>0</code>.
* @return The new node, of the same type as this node. * @return The new node, of the same type as this node.
* @exception DOMException * @exception DOMException