updated XMLParser to allow to overwrite and write XML files