public class HTML extends Object
HTMLDocument
. These
are basically tag and attribute definitions.Modifier and Type | Class | Description |
---|---|---|
static class |
HTML.Attribute |
Typesafe enumeration representing an HTML
attribute.
|
static class |
HTML.Tag |
Typesafe enumeration for an HTML tag.
|
static class |
HTML.UnknownTag |
Modifier and Type | Field | Description |
---|---|---|
static String |
NULL_ATTRIBUTE_VALUE |
Constructor | Description |
---|---|
HTML() |
Modifier and Type | Method | Description |
---|---|---|
static HTML.Attribute[] |
getAllAttributeKeys() |
Returns the set of HTML attributes recognized.
|
static HTML.Tag[] |
getAllTags() |
Returns the set of actual HTML tags that
are recognized by the default HTML reader.
|
static HTML.Attribute |
getAttributeKey(String attName) |
Fetches an attribute constant for a well-known attribute name
(i.e.
|
static int |
getIntegerAttributeValue(AttributeSet attr,
HTML.Attribute key,
int def) |
Fetches an integer attribute value.
|
static HTML.Tag |
getTag(String tagName) |
Fetches a tag constant for a well-known tag name (i.e.
|
public static final String NULL_ATTRIBUTE_VALUE
public static HTML.Tag[] getAllTags()
public static HTML.Tag getTag(String tagName)
null
will be returned.tagName
- the String
name requestedtagName
,
or null
if not foundpublic static int getIntegerAttributeValue(AttributeSet attr, HTML.Attribute key, int def)
attr
- the set of attributes to use to try to fetch a valuekey
- the key to use to fetch the valuedef
- the default value to use if the attribute isn't
defined or there is an error converting to an integerpublic static HTML.Attribute[] getAllAttributeKeys()
public static HTML.Attribute getAttributeKey(String attName)
null
will be returned.attName
- the String
requestedAttribute
corresponding to attName
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.