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 | Copy Code |
---|---|
<se:buffer name="data"> <b>this text contains ' and " quotes</b> </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 | 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> |