These are the strings that will be displayed in the JTree. The specification of these nodes types can be found in the Document Object Model (DOM) Level 2 Core Specification, under the specification for Node.
| Node | nodeName() | nodeValue() | attributes | nodeType() |
|---|---|---|---|---|
| Attr | name of attribute | value of attribute | null |
2
|
| CDATASection | #cdata-section | content of the CDATA Section |
null |
4
|
| Comment | #comment | content of the comment | null |
8
|
| Document | #document | null | null |
9
|
| DocumentFragment | #document-fragment | null | null |
11
|
| DocumentType | document type name | null | null |
10
|
| Element | tag name | null | NamedNodeMap |
1
|
| Entity | entity name | null | null |
6
|
| EntityReference | name of entity referenced | null | null |
5
|
| Notation | notation name | null | null |
12
|
| ProcessingInstruction | target | entire content excluding the target |
null |
7
|
| Text | #text | content of the text node | null |
3
|
Suggestion:
Print this table and keep it handy. You need it when working with the DOM, because
all of these types are intermixed in a DOM tree. So your code is forever asking,
"Is this the kind of node I'm interested in?".