Methods

Name Type Description
$fragment.asHref String

The 'href' attribute of the first <a> tag in this fragment or an empty string if there is none.

$fragment.asHtml String

The HTML code of this fragment.

$fragment.asImgSrc String

The 'src' attribute of the first <img> tag in this fragment or an empty string if there is none.

$fragment.asList List<HtmlFragment>

A list of fragments, one for each element in the list contained in this fragment, or an empty list if the fragment contains no list. Multiple or nested lists are not supported.

$fragment.asText String

Just the textual part of the fragment, without any markup.