Fixed XML loading and parsing