public class HCardElement extends Object
Element
object.Constructor and Description |
---|
HCardElement(org.jsoup.nodes.Element element)
Creates an hCard element.
|
Modifier and Type | Method and Description |
---|---|
String |
absUrl(String name)
Gets the absolute URL of an attribute that has a URL.
|
List<String> |
allValues(String cssClass)
Gets the hCard values of all descendant elements that have the given CSS
class name.
|
void |
append(String text)
Appends text to the element, replacing newlines with
<br> tags. |
String |
attr(String name)
Gets an attribute value.
|
Set<String> |
classNames()
Gets the element's CSS classes.
|
String |
firstValue(String cssClass)
Gets the hCard value of the first descendant element that has the given
CSS class name.
|
org.jsoup.nodes.Element |
getElement()
Gets the wrapped HTML element.
|
String |
tagName()
Gets the name of the HTML element.
|
List<String> |
types()
Gets all type values (for example, "home" and "cell" for the "tel" type).
|
String |
value()
Gets the hCard value of this element.
|
public HCardElement(org.jsoup.nodes.Element element)
element
- the HTML element to wrappublic String attr(String name)
name
- the attribute namepublic String absUrl(String name)
name
- the attribute namepublic Set<String> classNames()
public String value()
<abbr>
and contains a title
attribute, then the value of the title
attribute is returned.value
, then append together the text contents of
these elements.<br>
tags are converted to newlines. All text within
<del>
tags are ignored.public String firstValue(String cssClass)
cssClass
- the CSS class namepublic List<String> allValues(String cssClass)
cssClass
- the CSS class namepublic List<String> types()
public void append(String text)
<br>
tags.text
- the text to appendpublic org.jsoup.nodes.Element getElement()
Copyright © 2012–2023 Michael Angstadt. All rights reserved.