~ubuntu-branches/ubuntu/karmic/libxerces2-java/karmic

« back to all changes in this revision

Viewing changes to debian/dom2-bindings/org/w3c/dom/Node.java

  • Committer: Bazaar Package Importer
  • Author(s): Charles Majola
  • Date: 2005-12-09 11:58:21 UTC
  • Revision ID: james.westby@ubuntu.com-20051209115821-ppifmmty1jv59hik
Tags: 2.6.2-3ubuntu3
Fix Build depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 2000 World Wide Web Consortium,
3
 
 * (Massachusetts Institute of Technology, Institut National de
4
 
 * Recherche en Informatique et en Automatique, Keio University). All
5
 
 * Rights Reserved. This program is distributed under the W3C's Software
6
 
 * Intellectual Property License. This program is distributed in the
7
 
 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8
 
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9
 
 * PURPOSE.
10
 
 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11
 
 */
12
 
 
13
 
package org.w3c.dom;
14
 
 
15
 
/**
16
 
 * The <code>Node</code> interface is the primary datatype for the entire 
17
 
 * Document Object Model. It represents a single node in the document tree. 
18
 
 * While all objects implementing the <code>Node</code> interface expose 
19
 
 * methods for dealing with children, not all objects implementing the 
20
 
 * <code>Node</code> interface may have children. For example, 
21
 
 * <code>Text</code> nodes may not have children, and adding children to 
22
 
 * such nodes results in a <code>DOMException</code> being raised.
23
 
 * <p>The attributes <code>nodeName</code>, <code>nodeValue</code> and 
24
 
 * <code>attributes</code> are included as a mechanism to get at node 
25
 
 * information without casting down to the specific derived interface. In 
26
 
 * cases where there is no obvious mapping of these attributes for a 
27
 
 * specific <code>nodeType</code> (e.g., <code>nodeValue</code> for an 
28
 
 * <code>Element</code> or <code>attributes</code> for a <code>Comment</code>
29
 
 * ), this returns <code>null</code>. Note that the specialized interfaces 
30
 
 * may contain additional and more convenient mechanisms to get and set the 
31
 
 * relevant information.
32
 
 * <p>The values of <code>nodeName</code>, 
33
 
 * <code>nodeValue</code>, and <code>attributes</code> vary according to the 
34
 
 * node type as follows: 
35
 
 * <table border='1'>
36
 
 * <tr>
37
 
 * <th>Interface</th>
38
 
 * <th>nodeName</th>
39
 
 * <th>nodeValue</th>
40
 
 * <th>attributes</th>
41
 
 * </tr>
42
 
 * <tr>
43
 
 * <td valign='top' rowspan='1' colspan='1'>Attr</td>
44
 
 * <td valign='top' rowspan='1' colspan='1'>name of 
45
 
 * attribute</td>
46
 
 * <td valign='top' rowspan='1' colspan='1'>value of attribute</td>
47
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
48
 
 * </tr>
49
 
 * <tr>
50
 
 * <td valign='top' rowspan='1' colspan='1'>CDATASection</td>
51
 
 * <td valign='top' rowspan='1' colspan='1'><code>"#cdata-section"</code></td>
52
 
 * <td valign='top' rowspan='1' colspan='1'>
53
 
 * content of the CDATA Section</td>
54
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
55
 
 * </tr>
56
 
 * <tr>
57
 
 * <td valign='top' rowspan='1' colspan='1'>Comment</td>
58
 
 * <td valign='top' rowspan='1' colspan='1'><code>"#comment"</code></td>
59
 
 * <td valign='top' rowspan='1' colspan='1'>content of 
60
 
 * the comment</td>
61
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
62
 
 * </tr>
63
 
 * <tr>
64
 
 * <td valign='top' rowspan='1' colspan='1'>Document</td>
65
 
 * <td valign='top' rowspan='1' colspan='1'><code>"#document"</code></td>
66
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
67
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
68
 
 * </tr>
69
 
 * <tr>
70
 
 * <td valign='top' rowspan='1' colspan='1'>DocumentFragment</td>
71
 
 * <td valign='top' rowspan='1' colspan='1'>
72
 
 * <code>"#document-fragment"</code></td>
73
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
74
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
75
 
 * </tr>
76
 
 * <tr>
77
 
 * <td valign='top' rowspan='1' colspan='1'>DocumentType</td>
78
 
 * <td valign='top' rowspan='1' colspan='1'>document type name</td>
79
 
 * <td valign='top' rowspan='1' colspan='1'>
80
 
 * null</td>
81
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
82
 
 * </tr>
83
 
 * <tr>
84
 
 * <td valign='top' rowspan='1' colspan='1'>Element</td>
85
 
 * <td valign='top' rowspan='1' colspan='1'>tag name</td>
86
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
87
 
 * <td valign='top' rowspan='1' colspan='1'>NamedNodeMap</td>
88
 
 * </tr>
89
 
 * <tr>
90
 
 * <td valign='top' rowspan='1' colspan='1'>Entity</td>
91
 
 * <td valign='top' rowspan='1' colspan='1'>entity name</td>
92
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
93
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
94
 
 * </tr>
95
 
 * <tr>
96
 
 * <td valign='top' rowspan='1' colspan='1'>
97
 
 * EntityReference</td>
98
 
 * <td valign='top' rowspan='1' colspan='1'>name of entity referenced</td>
99
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
100
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
101
 
 * </tr>
102
 
 * <tr>
103
 
 * <td valign='top' rowspan='1' colspan='1'>Notation</td>
104
 
 * <td valign='top' rowspan='1' colspan='1'>notation name</td>
105
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
106
 
 * <td valign='top' rowspan='1' colspan='1'>
107
 
 * null</td>
108
 
 * </tr>
109
 
 * <tr>
110
 
 * <td valign='top' rowspan='1' colspan='1'>ProcessingInstruction</td>
111
 
 * <td valign='top' rowspan='1' colspan='1'>target</td>
112
 
 * <td valign='top' rowspan='1' colspan='1'>entire content excluding the target</td>
113
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
114
 
 * </tr>
115
 
 * <tr>
116
 
 * <td valign='top' rowspan='1' colspan='1'>Text</td>
117
 
 * <td valign='top' rowspan='1' colspan='1'>
118
 
 * <code>"#text"</code></td>
119
 
 * <td valign='top' rowspan='1' colspan='1'>content of the text node</td>
120
 
 * <td valign='top' rowspan='1' colspan='1'>null</td>
121
 
 * </tr>
122
 
 * </table> 
123
 
 * <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>.
124
 
 */
125
 
public interface Node {
126
 
    // NodeType
127
 
    /**
128
 
     * The node is an <code>Element</code>.
129
 
     */
130
 
    public static final short ELEMENT_NODE              = 1;
131
 
    /**
132
 
     * The node is an <code>Attr</code>.
133
 
     */
134
 
    public static final short ATTRIBUTE_NODE            = 2;
135
 
    /**
136
 
     * The node is a <code>Text</code> node.
137
 
     */
138
 
    public static final short TEXT_NODE                 = 3;
139
 
    /**
140
 
     * The node is a <code>CDATASection</code>.
141
 
     */
142
 
    public static final short CDATA_SECTION_NODE        = 4;
143
 
    /**
144
 
     * The node is an <code>EntityReference</code>.
145
 
     */
146
 
    public static final short ENTITY_REFERENCE_NODE     = 5;
147
 
    /**
148
 
     * The node is an <code>Entity</code>.
149
 
     */
150
 
    public static final short ENTITY_NODE               = 6;
151
 
    /**
152
 
     * The node is a <code>ProcessingInstruction</code>.
153
 
     */
154
 
    public static final short PROCESSING_INSTRUCTION_NODE = 7;
155
 
    /**
156
 
     * The node is a <code>Comment</code>.
157
 
     */
158
 
    public static final short COMMENT_NODE              = 8;
159
 
    /**
160
 
     * The node is a <code>Document</code>.
161
 
     */
162
 
    public static final short DOCUMENT_NODE             = 9;
163
 
    /**
164
 
     * The node is a <code>DocumentType</code>.
165
 
     */
166
 
    public static final short DOCUMENT_TYPE_NODE        = 10;
167
 
    /**
168
 
     * The node is a <code>DocumentFragment</code>.
169
 
     */
170
 
    public static final short DOCUMENT_FRAGMENT_NODE    = 11;
171
 
    /**
172
 
     * The node is a <code>Notation</code>.
173
 
     */
174
 
    public static final short NOTATION_NODE             = 12;
175
 
 
176
 
    /**
177
 
     * The name of this node, depending on its type; see the table above.
178
 
     */
179
 
    public String getNodeName();
180
 
 
181
 
    /**
182
 
     * The value of this node, depending on its type; see the table above. 
183
 
     * When it is defined to be <code>null</code>, setting it has no effect.
184
 
     * @exception DOMException
185
 
     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
186
 
     * @exception DOMException
187
 
     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than 
188
 
     *   fit in a <code>DOMString</code> variable on the implementation 
189
 
     *   platform.
190
 
     */
191
 
    public String getNodeValue()
192
 
                                 throws DOMException;
193
 
    /**
194
 
     * The value of this node, depending on its type; see the table above. 
195
 
     * When it is defined to be <code>null</code>, setting it has no effect.
196
 
     * @exception DOMException
197
 
     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
198
 
     * @exception DOMException
199
 
     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than 
200
 
     *   fit in a <code>DOMString</code> variable on the implementation 
201
 
     *   platform.
202
 
     */
203
 
    public void setNodeValue(String nodeValue)
204
 
                                 throws DOMException;
205
 
 
206
 
    /**
207
 
     * A code representing the type of the underlying object, as defined above.
208
 
     */
209
 
    public short getNodeType();
210
 
 
211
 
    /**
212
 
     * The parent of this node. All nodes, except <code>Attr</code>, 
213
 
     * <code>Document</code>, <code>DocumentFragment</code>, 
214
 
     * <code>Entity</code>, and <code>Notation</code> may have a parent. 
215
 
     * However, if a node has just been created and not yet added to the 
216
 
     * tree, or if it has been removed from the tree, this is 
217
 
     * <code>null</code>.
218
 
     */
219
 
    public Node getParentNode();
220
 
 
221
 
    /**
222
 
     * A <code>NodeList</code> that contains all children of this node. If 
223
 
     * there are no children, this is a <code>NodeList</code> containing no 
224
 
     * nodes.
225
 
     */
226
 
    public NodeList getChildNodes();
227
 
 
228
 
    /**
229
 
     * The first child of this node. If there is no such node, this returns 
230
 
     * <code>null</code>.
231
 
     */
232
 
    public Node getFirstChild();
233
 
 
234
 
    /**
235
 
     * The last child of this node. If there is no such node, this returns 
236
 
     * <code>null</code>.
237
 
     */
238
 
    public Node getLastChild();
239
 
 
240
 
    /**
241
 
     * The node immediately preceding this node. If there is no such node, 
242
 
     * this returns <code>null</code>.
243
 
     */
244
 
    public Node getPreviousSibling();
245
 
 
246
 
    /**
247
 
     * The node immediately following this node. If there is no such node, 
248
 
     * this returns <code>null</code>.
249
 
     */
250
 
    public Node getNextSibling();
251
 
 
252
 
    /**
253
 
     * A <code>NamedNodeMap</code> containing the attributes of this node (if 
254
 
     * it is an <code>Element</code>) or <code>null</code> otherwise.
255
 
     */
256
 
    public NamedNodeMap getAttributes();
257
 
 
258
 
    /**
259
 
     * The <code>Document</code> object associated with this node. This is 
260
 
     * also the <code>Document</code> object used to create new nodes. When 
261
 
     * this node is a <code>Document</code> or a <code>DocumentType</code> 
262
 
     * which is not used with any <code>Document</code> yet, this is 
263
 
     * <code>null</code>.
264
 
     * @version DOM Level 2
265
 
     */
266
 
    public Document getOwnerDocument();
267
 
 
268
 
    /**
269
 
     * Inserts the node <code>newChild</code> before the existing child node 
270
 
     * <code>refChild</code>. If <code>refChild</code> is <code>null</code>, 
271
 
     * insert <code>newChild</code> at the end of the list of children.
272
 
     * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, 
273
 
     * all of its children are inserted, in the same order, before 
274
 
     * <code>refChild</code>. If the <code>newChild</code> is already in the 
275
 
     * tree, it is first removed.
276
 
     * @param newChild The node to insert.
277
 
     * @param refChild The reference node, i.e., the node before which the 
278
 
     *   new node must be inserted.
279
 
     * @return The node being inserted.
280
 
     * @exception DOMException
281
 
     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not 
282
 
     *   allow children of the type of the <code>newChild</code> node, or if 
283
 
     *   the node to insert is one of this node's ancestors or this node 
284
 
     *   itself.
285
 
     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
286
 
     *   from a different document than the one that created this node.
287
 
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or 
288
 
     *   if the parent of the node being inserted is readonly.
289
 
     *   <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of 
290
 
     *   this node.
291
 
     */
292
 
    public Node insertBefore(Node newChild, 
293
 
                             Node refChild)
294
 
                             throws DOMException;
295
 
 
296
 
    /**
297
 
     * Replaces the child node <code>oldChild</code> with <code>newChild</code>
298
 
     *  in the list of children, and returns the <code>oldChild</code> node.
299
 
     * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, 
300
 
     * <code>oldChild</code> is replaced by all of the 
301
 
     * <code>DocumentFragment</code> children, which are inserted in the 
302
 
     * same order. If the <code>newChild</code> is already in the tree, it 
303
 
     * is first removed.
304
 
     * @param newChild The new node to put in the child list.
305
 
     * @param oldChild The node being replaced in the list.
306
 
     * @return The node replaced.
307
 
     * @exception DOMException
308
 
     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not 
309
 
     *   allow children of the type of the <code>newChild</code> node, or if 
310
 
     *   the node to put in is one of this node's ancestors or this node 
311
 
     *   itself.
312
 
     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
313
 
     *   from a different document than the one that created this node.
314
 
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of 
315
 
     *   the new node is readonly.
316
 
     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of 
317
 
     *   this node.
318
 
     */
319
 
    public Node replaceChild(Node newChild, 
320
 
                             Node oldChild)
321
 
                             throws DOMException;
322
 
 
323
 
    /**
324
 
     * Removes the child node indicated by <code>oldChild</code> from the list 
325
 
     * of children, and returns it.
326
 
     * @param oldChild The node being removed.
327
 
     * @return The node removed.
328
 
     * @exception DOMException
329
 
     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
330
 
     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of 
331
 
     *   this node.
332
 
     */
333
 
    public Node removeChild(Node oldChild)
334
 
                            throws DOMException;
335
 
 
336
 
    /**
337
 
     * Adds the node <code>newChild</code> to the end of the list of children 
338
 
     * of this node. If the <code>newChild</code> is already in the tree, it 
339
 
     * is first removed.
340
 
     * @param newChild The node to add.If it is a 
341
 
     *   <code>DocumentFragment</code> object, the entire contents of the 
342
 
     *   document fragment are moved into the child list of this node
343
 
     * @return The node added.
344
 
     * @exception DOMException
345
 
     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not 
346
 
     *   allow children of the type of the <code>newChild</code> node, or if 
347
 
     *   the node to append is one of this node's ancestors or this node 
348
 
     *   itself.
349
 
     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
350
 
     *   from a different document than the one that created this node.
351
 
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or 
352
 
     *   if the previous parent of the node being inserted is readonly.
353
 
     */
354
 
    public Node appendChild(Node newChild)
355
 
                            throws DOMException;
356
 
 
357
 
    /**
358
 
     * Returns whether this node has any children.
359
 
     * @return <code>true</code> if this node has any children, 
360
 
     *   <code>false</code> otherwise.
361
 
     */
362
 
    public boolean hasChildNodes();
363
 
 
364
 
    /**
365
 
     * Returns a duplicate of this node, i.e., serves as a generic copy 
366
 
     * constructor for nodes. The duplicate node has no parent; (
367
 
     * <code>parentNode</code> is <code>null</code>.).
368
 
     * <br>Cloning an <code>Element</code> copies all attributes and their 
369
 
     * values, including those generated by the XML processor to represent 
370
 
     * defaulted attributes, but this method does not copy any text it 
371
 
     * contains unless it is a deep clone, since the text is contained in a 
372
 
     * child <code>Text</code> node. Cloning an <code>Attribute</code> 
373
 
     * directly, as opposed to be cloned as part of an <code>Element</code> 
374
 
     * cloning operation, returns a specified attribute (
375
 
     * <code>specified</code> is <code>true</code>). Cloning any other type 
376
 
     * of node simply returns a copy of this node.
377
 
     * <br>Note that cloning an immutable subtree results in a mutable copy, 
378
 
     * but the children of an <code>EntityReference</code> clone are readonly
379
 
     * . In addition, clones of unspecified <code>Attr</code> nodes are 
380
 
     * specified. And, cloning <code>Document</code>, 
381
 
     * <code>DocumentType</code>, <code>Entity</code>, and 
382
 
     * <code>Notation</code> nodes is implementation dependent.
383
 
     * @param deep If <code>true</code>, recursively clone the subtree under 
384
 
     *   the specified node; if <code>false</code>, clone only the node 
385
 
     *   itself (and its attributes, if it is an <code>Element</code>).
386
 
     * @return The duplicate node.
387
 
     */
388
 
    public Node cloneNode(boolean deep);
389
 
 
390
 
    /**
391
 
     * Puts all <code>Text</code> nodes in the full depth of the sub-tree 
392
 
     * underneath this <code>Node</code>, including attribute nodes, into a 
393
 
     * "normal" form where only structure (e.g., elements, comments, 
394
 
     * processing instructions, CDATA sections, and entity references) 
395
 
     * separates <code>Text</code> nodes, i.e., there are neither adjacent 
396
 
     * <code>Text</code> nodes nor empty <code>Text</code> nodes. This can 
397
 
     * be used to ensure that the DOM view of a document is the same as if 
398
 
     * it were saved and re-loaded, and is useful when operations (such as 
399
 
     * XPointer  lookups) that depend on a particular document tree 
400
 
     * structure are to be used.In cases where the document contains 
401
 
     * <code>CDATASections</code>, the normalize operation alone may not be 
402
 
     * sufficient, since XPointers do not differentiate between 
403
 
     * <code>Text</code> nodes and <code>CDATASection</code> nodes.
404
 
     * @version DOM Level 2
405
 
     */
406
 
    public void normalize();
407
 
 
408
 
    /**
409
 
     * Tests whether the DOM implementation implements a specific feature and 
410
 
     * that feature is supported by this node.
411
 
     * @param feature The name of the feature to test. This is the same name 
412
 
     *   which can be passed to the method <code>hasFeature</code> on 
413
 
     *   <code>DOMImplementation</code>.
414
 
     * @param version This is the version number of the feature to test. In 
415
 
     *   Level 2, version 1, this is the string "2.0". If the version is not 
416
 
     *   specified, supporting any version of the feature will cause the 
417
 
     *   method to return <code>true</code>.
418
 
     * @return Returns <code>true</code> if the specified feature is 
419
 
     *   supported on this node, <code>false</code> otherwise.
420
 
     * @since DOM Level 2
421
 
     */
422
 
    public boolean isSupported(String feature, 
423
 
                               String version);
424
 
 
425
 
    /**
426
 
     * The namespace URI of this node, or <code>null</code> if it is 
427
 
     * unspecified.
428
 
     * <br>This is not a computed value that is the result of a namespace 
429
 
     * lookup based on an examination of the namespace declarations in 
430
 
     * scope. It is merely the namespace URI given at creation time.
431
 
     * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 
432
 
     * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 
433
 
     * method, such as <code>createElement</code> from the 
434
 
     * <code>Document</code> interface, this is always <code>null</code>.Per 
435
 
     * the Namespaces in XML Specification  an attribute does not inherit 
436
 
     * its namespace from the element it is attached to. If an attribute is 
437
 
     * not explicitly given a namespace, it simply has no namespace.
438
 
     * @since DOM Level 2
439
 
     */
440
 
    public String getNamespaceURI();
441
 
 
442
 
    /**
443
 
     * The namespace prefix of this node, or <code>null</code> if it is 
444
 
     * unspecified.
445
 
     * <br>Note that setting this attribute, when permitted, changes the 
446
 
     * <code>nodeName</code> attribute, which holds the qualified name, as 
447
 
     * well as the <code>tagName</code> and <code>name</code> attributes of 
448
 
     * the <code>Element</code> and <code>Attr</code> interfaces, when 
449
 
     * applicable.
450
 
     * <br>Note also that changing the prefix of an attribute that is known to 
451
 
     * have a default value, does not make a new attribute with the default 
452
 
     * value and the original prefix appear, since the 
453
 
     * <code>namespaceURI</code> and <code>localName</code> do not change.
454
 
     * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 
455
 
     * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 
456
 
     * method, such as <code>createElement</code> from the 
457
 
     * <code>Document</code> interface, this is always <code>null</code>.
458
 
     * @exception DOMException
459
 
     *   INVALID_CHARACTER_ERR: Raised if the specified prefix contains an 
460
 
     *   illegal character, per the XML 1.0 specification .
461
 
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
462
 
     *   <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is 
463
 
     *   malformed per the Namespaces in XML specification, if the 
464
 
     *   <code>namespaceURI</code> of this node is <code>null</code>, if the 
465
 
     *   specified prefix is "xml" and the <code>namespaceURI</code> of this 
466
 
     *   node is different from "http://www.w3.org/XML/1998/namespace", if 
467
 
     *   this node is an attribute and the specified prefix is "xmlns" and 
468
 
     *   the <code>namespaceURI</code> of this node is different from "
469
 
     *   http://www.w3.org/2000/xmlns/", or if this node is an attribute and 
470
 
     *   the <code>qualifiedName</code> of this node is "xmlns" .
471
 
     * @since DOM Level 2
472
 
     */
473
 
    public String getPrefix();
474
 
    /**
475
 
     * The namespace prefix of this node, or <code>null</code> if it is 
476
 
     * unspecified.
477
 
     * <br>Note that setting this attribute, when permitted, changes the 
478
 
     * <code>nodeName</code> attribute, which holds the qualified name, as 
479
 
     * well as the <code>tagName</code> and <code>name</code> attributes of 
480
 
     * the <code>Element</code> and <code>Attr</code> interfaces, when 
481
 
     * applicable.
482
 
     * <br>Note also that changing the prefix of an attribute that is known to 
483
 
     * have a default value, does not make a new attribute with the default 
484
 
     * value and the original prefix appear, since the 
485
 
     * <code>namespaceURI</code> and <code>localName</code> do not change.
486
 
     * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 
487
 
     * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 
488
 
     * method, such as <code>createElement</code> from the 
489
 
     * <code>Document</code> interface, this is always <code>null</code>.
490
 
     * @exception DOMException
491
 
     *   INVALID_CHARACTER_ERR: Raised if the specified prefix contains an 
492
 
     *   illegal character, per the XML 1.0 specification .
493
 
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
494
 
     *   <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is 
495
 
     *   malformed per the Namespaces in XML specification, if the 
496
 
     *   <code>namespaceURI</code> of this node is <code>null</code>, if the 
497
 
     *   specified prefix is "xml" and the <code>namespaceURI</code> of this 
498
 
     *   node is different from "http://www.w3.org/XML/1998/namespace", if 
499
 
     *   this node is an attribute and the specified prefix is "xmlns" and 
500
 
     *   the <code>namespaceURI</code> of this node is different from "
501
 
     *   http://www.w3.org/2000/xmlns/", or if this node is an attribute and 
502
 
     *   the <code>qualifiedName</code> of this node is "xmlns" .
503
 
     * @since DOM Level 2
504
 
     */
505
 
    public void setPrefix(String prefix)
506
 
                               throws DOMException;
507
 
 
508
 
    /**
509
 
     * Returns the local part of the qualified name of this node.
510
 
     * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 
511
 
     * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 
512
 
     * method, such as <code>createElement</code> from the 
513
 
     * <code>Document</code> interface, this is always <code>null</code>.
514
 
     * @since DOM Level 2
515
 
     */
516
 
    public String getLocalName();
517
 
 
518
 
    /**
519
 
     * Returns whether this node (if it is an element) has any attributes.
520
 
     * @return <code>true</code> if this node has any attributes, 
521
 
     *   <code>false</code> otherwise.
522
 
     * @since DOM Level 2
523
 
     */
524
 
    public boolean hasAttributes();
525
 
 
526
 
}