Added resource addition to XML creation