functx:distinct-element-names
The distinct names of all elements in an XML fragment
Description
The functx:distinct-element-names function returns the distinct set of element names that exist in $nodes or among the descendants of $nodes.
Parameters |
Description |
---|---|
nodes:node() |
the root(s) to start from |
Examples
XPath |
Results |
---|---|
functx:distinct-element-names($in-xml) |
(‘authors’, ‘author’, ‘fName’, ‘lName’) |
functx:distinct-element-names($in-xml/author[1]) |
(‘author’, ‘fName’, ‘lName’) |