public function view($path = '', $trim = true, $return = true)
    {
        if (!empty($path)) {

            $results = $this->query($path);

            // create an empty template object for xpath query results.
            $template = new FabricationEngine();
            foreach ($results as $result) {
                $node = $template->importNode($result, true);
                $template->appendChild($node);
            }

            if ($trim) {
                $buffer = trim($template->saveHTML());
            } else {
                $buffer = $template->saveHTML();
            }
        } else {

            if ($trim) {
                $buffer = trim($this->saveHTML());
            } else {
                $buffer = $this->saveHTML();
            }
        }

        if ($return) {
            return $buffer;
        }

        echo $buffer;
    }