select-single-node

Returns the first XML element matching a path.  This function calls select-nodes with node and path and returns the first element found.  See select-nodes for more about path.

<population>
<pack id="1">
<name>Scar</name>
<name>Notch</name>
</pack>
<pack id="2">
<leader>Rex</leader>
<name>Spotty</name>
</pack>
</population>

Given the above example document, select-single-node behaves as follows.

select-nodes(rootNode, "pack/name")
⇒ {name "Scar"}

Exported from

Modifiers

sealed

Arguments

nodeAn instance of <xml-element>.
pathAn instance of <string>.

Values

found-nodeAn instance of <xml-element>, or #f if no matching XML element was found.
Returns nodes matching a path.
Returns the first XML element matching a path.
The simple-xml module provides basic XML parsing and navigation.
A class representing an XML element.
The class of sequences with elements that are characters.