metadata parsing using XML pattern