59 * may contain additional and more convenient mechanisms to get and set the |
59 * may contain additional and more convenient mechanisms to get and set the |
60 * relevant information. |
60 * relevant information. |
61 * <p>The values of <code>nodeName</code>, |
61 * <p>The values of <code>nodeName</code>, |
62 * <code>nodeValue</code>, and <code>attributes</code> vary according to the |
62 * <code>nodeValue</code>, and <code>attributes</code> vary according to the |
63 * node type as follows: |
63 * node type as follows: |
64 * <table border='1' cellpadding='3'> |
64 * <table class="striped"> |
|
65 * <caption style="display:none">Interface table</caption> |
|
66 * <thead> |
65 * <tr> |
67 * <tr> |
66 * <th>Interface</th> |
68 * <th>Interface</th> |
67 * <th>nodeName</th> |
69 * <th>nodeName</th> |
68 * <th>nodeValue</th> |
70 * <th>nodeValue</th> |
69 * <th>attributes</th> |
71 * <th>attributes</th> |
70 * </tr> |
72 * </tr> |
71 * <tr> |
73 * </thead> |
72 * <td valign='top' rowspan='1' colspan='1'> |
74 * <tbody> |
|
75 * <tr> |
|
76 * <td> |
73 * <code>Attr</code></td> |
77 * <code>Attr</code></td> |
74 * <td valign='top' rowspan='1' colspan='1'>same as <code>Attr.name</code></td> |
78 * <td>same as <code>Attr.name</code></td> |
75 * <td valign='top' rowspan='1' colspan='1'>same as |
79 * <td>same as |
76 * <code>Attr.value</code></td> |
80 * <code>Attr.value</code></td> |
77 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
81 * <td><code>null</code></td> |
78 * </tr> |
82 * </tr> |
79 * <tr> |
83 * <tr> |
80 * <td valign='top' rowspan='1' colspan='1'><code>CDATASection</code></td> |
84 * <td><code>CDATASection</code></td> |
81 * <td valign='top' rowspan='1' colspan='1'> |
85 * <td> |
82 * <code>"#cdata-section"</code></td> |
86 * <code>"#cdata-section"</code></td> |
83 * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the |
87 * <td>same as <code>CharacterData.data</code>, the |
84 * content of the CDATA Section</td> |
88 * content of the CDATA Section</td> |
85 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
89 * <td><code>null</code></td> |
86 * </tr> |
90 * </tr> |
87 * <tr> |
91 * <tr> |
88 * <td valign='top' rowspan='1' colspan='1'><code>Comment</code></td> |
92 * <td><code>Comment</code></td> |
89 * <td valign='top' rowspan='1' colspan='1'> |
93 * <td> |
90 * <code>"#comment"</code></td> |
94 * <code>"#comment"</code></td> |
91 * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the |
95 * <td>same as <code>CharacterData.data</code>, the |
92 * content of the comment</td> |
96 * content of the comment</td> |
93 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
97 * <td><code>null</code></td> |
94 * </tr> |
98 * </tr> |
95 * <tr> |
99 * <tr> |
96 * <td valign='top' rowspan='1' colspan='1'><code>Document</code></td> |
100 * <td><code>Document</code></td> |
97 * <td valign='top' rowspan='1' colspan='1'> |
101 * <td> |
98 * <code>"#document"</code></td> |
102 * <code>"#document"</code></td> |
99 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
103 * <td><code>null</code></td> |
100 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
104 * <td><code>null</code></td> |
101 * </tr> |
105 * </tr> |
102 * <tr> |
106 * <tr> |
103 * <td valign='top' rowspan='1' colspan='1'> |
107 * <td> |
104 * <code>DocumentFragment</code></td> |
108 * <code>DocumentFragment</code></td> |
105 * <td valign='top' rowspan='1' colspan='1'><code>"#document-fragment"</code></td> |
109 * <td><code>"#document-fragment"</code></td> |
106 * <td valign='top' rowspan='1' colspan='1'> |
110 * <td> |
107 * <code>null</code></td> |
111 * <code>null</code></td> |
108 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
112 * <td><code>null</code></td> |
109 * </tr> |
113 * </tr> |
110 * <tr> |
114 * <tr> |
111 * <td valign='top' rowspan='1' colspan='1'><code>DocumentType</code></td> |
115 * <td><code>DocumentType</code></td> |
112 * <td valign='top' rowspan='1' colspan='1'>same as |
116 * <td>same as |
113 * <code>DocumentType.name</code></td> |
117 * <code>DocumentType.name</code></td> |
114 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
118 * <td><code>null</code></td> |
115 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
119 * <td><code>null</code></td> |
116 * </tr> |
120 * </tr> |
117 * <tr> |
121 * <tr> |
118 * <td valign='top' rowspan='1' colspan='1'> |
122 * <td> |
119 * <code>Element</code></td> |
123 * <code>Element</code></td> |
120 * <td valign='top' rowspan='1' colspan='1'>same as <code>Element.tagName</code></td> |
124 * <td>same as <code>Element.tagName</code></td> |
121 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
125 * <td><code>null</code></td> |
122 * <td valign='top' rowspan='1' colspan='1'> |
126 * <td> |
123 * <code>NamedNodeMap</code></td> |
127 * <code>NamedNodeMap</code></td> |
124 * </tr> |
128 * </tr> |
125 * <tr> |
129 * <tr> |
126 * <td valign='top' rowspan='1' colspan='1'><code>Entity</code></td> |
130 * <td><code>Entity</code></td> |
127 * <td valign='top' rowspan='1' colspan='1'>entity name</td> |
131 * <td>entity name</td> |
128 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
132 * <td><code>null</code></td> |
129 * <td valign='top' rowspan='1' colspan='1'> |
133 * <td> |
130 * <code>null</code></td> |
134 * <code>null</code></td> |
131 * </tr> |
135 * </tr> |
132 * <tr> |
136 * <tr> |
133 * <td valign='top' rowspan='1' colspan='1'><code>EntityReference</code></td> |
137 * <td><code>EntityReference</code></td> |
134 * <td valign='top' rowspan='1' colspan='1'>name of entity referenced</td> |
138 * <td>name of entity referenced</td> |
135 * <td valign='top' rowspan='1' colspan='1'> |
139 * <td> |
136 * <code>null</code></td> |
140 * <code>null</code></td> |
137 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
141 * <td><code>null</code></td> |
138 * </tr> |
142 * </tr> |
139 * <tr> |
143 * <tr> |
140 * <td valign='top' rowspan='1' colspan='1'><code>Notation</code></td> |
144 * <td><code>Notation</code></td> |
141 * <td valign='top' rowspan='1' colspan='1'>notation name</td> |
145 * <td>notation name</td> |
142 * <td valign='top' rowspan='1' colspan='1'> |
146 * <td> |
143 * <code>null</code></td> |
147 * <code>null</code></td> |
144 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
148 * <td><code>null</code></td> |
145 * </tr> |
149 * </tr> |
146 * <tr> |
150 * <tr> |
147 * <td valign='top' rowspan='1' colspan='1'><code>ProcessingInstruction</code></td> |
151 * <td><code>ProcessingInstruction</code></td> |
148 * <td valign='top' rowspan='1' colspan='1'>same |
152 * <td>same |
149 * as <code>ProcessingInstruction.target</code></td> |
153 * as <code>ProcessingInstruction.target</code></td> |
150 * <td valign='top' rowspan='1' colspan='1'>same as |
154 * <td>same as |
151 * <code>ProcessingInstruction.data</code></td> |
155 * <code>ProcessingInstruction.data</code></td> |
152 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
156 * <td><code>null</code></td> |
153 * </tr> |
157 * </tr> |
154 * <tr> |
158 * <tr> |
155 * <td valign='top' rowspan='1' colspan='1'><code>Text</code></td> |
159 * <td><code>Text</code></td> |
156 * <td valign='top' rowspan='1' colspan='1'> |
160 * <td> |
157 * <code>"#text"</code></td> |
161 * <code>"#text"</code></td> |
158 * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the content |
162 * <td>same as <code>CharacterData.data</code>, the content |
159 * of the text node</td> |
163 * of the text node</td> |
160 * <td valign='top' rowspan='1' colspan='1'><code>null</code></td> |
164 * <td><code>null</code></td> |
161 * </tr> |
165 * </tr> |
|
166 * </tbody> |
162 * </table> |
167 * </table> |
163 * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>. |
168 * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>. |
164 */ |
169 */ |
165 public interface Node { |
170 public interface Node { |
166 // NodeType |
171 // NodeType |
685 * <code>Text.isElementContentWhitespace</code>). Similarly, on setting, |
690 * <code>Text.isElementContentWhitespace</code>). Similarly, on setting, |
686 * no parsing is performed either, the input string is taken as pure |
691 * no parsing is performed either, the input string is taken as pure |
687 * textual content. |
692 * textual content. |
688 * <br>The string returned is made of the text content of this node |
693 * <br>The string returned is made of the text content of this node |
689 * depending on its type, as defined below: |
694 * depending on its type, as defined below: |
690 * <table border='1' cellpadding='3'> |
695 * <table class="striped"> |
|
696 * <caption style="display:none">Node/Content table</caption> |
|
697 * <thead> |
691 * <tr> |
698 * <tr> |
692 * <th>Node type</th> |
699 * <th>Node type</th> |
693 * <th>Content</th> |
700 * <th>Content</th> |
694 * </tr> |
701 * </tr> |
|
702 * </thead> |
|
703 * <tbody> |
695 * <tr> |
704 * <tr> |
696 * <td valign='top' rowspan='1' colspan='1'> |
705 * <td> |
697 * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, |
706 * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, |
698 * DOCUMENT_FRAGMENT_NODE</td> |
707 * DOCUMENT_FRAGMENT_NODE</td> |
699 * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code> |
708 * <td>concatenation of the <code>textContent</code> |
700 * attribute value of every child node, excluding COMMENT_NODE and |
709 * attribute value of every child node, excluding COMMENT_NODE and |
701 * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the |
710 * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the |
702 * node has no children.</td> |
711 * node has no children.</td> |
703 * </tr> |
712 * </tr> |
704 * <tr> |
713 * <tr> |
705 * <td valign='top' rowspan='1' colspan='1'>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, |
714 * <td>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, |
706 * PROCESSING_INSTRUCTION_NODE</td> |
715 * PROCESSING_INSTRUCTION_NODE</td> |
707 * <td valign='top' rowspan='1' colspan='1'><code>nodeValue</code></td> |
716 * <td><code>nodeValue</code></td> |
708 * </tr> |
717 * </tr> |
709 * <tr> |
718 * <tr> |
710 * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, |
719 * <td>DOCUMENT_NODE, |
711 * DOCUMENT_TYPE_NODE, NOTATION_NODE</td> |
720 * DOCUMENT_TYPE_NODE, NOTATION_NODE</td> |
712 * <td valign='top' rowspan='1' colspan='1'><em>null</em></td> |
721 * <td><em>null</em></td> |
713 * </tr> |
722 * </tr> |
|
723 * </tbody> |
714 * </table> |
724 * </table> |
715 * @exception DOMException |
725 * @exception DOMException |
716 * DOMSTRING_SIZE_ERR: Raised when it would return more characters than |
726 * DOMSTRING_SIZE_ERR: Raised when it would return more characters than |
717 * fit in a <code>DOMString</code> variable on the implementation |
727 * fit in a <code>DOMString</code> variable on the implementation |
718 * platform. |
728 * platform. |
735 * <code>Text.isElementContentWhitespace</code>). Similarly, on setting, |
745 * <code>Text.isElementContentWhitespace</code>). Similarly, on setting, |
736 * no parsing is performed either, the input string is taken as pure |
746 * no parsing is performed either, the input string is taken as pure |
737 * textual content. |
747 * textual content. |
738 * <br>The string returned is made of the text content of this node |
748 * <br>The string returned is made of the text content of this node |
739 * depending on its type, as defined below: |
749 * depending on its type, as defined below: |
740 * <table border='1' cellpadding='3'> |
750 * <table class="striped"> |
|
751 * <caption style="display:none">Node/Content table</caption> |
|
752 * <thead> |
741 * <tr> |
753 * <tr> |
742 * <th>Node type</th> |
754 * <th>Node type</th> |
743 * <th>Content</th> |
755 * <th>Content</th> |
744 * </tr> |
756 * </tr> |
|
757 * </thead> |
|
758 * <tbody> |
745 * <tr> |
759 * <tr> |
746 * <td valign='top' rowspan='1' colspan='1'> |
760 * <td> |
747 * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, |
761 * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, |
748 * DOCUMENT_FRAGMENT_NODE</td> |
762 * DOCUMENT_FRAGMENT_NODE</td> |
749 * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code> |
763 * <td>concatenation of the <code>textContent</code> |
750 * attribute value of every child node, excluding COMMENT_NODE and |
764 * attribute value of every child node, excluding COMMENT_NODE and |
751 * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the |
765 * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the |
752 * node has no children.</td> |
766 * node has no children.</td> |
753 * </tr> |
767 * </tr> |
754 * <tr> |
768 * <tr> |
755 * <td valign='top' rowspan='1' colspan='1'>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, |
769 * <td>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, |
756 * PROCESSING_INSTRUCTION_NODE</td> |
770 * PROCESSING_INSTRUCTION_NODE</td> |
757 * <td valign='top' rowspan='1' colspan='1'><code>nodeValue</code></td> |
771 * <td><code>nodeValue</code></td> |
758 * </tr> |
772 * </tr> |
759 * <tr> |
773 * <tr> |
760 * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, |
774 * <td>DOCUMENT_NODE, |
761 * DOCUMENT_TYPE_NODE, NOTATION_NODE</td> |
775 * DOCUMENT_TYPE_NODE, NOTATION_NODE</td> |
762 * <td valign='top' rowspan='1' colspan='1'><em>null</em></td> |
776 * <td><em>null</em></td> |
763 * </tr> |
777 * </tr> |
|
778 * </tbody> |
764 * </table> |
779 * </table> |
765 * @exception DOMException |
780 * @exception DOMException |
766 * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. |
781 * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. |
767 * |
782 * |
768 * @since 1.5, DOM Level 3 |
783 * @since 1.5, DOM Level 3 |