Answers for "xsltproc: extrat xml attributes"

0

xsltproc: extrat xml attributes

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output omit-xml-declaration="no" indent="yes" method="text" />
  <xsl:strip-space elements="*" />

  <xsl:template match="user[@name][@email]">
    <xsl:value-of select="parent::*/@id" />
    <xsl:text> - </xsl:text>
    <xsl:value-of select="@name" />
    <xsl:text>
</xsl:text>
  </xsl:template>

</xsl:stylesheet>
Posted by: Guest on April-28-2021

Browse Popular Code Answers by Language