42 : void {
43 $content = "";
44 $path = "/descendant::Paragraph[position() = $par_id]";
45 $nodes = $this->dom_util->path(
46 $dom,
47 $path
48 );
49 if (count($nodes) != 1) {
50 throw new \ilCOPageException("Paragraph not found.");
51 }
52
53 $context_node = $nodes->item(0);
54 foreach ($context_node->childNodes as $child) {
55 $content .= $this->dom_util->dump($child);
56 }
57
58 $content = str_replace("<br />", "\n", $content);
59 $content = str_replace("<br/>", "\n", $content);
60
61 $plain_content = html_entity_decode($content);
62
63 $this->http_util->deliverString($plain_content,
$filename);
64 }