function convertXMLMetadata(oJSON) {
						var Converter = sODataVersion === "4.0" || bAnnotations
								? _V4MetadataConverter
								: _V2MetadataConverter,
							oData = oJSON.$XML,
							bIgnoreAnnotations = bIgnoreAnnotationsFromMetadata && !bAnnotations;

						delete oJSON.$XML; // be nice to the garbage collector
						return Object.assign(
							new Converter().convertXMLMetadata(oData, sUrl, bIgnoreAnnotations),
							oJSON);
					}
Reads a metadata document from the given URL, taking care of "Retry-After".

@param {string} sUrl
  The URL of a metadata document, it must not contain a query string or a
  fragment part
@param {boolean} [bAnnotations]
  <code>true</code> if an additional annotation file is read, otherwise it is
  expected to be a metadata document in the correct OData version
@param {boolean} [bPrefetch]
  Whether to just read the metadata document, but not yet convert it from XML to
  JSON. For any given URL, this is useful in an optional early call that precedes
  a normal call without this flag.
@returns {Promise}
  A promise fulfilled with the metadata as a JSON object, enriched with a
  <code>$Date</code>, <code>$ETag</code> or <code>$LastModified</code> property
  that contains the value of the response header "Date", "ETag" or
  "Last-Modified" respectively; these additional properties are missing if there
  is no such header. In case of <code>bPrefetch</code>, the JSON object is
  empty except for <code>$XML</code> (which contains the unconverted metadata as
  XML) and the additional properties described before.
@throws {Error}
  If <code>bPrefetch</code> is set in two consecutive calls for the same URL