string requiredThe XML or HTML markup to search. Usually a remote page or feed loaded with the include command, but any literal XML or HTML string works. If empty, the command returns an empty string.
query requiredThe XPath query that selects the nodes to return, for example //title, //book[2], or //book[@id=b2]/author. A colon inside the query (such as an axis like following-sibling::) must be escaped as hash-colon so it is not read as a parameter separator. If empty, the command returns an empty string.
attr optionalWhat to return from each matching node. Empty (the default) returns the node text value. An attribute name (for example id or width) returns that attribute. The literal value XML returns the matched node as inner markup.
delimiter optional default (first match only)By default only the first matching node is returned. Supply a delimiter to return all matches joined by it. The delimiter is appended after every match, including the last, so a trailing delimiter remains. Leading and trailing spaces in the delimiter are preserved.
{xpath:<books><book>Dune</book><book>Solaris</book></books>://book}
{xpath:<row><label>Date</label><value>2026</value></row>:/row/label/following-sibling#:#:value}
{xpath:<rss><channel><item><title>First post</title></item><item><title>Second post</title></item></channel></rss>://item/title}
{xpath:<books><book>Dune</book><book>Solaris</book></books>://book::|}
[{xpath:<books><book>Dune</book></books>://magazine}]
{xpath:<ul><li>Apple</li><li>Pear</li><li>Plum</li></ul>://li[2]}
{xpath:<books><book id="b2">Solaris</book></books>://book:id}
{xpath:<books><book>Dune</book><book>Solaris</book></books>://book[2]}