mario: Vertauschen von XML Tags mit XSLT

Beitrag lesen

Okay, ich habs gerade selbst rausgefunden. trotzdem danke!

  
<?xml version="1.0" encoding="ISO-8859-1"?>  
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  
  <xsl:template match="node()|@*">  
 <xsl:copy>  
           <xsl:apply-templates select="node()|@*"/>  
        </xsl:copy>  
  </xsl:template>  
  
  <xsl:template match="//*[@id='P']"><xsl:copy-of select="//*[@id='R']"/></xsl:template>  
  <xsl:template match="//*[@id='R']"><xsl:copy-of select="//*[@id='P']"/></xsl:template>  
</xsl:stylesheet>