attributeAt

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

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

Return

The attribute value at the specified path, or null if the path does not resolve to an attribute.

Parameters

pointer

The KPointer identifying the value to retrieve.


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

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

Return

The attribute value at the specified path, or null if the path does not resolve to an attribute.

Parameters

path

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

Throws

if path is not a valid pointer string.