Package-level declarations

Types

Link copied to clipboard
class KsoupAttributeAdapter(val backing: Attribute) : StringKpaPrimitive

Adapter exposing a KSoup Attribute as a string-only com.commonsware.kpointer.adapter.KpaPrimitive.

Link copied to clipboard
class KsoupElementAdapter(val backing: Element) : KpaStruct

Adapter exposing a KSoup Element as a KpaStruct.

Link copied to clipboard
class KsoupElementListAdapter(val backing: List<Element>) : AbstractKpaList<Element>

Adapter exposing a group of KSoup Elements that share a tag name as a KpaList.

Link copied to clipboard

Adapter exposing a string derived from a KSoup Element — for example the result of ownText(), text(), wholeText(), wholeOwnText(), or html() — as a string-only com.commonsware.kpointer.adapter.KpaPrimitive.

Functions

Link copied to clipboard

Wraps this KSoup Element (including a KSoup Document) as a KsoupElementAdapter.

Link copied to clipboard
fun Element.attributeAt(pointer: KPointer): String?

Returns the native attribute value at pointer when the path resolves to an attribute, or null otherwise.

fun Element.attributeAt(path: String): String?

Parses path via KPointer.from and returns the native attribute value at that path, or null.

Link copied to clipboard
operator fun Element.contains(pointer: KPointer): Boolean

Returns whether the path identified by pointer resolves to a value within this element.

Link copied to clipboard
fun Element.elementAt(pointer: KPointer): KpaElement?

Returns the KpaElement at the path identified by pointer, or null if a key along the path is absent.

fun Element.elementAt(path: String): KpaElement?

Parses path via KPointer.from and returns the KpaElement at that path, or null if absent.

Link copied to clipboard
fun Element.elementNodeAt(pointer: KPointer): Element?

Returns the native KSoup Element at pointer when the path resolves to a single element, or null otherwise.

fun Element.elementNodeAt(path: String): Element?

Parses path via KPointer.from and returns the native KSoup Element at that path, or null.

Link copied to clipboard
fun Element.htmlAt(pointer: KPointer): String?

Returns the inner html() of the single element at pointer, or null if the path does not resolve to a single element.

fun Element.htmlAt(path: String): String?

Parses path via KPointer.from and returns the inner html() of the single element at that path, or null.

Link copied to clipboard
fun Element.listAt(pointer: KPointer): KpaList?

Returns the KpaList at pointer, or null if the path is absent.

fun Element.listAt(path: String): KpaList?

Parses path via KPointer.from and returns the KpaList at that path, or null if absent.

Link copied to clipboard
fun Element.outerHtmlAt(pointer: KPointer): String?

Returns the outerHtml() of the single element at pointer, or null if the path does not resolve to a single element.

fun Element.outerHtmlAt(path: String): String?

Parses path via KPointer.from and returns the outerHtml() of the single element at that path, or null.

Link copied to clipboard
fun Element.ownTextAt(pointer: KPointer): String?

Returns the ownText() of the single element at pointer, or null if the path does not resolve to a single element.

fun Element.ownTextAt(path: String): String?

Parses path via KPointer.from and returns the ownText() of the single element at that path, or null.

Link copied to clipboard
fun Element.primitiveAt(pointer: KPointer): KpaPrimitive?

Returns the KpaPrimitive at pointer, or null if the path is absent.

fun Element.primitiveAt(path: String): KpaPrimitive?

Parses path via KPointer.from and returns the KpaPrimitive at that path, or null if absent.

Link copied to clipboard
fun Element.structAt(pointer: KPointer): KpaStruct?

Returns the KpaStruct at pointer, or null if the path is absent.

fun Element.structAt(path: String): KpaStruct?

Parses path via KPointer.from and returns the KpaStruct at that path, or null if absent.

Link copied to clipboard
fun Element.textAt(pointer: KPointer): String?

Returns the normalized text() of the single element at pointer, or null if the path does not resolve to a single element.

fun Element.textAt(path: String): String?

Parses path via KPointer.from and returns the normalized text() of the single element at that path, or null.

Link copied to clipboard
fun Element.wholeOwnTextAt(pointer: KPointer): String?

Returns the wholeOwnText() of the single element at pointer, or null if the path does not resolve to a single element.

fun Element.wholeOwnTextAt(path: String): String?

Parses path via KPointer.from and returns the wholeOwnText() of the single element at that path, or null.

Link copied to clipboard
fun Element.wholeTextAt(pointer: KPointer): String?

Returns the wholeText() of the single element at pointer, or null if the path does not resolve to a single element.

fun Element.wholeTextAt(path: String): String?

Parses path via KPointer.from and returns the wholeText() of the single element at that path, or null.