Added new implementation for XML building.