0

I have to create XML files with complicated structure dynamically in .NET 4 windows service application. XML files are rather big though I have to update only small amount of tags or sections. I'd like to put XML template outside application with snippets that will insert values inside XML (like @razor engine for ASP.NET MVC Views)

<xml>
  <customer>@data.customer</customer>
  @foreach (var supplier in @data.suppliers) {
    <supplier>@supplier</supplier>
  }
  ...
</xml>

What is appropriate technology/library for that ?

user149691
  • 587
  • 1
  • 5
  • 19
  • Entering _"C# write file using template"_ in your favorite search engine must have pointed towards T4 templates to name something. What have you tried? – CodeCaster Apr 28 '15 at 13:57
  • @CodeCaster, it looks like T4 feature is coupled with MSVS. I have to generate XML files without MSVS. I am not going to use preprocessed template classes also. – user149691 Apr 28 '15 at 15:37

0 Answers0