Developer forum

Forum » Templates » Razor output html from xml file

Razor output html from xml file

Keld Lauge Gøtterup
Reply

i have a problem where i need to output an xml file

<header>overskrift</header>

<content>&lt;p&gt;this is text&lt;/p&gt;

but i cant seem to get content to output it as html. it writes the tags as it should in the code but it doesn't render as html.

how to make it into html


Replies

 
Nicolai Høeg Pedersen
Reply

Hi keld

Not sure I fully understand.

If you need to html encode the value of a tag you can use a tag extension method:

<content><!--@ Whatever.Tag.HtmlEncoded()--></content>

See http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/Tag-extensions.aspx

Nicolai

 

You must be logged in to post in the forum