JavaScript is disabled on your browser.
All Implemented Interfaces:
Serializable
, DTDConstants
public final class Element
extends Object
implements DTDConstants , Serializable
An element as described in a DTD using the ELEMENT construct.
This is essential the description of a tag. It describes the
type, content model, attributes, attribute types etc. It is used
to correctly parse a document by the Parser.
See Also:
DTD
,
AttributeList
Field Summary
Fields declared in interface javax.swing.text.html.parser.DTDConstants
ANY , CDATA , CONREF , CURRENT , DEFAULT , EMPTY , ENDTAG , ENTITIES , ENTITY , FIXED , GENERAL , ID , IDREF , IDREFS , IMPLIED , MD , MODEL , MS , NAME , NAMES , NMTOKEN , NMTOKENS , NOTATION , NUMBER , NUMBERS , NUTOKEN , NUTOKENS , PARAMETER , PI , PUBLIC , RCDATA , REQUIRED , SDATA , STARTTAG , SYSTEM
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Field Detail
index
public int index
The element index
name
public String name
The name of the element
type
public int type
The element type
Method Detail
getType
public int getType()
Get type.
Returns:
the type of the element
getIndex
public int getIndex()
Get index.
Returns:
the element index
isEmpty
public boolean isEmpty()
Check if empty
Returns:
true if the current element is empty
toString
public String toString()
Convert to a string.
Overrides:
toString
in class Object
Returns:
a string representation for the given Element
instance
name2type
public static int name2type(String nm)
Converts nm
to type. Returns appropriate DTDConstants
if the nm
is equal to CDATA, RCDATA, EMPTY or ANY, 0 otherwise.
Parameters:
nm
- a name
Returns:
appropriate DTDConstants if the nm
is equal to
CDATA, RCDATA, EMPTY or ANY, 0 otherwise.
Report a bug or suggest an enhancement For further API reference and developer documentation see the Java SE Documentation , which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries. Copyright © 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA. All rights reserved. Use is subject to license terms and the documentation redistribution policy .
Scripting on this page tracks web page traffic, but does not change the content in any way.