Check: XPATH: select subset of xml file
You should write an xsl to avoid this problem like this:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="PLANT[position() <=2]" />
<!--identity template to copy all nodes and attributes to output -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>