XSLT, , .
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="iso-8859-1" indent="yes" omit-xml-declaration="no"/>
<xsl:template match="file">
<xsl:copy>
<xsl:apply-templates select="row[(position()>=3 and position()<=5) or (position()>=7 and position()<=8)]" />
</xsl:copy>
</xsl:template>
<xsl:template match="row">
<xsl:copy>
<xsl:apply-templates select="cell[position()=1 or position()=3]" />
</xsl:copy>
</xsl:template>
<xsl:template match="cell">
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>
, , , , .
, XSLT, DOM XML . , , :
<row keep="-1">
<cell>Jim</cell>
<cell>Smith</cell>
<cell>34</cell>
</row>
<row>
<cell>Roy</cell>
<cell>Rogers</cell>
<cell>22</cell>
</row>
XSLT :
<xsl:apply-templates select="row[@keep=-1]" />