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"}
sealed
| node | An instance of <xml-element>. |
| path | An instance of <string>. |
| found-node | An instance of <xml-element>, or #f if no matching XML element was found. |