I am trying to display the content of an XML on a page. I need to color two sections of that XML in a specific color but I have some troubles doing it. I'm using the following code:
<pre class="xmlPreviewTextArea">@XDocument.Parse(Model).ToString()</pre>
The content of the XML looks like that:
<myRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<header>
<code xsi:type="xsd:string">78161083705</code>
</header>
<ch>
<new_ch>
<ch_code xsi:type="xsd:string">8116478</ch_code>
<span style="color: orange;">
<ch_add_line_2 xsi:type="xsd:string">ryytyyrt</ch_add_line_2>
<ch_add_postcode xsi:type="xsd:string">15263</ch_add_postcode>
</span>
</new_ch>
</ch>
<card>
<crd_iss>
<ch_code xsi:type="xsd:string">6789177</ch_code>
<span style="color: orange;">
<fulfil_data_6 xsi:type="xsd:string">PROJECT</fulfil_data_6>
</span>
</crd_iss>
</card>
</myRequest>
The problem is that the two span tags are not interpreted and I'm not sure how to do it properly.
Thanks for your help!