File: Data.xml
<?xml version="1.0"?>
<root ref="rootref" name="blue">
<node1>
<node2>
<node3>value</node3>
</node2>
</node1>
</root>
File: Transform.xslt
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates select="root/node1/node2/node3" />
</xsl:template>
<xsl:template match="node3">
<xsl:value-of select="." />
</xsl:template>
</xsl:stylesheet>
Output:
<?xml version="1.0" encoding="UTF-8"?>value
|