Xslt - extract sheet nodes

I want to extract only leaf nodes from an XML document (i.e. only elements that have no children). Has anyone written xslt for this?

+5
source share
2 answers
SELECT="*[not(*)]"

Gotta give you something without a baby.

+5
source

Using axes in XPath:

<xsl:apply-templates select="//you-node-spec[not(child::*)]" />
+2
source

All Articles