asp.net - XSLT. load xml document that contains escape characters -
I use XSLT to replace an XML document that I then load on the ASP.NET website. However, if the ' & lt;
', the XML goes wrong.
& lt; Title & gt; & Lt; B & gt; & Lt; Left arrow & lt; B & gt; & Lt; / Title & gt;
If I use disable-output-escaping = "yes"
, then the XML can not be loaded and error is not with "name" "Characters".
If I do not disable the escape to escape characters, then it is disregarded and this text appears as:
& lt; title & gt; & lt; b & gt; & lt; left arrow & lt; b & gt; & lt; / title & gt;
Need to have bold tags to work, but I do not want to use '& lt;' I want to avoid the character.
& lt; b & gt; & lt; left arrow & lt; / b & gt;
< P> What do I want to achieve? What is the solution for this?
Sign in to XML ( & Amp;; LT;), not literal & lt; character. XML is bad and any XML parser should reject it. In XSLT, you can generate that sequence like this:
& lt; xsl: text & gt; & amp; amp; lt; & lt; xsl: text & gt;
Comments
Post a Comment