public static function create($filterXmlString)
    {
        $filterXml = simplexml_load_string($filterXmlString);
        $attributes = (array) $filterXml->attributes();

        if (array_key_exists('i:type', $attributes)) {
            $type = (string) $attributes['i:type'];
            if ($type === 'TrueFilter') {
                return new TrueFilter();
            }

            if ($type === 'FalseFilter') {
                return new FalseFilter();
            }

            return new self();
        }

        return null;
    }