I want to create a razor XML view and render it. For exmaple:
@model SomeMessageClass
<?xml version="1.0"?>
<root>
<message>
<subject>@Model.Subject</subject>
<to>@Model.To</to>
<from>@Model.From</from>
<body>@Model.Subject</body>
</message>
</root>
How can I do this? Should I just use a cshtml file?
My end goal is to create an excel file dynamically using xml and razor. Then stream that file as a download to the user.