Skip to content

rife.render.EncodeXml

Erik C. Thauvin edited this page Mar 28, 2023 · 2 revisions

Encodes a template value to XML.

Usage

<!--v render:rife.render.EncodeXml:valueId/-->
{{v render:rife.render.EncodeXml:valueId/}}

Sample

Template

<text><!--v render:rife.render.EncodeXml:text/--></text>

Code

template.setAttribute("text", "There are > 5 & < 10 in the basket.");

Output

<text>There are &gt; 5 &amp; &lt; 10 in the basket</text>