public function process($content) {

        // the content should be a string. If array or object is given, try our best recursively
        // but inform the developer
        if (is_array($content)) {
            debugging('Moodle1 XML transformer should not process arrays but plain content always', DEBUG_DEVELOPER);
            foreach($content as $key => $plaincontent) {
                $content[$key] = $this->process($plaincontent);
            }
            return $content;

        } else if (is_object($content)) {
            debugging('Moodle1 XML transformer should not process objects but plain content always', DEBUG_DEVELOPER);
            foreach((array)$content as $key => $plaincontent) {
                $content[$key] = $this->process($plaincontent);
            }
            return (object)$content;
        }

        // try to deal with some trivial cases first
        if (is_null($content)) {
            return '$@NULL@$';

        } else if ($content === '') {
            return '';

        } else if (is_numeric($content)) {
            return $content;

        } else if (strlen($content) < 32) {
            return $content;
        }

        return $content;
    }