I want to extract only the leaf nodes from an XML document (i.e., only elements that have no children). Has anyone written an xslt to do this?
SELECT="*[not(*)]"
Should give you anything without a child.
Using axes in XPath:
<xsl:apply-templates select="//you-node-spec[not(child::*)]" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With