xml_node->extract

Extracts nodes with XPath.

Target member

Signature

1xml_node->extract(xpath::string)

Extracts nodes with XPath.

xml_node->extract is called with member syntax on a receiver value. xml_node->extract works with structured document or media data. Keep parsing, transformation, and output steps separate enough that each step can be checked on its own.

Parameters

xpath
Required value of type string. Supply xpath positionally unless the signature shows a keyword form.

Examples

Basic call

1xml('<root><a/></root>')->extract('//a')
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.