> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Concatenating Prefix to Selected XML Elements

> You can add prefix to values of selected XML elements using XSLT. You can add prefix (prefix) to the beginning of text values of specific XML elements.

## Sample Input Value

```xml theme={null}
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header/>
  <soapenv:Body>
    <Pay> 100 </Pay>
    <Payda> 50 </Payda>
  </soapenv:Body>
</soapenv:Envelope>
```

## XSLT Transformation Code

```xml theme={null}
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:strip-space elements="*"/>
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="//*[local-name()='Pay']/text()">
    <xsl:value-of select="concat('Prefix', .)"/>
  </xsl:template>
  <xsl:template match="//*[local-name()='Payda']/text()">
    <xsl:value-of select="concat('Prefix',.)"/>
  </xsl:template>
</xsl:stylesheet>
```

## Sample Output Value

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header/>
  <soapenv:Body>
    <Pay>Prefix 100 </Pay>
    <Payda>Prefix 50 </Payda>
  </soapenv:Body>
</soapenv:Envelope>
```
