String XmlDecode Example

Performing xml decoding on string data. Please note that the result of this sample is the same regardless the used decoding viper. The behavior is related to the fact that the render engine performs a xml decode step on the result.

Smartsite SXML CopyCode image Copy Code
<se:buffer name="data">
    &lt;b&gt;this text contains &apos; and &quot; quotes&lt;/b&gt;
</se:buffer>

Default xml decode: {string.xmldecode($data)}

Xml decode without quotes: {string.xmldecode($data, false)}

Custom xml decode: {string.xmldecode($data, 'ampersand,quotationmark')}
Example Result CopyCode image Copy Code
Default xml decode: 
    <b>this text contains ' and " quotes</b>


Xml decode without quotes: 
    <b>this text contains ' and " quotes</b>


Custom xml decode: 
    <b>this text contains ' and " quotes</b>
SXML