import { getItemMetadata } from "@esri/arcgis-rest-portal" ; import { IHubRequestOptions } from "@esri/hub-common" ; import { parse } from "fast-xml-parser" ; function parseMetadataXml ( metadataXml ) { const opts = { ignoreAttributes : false , attributeNamePrefix : "@_" , textNodeName : "#value" } ; return parse ( metadataXml , opts ) ; } param id param requestOptions export function getContentMetadata ( id , requestOptions ? ) { return getItemMetadata ( id , requestOptions ) . then ( metadataXml => parseMetadataXml ( metadataXml ) ) ; }