public class HTML extends Object
HTMLDocument 。
这些基本上是标签和属性定义。
| Modifier and Type | Class and Description |
|---|---|
static class |
HTML.Attribute
表示HTML属性的Typesafe枚举。
|
static class |
HTML.Tag
HTML标签的类型安全枚举。
|
static class |
HTML.UnknownTag |
| Modifier and Type | Field and Description |
|---|---|
static String |
NULL_ATTRIBUTE_VALUE |
| Constructor and Description |
|---|
HTML() |
| Modifier and Type | Method and Description |
|---|---|
static HTML.Attribute[] |
getAllAttributeKeys()
返回识别的HTML属性集。
|
static HTML.Tag[] |
getAllTags()
返回由默认HTML阅读器识别的一组实际的HTML标签。
|
static HTML.Attribute |
getAttributeKey(String attName)
获取一个众所周知的属性名称的属性常量(即
|
static int |
getIntegerAttributeValue(AttributeSet attr, HTML.Attribute key, int def)
获取整数属性值。
|
static HTML.Tag |
getTag(String tagName)
获取一个公知的标签名称的标签常量(即
|
public static final String NULL_ATTRIBUTE_VALUE
public static HTML.Tag[] getAllTags()
public static HTML.Tag getTag(String tagName)
null 。
tagName - 要求的
String名称
tagName的标签常量,或
null如果没有找到
public static int getIntegerAttributeValue(AttributeSet attr, HTML.Attribute key, int def)
attr - 用于尝试获取值的一组属性
key - 用于获取值的关键
def - 如果未定义属性或转换为整数时出现错误,则使用的默认值
public static HTML.Attribute[] getAllAttributeKeys()
public static HTML.Attribute getAttributeKey(String attName)
null 。
attName -
String String
Attribute对应
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, 2014, Oracle and/or its affiliates. All rights reserved.