protected function matchAttributes($xml)
	{
		if (strpos($xml, '="') === false)
		{
			return [];
		}

		// Match all name-value pairs until the first right bracket
		preg_match_all('(([^ =]++)="([^"]*))S', substr($xml, 0, strpos($xml, '>')), $m);

		return array_combine($m[1], $m[2]);
	}