outerHtmlAt

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

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

Unlike htmlAt, which returns only the element's inner markup, this includes the element's own opening and closing tags.

Return

The element's serialized outer markup, or null.

Parameters

pointer

The KPointer identifying the element.


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

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

Return

The element's serialized outer markup, 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.