Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

< > in XMl to be parsed using XSLT and applying a template to it.

$
0
0

Hi,

The below is the XML that i will get as an input What i want to do is I want to apply an template to c0 which will bold the value present in c0 tag.

I have written the template to do it but its not applying the template as it is not  < of > rather its&lt; that is getting returned.

If i debug and see the variable contains the <c0> tags but they are not accessible as nodes i guess that might be the reason its not getting applied.

XML:

 <myprop>&amp;lt;p&amp;gt;My name &lt;c0&gt;change&lt;/c0&gt; in records after&lt;ddd/&gt;the experiment&lt;c0&gt;changes&lt;/c0&gt; the phase of life&lt;ddd/&gt;</myprop>

If i do disable-output-escaping="yes" 

<xsl:variable name="lt">
    <xsl:value-of disable-output-escaping="yes" select="myprop"></xsl:value-of>
              </xsl:variable>
              <xsl:value-of select="$lt"/>

output:

<myprop>

<p>&amp;lt;p&amp;gt;My name &lt;c0&gt;change&lt;/c0&gt; in records after&lt;ddd/&gt;the experiment&lt;c0&gt;changes&lt;/c0&gt; the phase of life&lt;ddd/&gt;</p>

</myprop>

Can anyone help in this regard.

I want to bold the values present in c0 tag.

Regards,

Altaf.


ALtaf Ali


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>