Added Logic to XML Parser