How to turn off HTML5 validation rules in a Razor view that returns XML?

Hieroglyphics

New Member
In my MVC4 app I have a Razor view which returns some XML.In Visual Studio, all of the XML tags are highlighted as not being valid HTML5 markup.Ok, I could live with that - except the HTML5 validation is also not letting me use the \[code\]<source>\[/code\] element in my XML as I would like.It actually causes my view to throw an error, presumably because my use of the \[code\]<source>\[/code\] element is not valid in HTML5.How can I turn off the HTML5 validation in Razor, or tell it that my view is producing XML, not HTML?
 
Back
Top