public List < StorageAccount > createStorageAccountsFromXml ( InputStream xml ) { try { SAXBuilder builder = new SAXBuilder ( ) ; Document doc = builder . build ( xml ) ; Element root = doc . getRootElement ( ) ; return createStorageAccountsFrom ( root ) ; } catch ( Exception e ) { String error = "Could not build storage accounts from xml " + "due to: " + e . getMessage ( ) ; throw new DuraCloudRuntimeException ( error , e ) ; } }
Creates storage accounts listing from XML which includes only the storage accounts list ( not the full DuraStore config . This is used to parse the response of the GET stores DuraStore REST call .