Added option for getting formatted xml