public final class

Element

extends Object
implements Serializable DTDConstants
java.lang.Object
   ↳ javax.swing.text.html.parser.Element

Class Overview

An element as described in a DTD using the ELEMENT construct. This is essentiall 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

Summary

[Expand]
Inherited Constants
From interface javax.swing.text.html.parser.DTDConstants
Fields
public AttributeList atts
public ContentModel content
public Object data A field to store user data.
public BitSet exclusions
public BitSet inclusions
public int index
public String name
public boolean oEnd
public boolean oStart
public int type
Public Methods
AttributeList getAttribute(String name)
Get an attribute by name.
AttributeList getAttributeByValue(String name)
Get an attribute by value.
AttributeList getAttributes()
Get the attributes.
ContentModel getContent()
Get content model
int getIndex()
Get index.
String getName()
Get the name of the element.
int getType()
Get type.
boolean isEmpty()
Check if empty
static int name2type(String nm)
boolean omitEnd()
Return true if the end tag can be omitted.
boolean omitStart()
Return true if the start tag can be omitted.
String toString()
Convert to a string.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public AttributeList atts

public ContentModel content

public Object data

A field to store user data. Mostly used to store style sheets.

public BitSet exclusions

public BitSet inclusions

public int index

public String name

public boolean oEnd

public boolean oStart

public int type

Public Methods

public AttributeList getAttribute (String name)

Get an attribute by name.

public AttributeList getAttributeByValue (String name)

Get an attribute by value.

public AttributeList getAttributes ()

Get the attributes.

public ContentModel getContent ()

Get content model

public int getIndex ()

Get index.

public String getName ()

Get the name of the element.

public int getType ()

Get type.

public boolean isEmpty ()

Check if empty

public static int name2type (String nm)

public boolean omitEnd ()

Return true if the end tag can be omitted.

public boolean omitStart ()

Return true if the start tag can be omitted.

public String toString ()

Convert to a string.

Returns
  • a string representation of the object.