ILIAS  release_8 Revision v8.24
class.ilSoapStructureObjectXMLWriter.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once "./Services/Xml/classes/class.ilXmlWriter.php";
6
18{
19 public string $xml;
21
22 public function __construct()
23 {
24 global $DIC;
25
26 $ilUser = $DIC->user();
28 }
29
31 {
32 $this->structureObject = $structureObject;
33 }
34
35 public function start() : bool
36 {
37 if (!is_object($this->structureObject)) {
38 return false;
39 }
40
41 $this->buildHeader();
42 $this->structureObject->exportXML($this);
43 $this->buildFooter();
44 return true;
45 }
46
47 public function getXML() : string
48 {
49 return $this->xmlDumpMem(false);
50 }
51
52 private function buildHeader() : void
53 {
54 $this->xmlSetDtdDef("<!DOCTYPE RepositoryObject PUBLIC \"-//ILIAS//DTD UserImport//EN\" \"" . ILIAS_HTTP_PATH . "/xml/ilias_soap_structure_object_3_7.dtd\">");
55 $this->xmlSetGenCmt("Internal Structure Information of Repository Object");
56 $this->xmlHeader();
57 }
58
59 private function buildFooter() : void
60 {
61 }
62}
XML writer class Class to simplify manual writing of xml documents.
setStructureObject(ilSoapStructureObject $structureObject)
Abstract classs for soap structure objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlHeader()
Writes xml header.
xmlSetDtdDef(string $dtdDef)
Sets dtd definition.
xmlDumpMem(bool $format=true)
Returns xml document from memory.
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc