public class HtmlTagUtil extends Object implements IHtmlEventHandlerAttributes
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_ALT |
static String |
ATTR_HREF |
static String |
ATTR_SRC |
static String |
ATTR_TITLE |
static String |
FLASH_CODEBASE |
static String |
FLASH_OBJECT |
static String |
FLASH_PLUGINSPAGE |
static String |
FLASH_TYPE |
ATTR_ONABORT, ATTR_ONBLUR, ATTR_ONCLICK, ATTR_ONDBLCLICK, ATTR_ONDRAGDROP, ATTR_ONERROR, ATTR_ONFOCUS, ATTR_ONKEYDOWN, ATTR_ONKEYPRESS, ATTR_ONKEYUP, ATTR_ONLOAD, ATTR_ONMOUSEDOWN, ATTR_ONMOUSEMOVE, ATTR_ONMOUSEOUT, ATTR_ONMOUSEOVER, ATTR_ONMOUSEUP, ATTR_ONMOVE, ATTR_ONRESIZE, ATTR_ONSELECT, ATTR_ONUNLOAD
Constructor and Description |
---|
HtmlTagUtil() |
Modifier and Type | Method and Description |
---|---|
static Node |
getAncestor(Node target,
String ancestorName)
Get ancestor node whose name is specified target name
|
static Set<String> |
getBlockElementSet()
Get tag names of block element in HTML
|
static List<Element> |
getImgElementsFromMap(Document target,
Element map) |
static String |
getNoScriptText(Node target)
Get noscript text of the
Node |
static String |
getTextAltDescendant(Node target)
Gather text and alternative text from descendant nodes and return it as
String.
|
static String |
getTextDescendant(Node target)
Gather text from descendant nodes and return it as String.
|
static boolean |
hasAncestor(Node target,
String ancestorName)
Check if target
Node has ancestor whose name is specified target
name. |
static boolean |
hasTextDescendant(Node target)
Check if target
Node has text descendant |
static boolean |
isBlankString(String str) |
static boolean |
isButtonControl(Element ctrl) |
static boolean |
isTextControl(Element ctrl) |
public static final String ATTR_HREF
public static final String ATTR_ALT
public static final String ATTR_SRC
public static final String ATTR_TITLE
public static final String FLASH_OBJECT
public static final String FLASH_CODEBASE
public static final String FLASH_TYPE
public static final String FLASH_PLUGINSPAGE
public static Set<String> getBlockElementSet()
public static boolean hasAncestor(Node target, String ancestorName)
Node
has ancestor whose name is specified target
name.public static Node getAncestor(Node target, String ancestorName)
public static String getNoScriptText(Node target)
Node
target
- target Node
public static String getTextAltDescendant(Node target)
target
- target Node
public static String getTextDescendant(Node target)
target
- target Node
public static boolean hasTextDescendant(Node target)
Node
has text descendantpublic static List<Element> getImgElementsFromMap(Document target, Element map)
public static boolean isTextControl(Element ctrl)
public static boolean isButtonControl(Element ctrl)
public static boolean isBlankString(String str)