elementAt

fun Element.elementAt(pointer: KPointer): KpaElement?(source)

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

The root pointer returns this element as a KsoupElementAdapter.

Return

The KpaElement at the specified path, or null if a key along the path is absent.

Parameters

pointer

The KPointer identifying the value to retrieve.

Throws

if an intermediate segment lands on a primitive.


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

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

Return

The KpaElement at the specified path, or null if absent.

Parameters

path

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

Throws

if path is not a valid pointer string.