code: protected function parseMetadataElement($element = null)
      {
          // Metadata present?
          if (!is_null($element) && isset($element->Metadata) && !is_null($element->Metadata)) {
              return get_object_vars($element->Metadata);
          }
  
          return array();
      }
docs: Parse metadata XML
  
  @param SimpleXMLElement $parentElement Element containing the Metadata element.
  @return array