To get element with the highest ID using XSL you can use the following snippet.
XML:
<rootnode>
<node>
<id>3</id>
</node>
<node>
<id>2</id>
</node>
<node>
<id>1</id>
</node>
<node>
<id>5</id>
</node>
<node>
<id>4</id>
</node>
</rootnode>
XSL:
<xsl:variable name="MaxNodeId"><xsl:value-of select="/rootnode/node[not(/rootnode/node/id > id)]/id"/></xsl:variable>
RT @CodeSnippetsNET: How to get element with the highest ID using #XSL http://t.co/j7RYFJ6g1n #xml #markup #stylesheets #stylesheet #progra…
RT @CodeSnippetsNET: How to get element with the highest ID using #XSL http://t.co/j7RYFJ6g1n #xml #markup #stylesheets #stylesheet #progra…
RT @CodeSnippetsNET: How to get element with the highest ID using #XSL http://t.co/j7RYFJ6g1n #xml #markup #stylesheets #stylesheet #progra…