org.tinygroup.xmlparser
Enum XmlNodeType

java.lang.Object
  extended by java.lang.Enum<XmlNodeType>
      extended by org.tinygroup.xmlparser.XmlNodeType
All Implemented Interfaces:
Serializable, Comparable<XmlNodeType>, NodeType

public enum XmlNodeType
extends Enum<XmlNodeType>
implements NodeType


Enum Constant Summary
CDATA
           
COMMENT
           
DOCTYPE
           
ELEMENT
           
PROCESSING_INSTRUCTION
           
TEXT
           
XML_DECLARATION
           
 
Method Summary
 NodeSign getHead()
          获取头标签
 void getHeader(StringBuffer sb, String str)
          获取头标签的标识 符 为输入参数添加头标签
 NodeSign getTail()
          获取结尾标签
 void getTail(StringBuffer sb, String str)
          获取结尾标签的标识符 为输入参数添加结束标签
 boolean isHasBody()
           
 boolean isHasContent()
           
 boolean isHasHeader()
           
 boolean isText()
           
static XmlNodeType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static XmlNodeType[] 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

DOCTYPE

public static final XmlNodeType DOCTYPE

CDATA

public static final XmlNodeType CDATA

XML_DECLARATION

public static final XmlNodeType XML_DECLARATION

PROCESSING_INSTRUCTION

public static final XmlNodeType PROCESSING_INSTRUCTION

COMMENT

public static final XmlNodeType COMMENT

ELEMENT

public static final XmlNodeType ELEMENT

TEXT

public static final XmlNodeType TEXT
Method Detail

values

public static XmlNodeType[] 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 (XmlNodeType c : XmlNodeType.values())
    System.out.println(c);

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

valueOf

public static XmlNodeType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isHasHeader

public boolean isHasHeader()
Specified by:
isHasHeader in interface NodeType

isHasBody

public boolean isHasBody()
Specified by:
isHasBody in interface NodeType

isHasContent

public boolean isHasContent()
Specified by:
isHasContent in interface NodeType

getHead

public NodeSign getHead()
获取头标签

Specified by:
getHead in interface NodeType
Returns:
NodeSign

getTail

public NodeSign getTail()
获取结尾标签

Specified by:
getTail in interface NodeType
Returns:
NodeSign

getHeader

public void getHeader(StringBuffer sb,
                      String str)
获取头标签的标识 符 为输入参数添加头标签

Specified by:
getHeader in interface NodeType
Parameters:
str -

getTail

public void getTail(StringBuffer sb,
                    String str)
获取结尾标签的标识符 为输入参数添加结束标签

Specified by:
getTail in interface NodeType
Parameters:
str -

isText

public boolean isText()
Specified by:
isText in interface NodeType


Copyright © 2006–2015 TinyGroup. All rights reserved.