org.dom4j
Enum NodeType

java.lang.Object
  extended by java.lang.Enum<NodeType>
      extended by org.dom4j.NodeType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<NodeType>

public enum NodeType
extends java.lang.Enum<NodeType>

Version:
$Revision$
Author:
Jirsák Filip

Enum Constant Summary
ANY_NODE
          Matches Element nodes
ATTRIBUTE_NODE
          Matches elements nodes
CDATA_SECTION_NODE
          Matches elements nodes
COMMENT_NODE
          Matches Comments nodes
DOCUMENT_FRAGMENT_NODE
           
DOCUMENT_NODE
          Matches Document nodes
DOCUMENT_TYPE_NODE
          Matches DocumentType nodes
ELEMENT_NODE
          Matches Element nodes
ENTITY_NODE
          Matches elements nodes
ENTITY_REFERENCE_NODE
          Matches elements nodes
NAMESPACE_NODE
          Matchs a Namespace Node - NOTE this differs from DOM
NOTATION_NODE
           
PROCESSING_INSTRUCTION_NODE
          Matches ProcessingInstruction
TEXT_NODE
          Matches elements nodes
UNKNOWN_NODE
          Does not match any valid node
 
Method Summary
static NodeType byCode(short code)
           
 short getCode()
          Return W3C DOM compliant node type code.
 java.lang.String getName()
           
static NodeType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static NodeType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ANY_NODE

public static final NodeType ANY_NODE
Matches Element nodes


ELEMENT_NODE

public static final NodeType ELEMENT_NODE
Matches Element nodes


ATTRIBUTE_NODE

public static final NodeType ATTRIBUTE_NODE
Matches elements nodes


TEXT_NODE

public static final NodeType TEXT_NODE
Matches elements nodes


CDATA_SECTION_NODE

public static final NodeType CDATA_SECTION_NODE
Matches elements nodes


ENTITY_REFERENCE_NODE

public static final NodeType ENTITY_REFERENCE_NODE
Matches elements nodes


ENTITY_NODE

public static final NodeType ENTITY_NODE
Matches elements nodes


PROCESSING_INSTRUCTION_NODE

public static final NodeType PROCESSING_INSTRUCTION_NODE
Matches ProcessingInstruction


COMMENT_NODE

public static final NodeType COMMENT_NODE
Matches Comments nodes


DOCUMENT_NODE

public static final NodeType DOCUMENT_NODE
Matches Document nodes


DOCUMENT_TYPE_NODE

public static final NodeType DOCUMENT_TYPE_NODE
Matches DocumentType nodes


DOCUMENT_FRAGMENT_NODE

public static final NodeType DOCUMENT_FRAGMENT_NODE

NOTATION_NODE

public static final NodeType NOTATION_NODE

NAMESPACE_NODE

public static final NodeType NAMESPACE_NODE
Matchs a Namespace Node - NOTE this differs from DOM


UNKNOWN_NODE

public static final NodeType UNKNOWN_NODE
Does not match any valid node

Method Detail

values

public static NodeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (NodeType c : NodeType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static NodeType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getCode

public short getCode()
Return W3C DOM compliant node type code.


getName

public java.lang.String getName()

byCode

public static NodeType byCode(short code)


Copyright © 2001-2008. All Rights Reserved.