php fil eto construct and keep xml metadata file