ownTextAt

fun Element.ownTextAt(pointer: KPointer): String?(source)

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

Return

The element's own text (direct text nodes only), or null.

Parameters

pointer

The KPointer identifying the element.


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

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

Return

The element's own text (direct text nodes only), or null.

Parameters

path

A pointer string (RFC 6901, fragment, or dot-notation, dispatched by prefix).

Throws

if path is not a valid pointer string.