Update New xml code display

This file will be used to get the display of the xml code in some ordered fashion, using indentation etc. so that it is readable.

Apart from that, I used exceptions to implement this.