You can test it like using the not(expr) function:
Sample XSLT:
======================================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:if test="not(/*/*)">not any children node here</xsl:if>
<xsl:if test="(/*/*)">there is at least a child node</xsl:if>
</xsl:template>
</xsl:stylesheet>
======================================
transform it with either:
<doc/>
either:
<doc><child>hello world</child></doc>
so you see the differents output.
Hope this help.
Gauthier Segay
C# newbie wrote:
Hi,
how could I find out a node has childern or no using xpath ?
Thanks