By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,192 Members | 1,830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,192 IT Pros & Developers. It's quick & easy.

How to replace "<" or ">" in xsl stylesheet?

P: 7
I am getting xml string in request attribute in following format
&lt;files&gt;
&lt;file&gt;
&lt;filename&gt;somefile.ext&lt;/filename&gt;
&lt;/file&gt;
&lt;files&gt;
the above string I want to convert to tags.
expected output after xsl transformation -
<files>
<file>
<filename>somefile.ext</filename>
</file>
<files>
Apr 1 '10 #1

✓ answered by jkmyoung

dangerous method: use disable-output-escaping
<xsl:value-of select="expression" disable-output-escaping="yes"/>

If the input string is not well-formed the output will not be either.

Share this Question
Share on Google+
2 Replies


jkmyoung
Expert 100+
P: 2,057
dangerous method: use disable-output-escaping
<xsl:value-of select="expression" disable-output-escaping="yes"/>

If the input string is not well-formed the output will not be either.
Apr 1 '10 #2

P: 7
thanks for immediate response
solution suggested working fine.
Apr 1 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.