Added xml processing code