finalized XML loading and printing