As Martin said, you can use a stylesheet like the one below:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="A">
<Doc>
<xsl:call-template name="markNumbers">
<xsl:with-param name="value" select="normalize-space(.)"/>
</xsl:call-template>
</Doc>
</xsl:template>
<xsl:template name="markNumbers">
<xsl:param name="value" select="''"/>
<xsl:choose>
<xsl:when test="contains($value, ' ')">
<xsl:call-template name="markNumber">
<xsl:with-param name="value" select="substring-before($value,
' ')"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:call-template name="markNumbers">
<xsl:with-param name="value" select="substring-after($value,
' ')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="markNumber">
<xsl:with-param name="value" select="$value"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="markNumber">
<xsl:param name="value" select="''"/>
<xsl:choose>
<xsl:when test="translate($value, '0123456789', '')=''">
<num><xsl:value-of select="$value"/></num>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
It will give the following output when applied on your sample input:
<?xml version="1.0" encoding="UTF-8"?><Doc>Ankush <num>123</num>
Singhal <num>23</num> man</Doc>
Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com