XML transforms, SlowCheetah

I had been working with web applications with the web.config transform. Which is a great feature for the builds automation and deployments.

But it is lack of the support for other config files, such as app.config for windows service projects or console applications. Or maybe an xml configuration file in your project.

After I read the Hanslmen’s blog, I found this little plugin in for Visual Studio called “SlowCheetah”. It enables you to create transforms for any configuration files. How great is that!

Download the plugin and restart your VS.

You will see the “Add Transform” option once you right click the configuration file.


To read this Microsoft dude’s blog,


Enjoy the little time saver plugin.

Mr. Data Converter, converting csv to other formatted strings

This is a pretty cool JS plugin to convert csv formatted string to other formats.

It supports XML – Properties, XML – Nodes, JSON – Properties, JSON – Column arrays, JSON – Row arrays, Html tables, and others.

I found it very helpful for xml, JSON and html formats.

for example, a csv string as below,

ProviderName, ProviderID, OrganizationName

The converted JSON – properties looks like,

[{"ProviderName":"Microsoft"," ProviderID":"jamcracker"," OrganizationName":"Telstra"}]

The converted JSON – Column array looks like,

  " ProviderID":["jamcracker"],
  " OrganizationName":["Telstra"]

The converted JSON – Row array looks like,


The converted XML – Properties look like,

<?xml version="1.0" encoding="UTF-8"?>
  <row ProviderName="Microsoft"  ProviderID="jamcracker"  OrganizationName="Telstra" ></row>

The converted XML – Nodes look like,

<?xml version="1.0" encoding="UTF-8"?>
    < ProviderID>jamcracker</ ProviderID>
    < OrganizationName>Telstra</ OrganizationName>

The converted Html tables look like,

      <th class="ProviderName-cell">ProviderName</th>
      <th class=" ProviderID-cell"> ProviderID</th>
      <th class=" OrganizationName-cell"> OrganizationName</th>
    <tr class="lastRow">
      <td class="ProviderName-cell">Microsoft</td>
      <td class=" ProviderID-cell">jamcracker</td>
      <td class=" OrganizationName-cell">Telstra</td>

So cool, isn’t it. Save tons of time for my development.

It is from the website, http://www.shancarter.com/data_converter/index.html

And to download from Github, https://github.com/shancarter/Mr-Data-Converter

Make use of XmlSerializer

I have a list of “Order” objects. And output a xml, here is what I did by using a XmlSerializer.

using (var memoryStream = new MemoryStream())
                using (TextWriter streamWriter = new StreamWriter(memoryStream))
                    System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(orders.GetType());
                    x.Serialize(streamWriter, orders);
                    return File(memoryStream.ToArray(),"xml/text");