ILIAS  release_8 Revision v8.24
ilXmlWriter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilXmlWriter:
+ Collaboration diagram for ilXmlWriter:

Public Member Functions

 __construct (string $version="1.0", string $outEnc="utf-8", string $inEnc="utf-8")
 
 xmlSetDtdDef (string $dtdDef)
 Sets dtd definition. More...
 
 xmlSetGenCmt (string $genCmt)
 Sets generated comment. More...
 
 xmlFormatData (string $data)
 Indents text for better reading. More...
 
 xmlHeader ()
 Writes xml header. More...
 
 xmlStartTag (string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
 Writes a starttag. More...
 
 xmlEndTag (string $tag)
 Writes an endtag. More...
 
 xmlData (string $data, bool $encode=true, bool $escape=true)
 Writes data. More...
 
 xmlElement (string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
 Writes a basic element (no children, just textual content) More...
 
 xmlDumpFile (string $file, bool $format=true)
 Dumps xml document from memory into a file. More...
 
 xmlDumpMem (bool $format=true)
 Returns xml document from memory. More...
 
 appendXML (string $a_str)
 append xml string to document More...
 
 xmlClear ()
 clears xmlStr More...
 

Private Member Functions

 xmlSetStSheet (string $stSheet)
 Sets stylesheet. More...
 
 xmlEscapeData (string $data)
 Escapes reserved characters. More...
 
 xmlEncodeData (string $data)
 Encodes text from input encoding into output encoding. More...
 
 xmlFormatElement (array $array)
 Callback function for xmlFormatData; do not invoke directly. More...
 
 xmlComment (string $comment)
 Writes a comment. More...
 

Private Attributes

string $xmlStr
 
string $version
 
string $outEnc
 
string $inEnc
 
string $dtdDef = ""
 
string $stSheet = ""
 
string $genCmt = "Generated by ILIAS XmlWriter"
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning XML writer class

Class to simplify manual writing of xml documents. It only supports writing xml sequentially, because the xml document is saved in a string with no additional structure information. The author is responsible for well-formedness and validity of the xml document.

Author
Matthias Rulinski matth.nosp@m.ias..nosp@m.rulin.nosp@m.ski@.nosp@m.mi.un.nosp@m.i-ko.nosp@m.eln.d.nosp@m.e
Version
$Id$

Definition at line 30 of file class.ilXmlWriter.php.

Constructor & Destructor Documentation

◆ __construct()

ilXmlWriter::__construct ( string  $version = "1.0",
string  $outEnc = "utf-8",
string  $inEnc = "utf-8" 
)

Definition at line 46 of file class.ilXmlWriter.php.

50 {
51 // initialize xml string
52 $this->xmlStr = "";
53
54 // set properties
55 $this->version = $version;
56 $this->outEnc = $outEnc;
57 $this->inEnc = $inEnc;
58 }

References $inEnc, $outEnc, and $version.

Member Function Documentation

◆ appendXML()

ilXmlWriter::appendXML ( string  $a_str)

append xml string to document

Definition at line 415 of file class.ilXmlWriter.php.

415 : void
416 {
417 $this->xmlStr .= $a_str;
418 }

Referenced by ilCourseXMLWriter\__buildMetaData(), ilGroupXMLWriter\__buildMetaData(), ilObjLinkResource\toXML(), ilDidacticTemplateLocalPolicyAction\toXml(), and ilDidacticTemplateLocalRoleAction\toXml().

+ Here is the caller graph for this function:

◆ xmlClear()

ilXmlWriter::xmlClear ( )

clears xmlStr

Definition at line 423 of file class.ilXmlWriter.php.

423 : void
424 {
425 // reset xml string
426 $this->xmlStr = "";
427 }

Referenced by ilFolderXmlWriter\init(), ilWebLinkXmlWriter\init(), and ilLPXmlWriter\init().

+ Here is the caller graph for this function:

◆ xmlComment()

ilXmlWriter::xmlComment ( string  $comment)
private

Writes a comment.

Definition at line 313 of file class.ilXmlWriter.php.

313 : void
314 {
315 $this->xmlStr .= "<!--" . $comment . "-->";
316 }
$comment
Definition: buildRTE.php:72

References $comment.

Referenced by xmlHeader().

+ Here is the caller graph for this function:

◆ xmlData()

ilXmlWriter::xmlData ( string  $data,
bool  $encode = true,
bool  $escape = true 
)

Writes data.

Definition at line 321 of file class.ilXmlWriter.php.

325 : void {
326 // encode
327 if ($encode) {
328 $data = $this->xmlEncodeData($data);
329 }
330
331 // escape
332 if ($escape) {
333 $data = $this->xmlEscapeData($data);
334 }
335
336 $this->xmlStr .= $data;
337 }
xmlEscapeData(string $data)
Escapes reserved characters.
xmlEncodeData(string $data)
Encodes text from input encoding into output encoding.

References $data.

Referenced by ilContainer\_exportContainerSettings(), and ilTestExportRandomQuestionSet\populateQuestionStages().

+ Here is the caller graph for this function:

◆ xmlDumpFile()

ilXmlWriter::xmlDumpFile ( string  $file,
bool  $format = true 
)

Dumps xml document from memory into a file.

Reimplemented in ilTestResultsToXML.

Definition at line 370 of file class.ilXmlWriter.php.

370 : void
371 {
372 // open file
373 if (!($fp = fopen($file, "w+"))) {
374 throw new RuntimeException(
375 "<b>Error</b>: Could not open \"" . $file . "\" for writing" .
376 " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />"
377 );
378 }
379
380 // set file permissions
381 chmod($file, 0770);
382
383 // format xml data
384 if ($format) {
385 $xmlStr = $this->xmlFormatData($this->xmlStr);
386 } else {
388 }
389
390 // write xml data into the file
391 fwrite($fp, $xmlStr);
392
393 // close file
394 fclose($fp);
395 }
xmlFormatData(string $data)
Indents text for better reading.
$format
Definition: metadata.php:235

References $format.

◆ xmlDumpMem()

◆ xmlElement()

ilXmlWriter::xmlElement ( string  $tag,
  $attrs = null,
  $data = null,
  $encode = true,
  $escape = true 
)

Writes a basic element (no children, just textual content)

Definition at line 342 of file class.ilXmlWriter.php.

348 : void {
349 // check for existing data (element's content)
350 if (is_string($data) or
351 is_integer($data) or
352 is_float($data)) {
353 // write starttag
354 $this->xmlStartTag($tag, $attrs, false, $encode, $escape);
355
356 // write text
357 $this->xmlData($data, $encode, $escape);
358
359 // write endtag
360 $this->xmlEndTag($tag);
361 } else { // no data
362 // write starttag (= empty tag)
363 $this->xmlStartTag($tag, $attrs, true, $encode, $escape);
364 }
365 }
xmlEndTag(string $tag)
Writes an endtag.
xmlData(string $data, bool $encode=true, bool $escape=true)
Writes data.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.

References $data.

Referenced by ilGroupXMLWriter\__buildAdmin(), ilGroupXMLWriter\__buildExtraSettings(), ilGroupXMLWriter\__buildMember(), ilGroupXMLWriter\__buildPeriod(), ilGroupXMLWriter\__buildRegistration(), ilCourseXMLWriter\__buildSetting(), ilGroupXMLWriter\__buildTitleDescription(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilAdvancedMDValues\_appendXMLByObjId(), ilLPXmlWriter\addLPInformation(), ilAdvancedMDFieldDefinitionFloat\addPropertiesToXML(), ilAdvancedMDFieldDefinitionGroupBased\addPropertiesToXML(), ilAdvancedMDFieldDefinitionInteger\addPropertiesToXML(), ilAdvancedMDFieldDefinitionSelect\addPropertiesToXML(), ilAdvancedMDFieldDefinitionText\addPropertiesToXML(), assQuestion\addQTIMaterial(), assQuestionExport\addQtiMetaDataField(), assQuestionExport\addSolutionHints(), ilUserDefinedData\addToXML(), ilUserDefinedFields\addToXML(), ilDataSet\addTypesXml(), ilSoapLearningProgressAdministration\addUserProgress(), ilObjectXMLWriter\appendObjectProperties(), ilObjectXMLWriter\appendOperations(), ilObjectXMLWriter\appendPathToObject(), ilXMLResultSetWriter\appendRow(), ilObjectXMLWriter\appendTimeTargets(), ilXMLResultSetWriter\buildColSpecs(), ilCourseReferenceXmlWriter\buildCourseSettings(), ilSoapInstallationInfoXMLWriter\buildInstallationInfo(), ilContainerReferenceXmlWriter\buildTarget(), ilContainerReferenceXmlWriter\buildTitle(), ilCategoryXmlWriter\buildTranslations(), ilAuthProviderSaml\buildUserAttributeXml(), ilTestResultsToXML\exportActiveIDs(), ilChatroomXMLWriter\exportData(), ilLMPageObject\exportFO(), ilTestResultsToXML\exportPassResult(), ilTestResultsToXML\exportRandomTestQuestions(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilLMPageObject\exportXML(), ilSoapStructureObject\exportXML(), ilTestExportRandomQuestionSet\populateCommonSettings(), ilTestExportRandomQuestionSet\populateSelectionDefinitions(), ilChatroomXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilForumXMLWriter\start(), ilSoapRoleObjectXMLWriter\start(), ilAdvancedMDFieldDefinition\toXML(), ilCourseObjective\toXml(), ilCourseObjectiveMaterials\toXml(), ilCourseObjectiveQuestion\toXml(), ilLOSettings\toXml(), ilObjLinkResource\toXML(), ilWebLinkParameter\toXML(), ilAdvancedMDRecord\toXML(), ilAdvancedMDRecordTranslations\toXML(), ilDidacticTemplateIconHandler\toXml(), ilDidacticTemplateExcludeFilterPattern\toXml(), ilDidacticTemplateIncludeFilterPattern\toXml(), ilDidacticTemplateSetting\toXml(), ilMDAnnotation\toXML(), ilMDClassification\toXML(), ilMDContribute\toXML(), ilMDDescription\toXML(), ilMDEducational\toXML(), ilMDEntity\toXML(), ilMDFormat\toXML(), ilMDGeneral\toXML(), ilMDIdentifier\toXML(), ilMDIdentifier_\toXML(), ilMDKeyword\toXML(), ilMDLanguage\toXML(), ilMDLifecycle\toXML(), ilMDLocation\toXML(), ilMDRequirement\toXML(), ilMDRights\toXML(), ilMDTaxon\toXML(), ilMDTaxonPath\toXML(), ilMDTechnical\toXML(), ilMDTypicalAgeRange\toXML(), ilMultilingualism\toXml(), ilLORandomTestQuestionPools\toXml(), ilLOTestAssignments\toXml(), ilWebLinkItem\toXML(), ilFolderXmlWriter\write(), ilContainerXmlWriter\writeCourseItemInformation(), ilLearningSequenceXMLWriter\writeDescription(), ilLearningSequenceXMLWriter\writeLPSettings(), ilLearningSequenceXMLWriter\writeLSItems(), ilLearningSequenceXMLWriter\writeOwner(), ilRoleXmlExport\writeRole(), ilLearningSequenceXMLWriter\writeSettings(), and ilLearningSequenceXMLWriter\writeTitle().

+ Here is the caller graph for this function:

◆ xmlEncodeData()

ilXmlWriter::xmlEncodeData ( string  $data)
private

Encodes text from input encoding into output encoding.

Definition at line 134 of file class.ilXmlWriter.php.

134 : string
135 {
136 if ($this->inEnc == $this->outEnc) {
137 $encodedData = $data;
138 } else {
139 switch (strtolower($this->outEnc)) {
140 case "utf-8":
141 if (strtolower($this->inEnc) == "iso-8859-1") {
142 $encodedData = utf8_encode($data);
143 } else {
144 die(
145 "<b>Error</b>: Cannot encode iso-8859-1 data in " . $this->outEnc .
146 " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />"
147 );
148 }
149 break;
150
151 case "iso-8859-1":
152 if (strtolower($this->inEnc) == "utf-8") {
153 $encodedData = utf8_decode($data);
154 } else {
155 die(
156 "<b>Error</b>: Cannot encode utf-8 data in " . $this->outEnc .
157 " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />"
158 );
159 }
160 break;
161
162 default:
163 die(
164 "<b>Error</b>: Cannot encode " . $this->inEnc . " data in " . $this->outEnc .
165 " in <b>" . __FILE__ . "</b> on line <b>" . __LINE__ . "</b><br />"
166 );
167 }
168 }
169 return $encodedData;
170 }

References $data.

Referenced by xmlStartTag().

+ Here is the caller graph for this function:

◆ xmlEndTag()

ilXmlWriter::xmlEndTag ( string  $tag)

Writes an endtag.

Definition at line 305 of file class.ilXmlWriter.php.

305 : void
306 {
307 $this->xmlStr .= "</" . $tag . ">";
308 }

Referenced by ilCourseXMLWriter\__buildAdmin(), ilCourseXMLWriter\__buildFooter(), ilGroupXMLWriter\__buildFooter(), ilUserXMLWriter\__buildFooter(), ilCourseXMLWriter\__buildMember(), ilGroupXMLWriter\__buildPeriod(), ilGroupXMLWriter\__buildRegistration(), ilCourseXMLWriter\__buildSetting(), ilCourseXMLWriter\__buildSubscriber(), ilCourseXMLWriter\__buildTutor(), ilCourseXMLWriter\__buildWaitingList(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilAdvancedMDValues\_appendXMLByObjId(), ilContainer\_exportContainerSettings(), assQuestionExport\addAnswerSpecificFeedback(), ilLPXmlWriter\addLPInformation(), assQuestion\addQTIMaterial(), assQuestionExport\addQtiMetaDataField(), ilUserDefinedFields\addToXML(), ilDataSet\addTypesXml(), ilSoapLearningProgressAdministration\addUserProgress(), ilObjectXMLWriter\appendObjectProperties(), ilObjectXMLWriter\appendPathToObject(), ilXMLResultSetWriter\appendRow(), ilObjectXMLWriter\appendTimeTargets(), ilSoapInstallationInfoXMLWriter\buildClient(), ilXMLResultSetWriter\buildColSpecs(), ilCategoryXmlWriter\buildFooter(), ilContainerReferenceXmlWriter\buildFooter(), ilObjectXMLWriter\buildFooter(), ilSoapInstallationInfoXMLWriter\buildFooter(), ilSoapRoleObjectXMLWriter\buildFooter(), ilXMLResultSetWriter\buildFooter(), ilSoapInstallationInfoXMLWriter\buildInstallationInfo(), ilXMLResultSetWriter\buildRows(), ilCategoryXmlWriter\buildTranslations(), ilSoapInstallationInfoXMLWriter\end(), ilTestResultsToXML\exportActiveIDs(), assClozeTestExport\exportAnswerSpecificFeedbacks(), ilChatroomXMLWriter\exportData(), ilTestResultsToXML\exportPassResult(), ilTestResultsToXML\exportRandomTestQuestions(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilSoapStructureObject\exportXML(), ilTestResultsToXML\getXML(), ilObjQuestionPool\objectToXmlWriter(), ilTestExportRandomQuestionSet\populateQuestionSetConfigXml(), ilTestExportRandomQuestionSet\populateQuestionStages(), ilTestExportRandomQuestionSet\populateSelectionDefinitions(), ilChatroomXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilForumXMLWriter\start(), ilSoapRoleObjectXMLWriter\start(), ilAdvancedMDFieldDefinition\toXML(), ilCourseObjective\toXml(), ilCourseObjectiveQuestion\toXml(), ilObjLinkResource\toXML(), ilAdvancedMDRecord\toXML(), ilAdvancedMDRecordTranslations\toXML(), ilDidacticTemplateBlockRoleAction\toXml(), ilDidacticTemplateLocalPolicyAction\toXml(), ilDidacticTemplateLocalRoleAction\toXml(), ilDidacticTemplateSetting\toXml(), ilMD\toXML(), ilMDAnnotation\toXML(), ilMDClassification\toXML(), ilMDContribute\toXML(), ilMDEducational\toXML(), ilMDGeneral\toXML(), ilMDLifecycle\toXML(), ilMDMetaMetadata\toXML(), ilMDOrComposite\toXML(), ilMDRelation\toXML(), ilMDRequirement\toXML(), ilMDRights\toXML(), ilMDTaxonPath\toXML(), ilMDTechnical\toXML(), ilMultilingualism\toXml(), ilWebLinkItem\toXML(), ilFolderXmlWriter\write(), ilRoleXmlExport\write(), ilAdvancedMDRecordXMLWriter\write(), ilContainerXmlWriter\write(), ilDidacticTemplateXmlWriter\write(), ilContainerXmlWriter\writeCourseItemInformation(), ilLearningSequenceXMLWriter\writeFooter(), ilLearningSequenceXMLWriter\writeLSItems(), ilRoleXmlExport\writeRole(), and ilContainerXmlWriter\writeSubitems().

+ Here is the caller graph for this function:

◆ xmlEscapeData()

ilXmlWriter::xmlEscapeData ( string  $data)
private

Escapes reserved characters.

Definition at line 87 of file class.ilXmlWriter.php.

87 : string
88 {
89 $position = 0;
90 $length = strlen($data);
91 $escapedData = "";
92
93 for (; $position < $length;) {
94 $character = substr($data, $position, 1);
95 $code = Ord($character);
96
97 switch ($code) {
98 case 34:
99 $character = "&quot;";
100 break;
101
102 case 38:
103 $character = "&amp;";
104 break;
105
106 case 39:
107 $character = "&apos;";
108 break;
109
110 case 60:
111 $character = "&lt;";
112 break;
113
114 case 62:
115 $character = "&gt;";
116 break;
117
118 default:
119 if ($code < 32) {
120 $character = ("&#" . $code . ";");
121 }
122 break;
123 }
124
125 $escapedData .= $character;
126 $position++;
127 }
128 return $escapedData;
129 }

References $data.

Referenced by xmlStartTag().

+ Here is the caller graph for this function:

◆ xmlFormatData()

ilXmlWriter::xmlFormatData ( string  $data)

Indents text for better reading.

Definition at line 175 of file class.ilXmlWriter.php.

175 : ?string
176 {
177 // regular expression for tags
178 $formatedXml = preg_replace_callback(
179 "|<[^>]*>[^<]*|",
180 [$this, "xmlFormatElement"],
181 $data
182 );
183
184 return $formatedXml;
185 }

References $data.

◆ xmlFormatElement()

ilXmlWriter::xmlFormatElement ( array  $array)
private

Callback function for xmlFormatData; do not invoke directly.

Definition at line 190 of file class.ilXmlWriter.php.

190 : string
191 {
192 $found = trim($array[0]);
193
194 static $indent;
195
196 // linebreak (default)
197 $nl = "\n";
198
199 $tab = str_repeat(" ", $indent * 2);
200
201 // closing tag
202 if (substr($found, 0, 2) == "</") {
203 if ($indent) {
204 $indent--;
205 }
206 $tab = str_repeat(" ", $indent * 2);
207 } elseif (substr(
208 $found,
209 -2,
210 1
211 ) == "/" or // opening and closing, comment, ...
212 strpos($found, "/>") or
213 substr($found, 0, 2) == "<!") {
214 // do not change indent
215 } elseif (substr($found, 0, 2) == "<?") {
216 // do not change indent
217 // no linebreak
218 $nl = "";
219 } else { // opening tag
220 $indent++;
221 }
222
223 // content
224 if (substr($found, -1) != ">") {
225 $found = str_replace(
226 ">",
227 ">\n" . str_repeat(" ", ($indent + 0) * 2),
228 $found
229 );
230 }
231
232 return $nl . $tab . $found;
233 }

◆ xmlHeader()

ilXmlWriter::xmlHeader ( )

Writes xml header.

Definition at line 238 of file class.ilXmlWriter.php.

238 : void
239 {
240 // version and encoding
241 $this->xmlStr .= "<?xml version=\"" . $this->version . "\" encoding=\"" . $this->outEnc . "\"?>";
242
243 // dtd definition
244 if ($this->dtdDef <> "") {
245 $this->xmlStr .= $this->dtdDef;
246 }
247
248 // stSheet
249 if ($this->stSheet <> "") {
250 $this->xmlStr .= $this->stSheet;
251 }
252
253 // generated comment
254 if ($this->genCmt <> "") {
255 $this->xmlComment($this->genCmt);
256 }
257 }
xmlComment(string $comment)
Writes a comment.

References $dtdDef, $stSheet, and xmlComment().

Referenced by ilCourseXMLWriter\__buildHeader(), ilExerciseXMLWriter\__buildHeader(), ilFileXMLWriter\__buildHeader(), ilGroupXMLWriter\__buildHeader(), ilUserXMLWriter\__buildHeader(), ilCategoryXmlWriter\buildHeader(), ilCategoryReferenceXmlWriter\buildHeader(), ilCourseReferenceXmlWriter\buildHeader(), ilFolderXmlWriter\buildHeader(), ilGroupReferenceXmlWriter\buildHeader(), ilWebLinkXmlWriter\buildHeader(), ilAdvancedMDRecordXMLWriter\buildHeader(), ilContainerXmlWriter\buildHeader(), ilContainerReferenceXmlWriter\buildHeader(), ilLPXmlWriter\buildHeader(), ilObjectXMLWriter\buildHeader(), ilSoapInstallationInfoXMLWriter\buildHeader(), ilSoapRoleObjectXMLWriter\buildHeader(), ilSoapStructureObjectXMLWriter\buildHeader(), ilXMLResultSetWriter\buildHeader(), ilTestResultsToXML\getXML(), ilDidacticTemplateXmlWriter\write(), and ilRoleXmlExport\writeHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmlSetDtdDef()

◆ xmlSetGenCmt()

◆ xmlSetStSheet()

ilXmlWriter::xmlSetStSheet ( string  $stSheet)
private

Sets stylesheet.

Definition at line 71 of file class.ilXmlWriter.php.

71 : void
72 {
73 $this->stSheet = $stSheet;
74 }

References $stSheet.

◆ xmlStartTag()

ilXmlWriter::xmlStartTag ( string  $tag,
?array  $attrs = null,
bool  $empty = false,
bool  $encode = true,
bool  $escape = true 
)

Writes a starttag.

Definition at line 262 of file class.ilXmlWriter.php.

268 : void {
269 // write first part of the starttag
270 $this->xmlStr .= "<" . $tag;
271
272 // check for existing attributes
273 if (is_array($attrs)) {
274 // write attributes
275 foreach ($attrs as $name => $value) {
276 if ($value === null) {
277 $value = '';
278 }
279
280 // encode
281 if ($encode) {
282 $value = $this->xmlEncodeData($value);
283 }
284
285 // escape
286 if ($escape) {
287 $value = $this->xmlEscapeData($value);
288 }
289
290 $this->xmlStr .= " " . $name . "=\"" . $value . "\"";
291 }
292 }
293
294 // write last part of the starttag
295 if ($empty) {
296 $this->xmlStr .= "/>";
297 } else {
298 $this->xmlStr .= ">";
299 }
300 }
if($format !==null) $name
Definition: metadata.php:247

References $name, xmlEncodeData(), and xmlEscapeData().

Referenced by ilCourseXMLWriter\__buildAdmin(), ilCourseXMLWriter\__buildCourseStart(), ilGroupXMLWriter\__buildGroup(), ilUserXMLWriter\__buildHeader(), ilCourseXMLWriter\__buildMember(), ilGroupXMLWriter\__buildPeriod(), ilGroupXMLWriter\__buildRegistration(), ilCourseXMLWriter\__buildSetting(), ilCourseXMLWriter\__buildSubscriber(), ilCourseXMLWriter\__buildTutor(), ilCourseXMLWriter\__buildWaitingList(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilAdvancedMDValues\_appendXMLByObjId(), ilContainer\_exportContainerSettings(), assQuestionExport\addAnswerSpecificFeedback(), ilLPXmlWriter\addLPInformation(), assQuestion\addQTIMaterial(), assQuestionExport\addQtiMetaDataField(), ilUserDefinedFields\addToXML(), ilDataSet\addTypesXml(), ilSoapLearningProgressAdministration\addUserProgress(), ilObjectXMLWriter\appendObjectProperties(), ilObjectXMLWriter\appendPathToObject(), ilXMLResultSetWriter\appendRow(), ilObjectXMLWriter\appendTimeTargets(), ilCategoryXmlWriter\buildCategory(), ilSoapInstallationInfoXMLWriter\buildClient(), ilXMLResultSetWriter\buildColSpecs(), ilObjectXMLWriter\buildHeader(), ilSoapInstallationInfoXMLWriter\buildHeader(), ilSoapRoleObjectXMLWriter\buildHeader(), ilXMLResultSetWriter\buildHeader(), ilSoapInstallationInfoXMLWriter\buildInstallationInfo(), ilContainerReferenceXmlWriter\buildReference(), ilXMLResultSetWriter\buildRows(), ilCategoryXmlWriter\buildTranslations(), ilTestResultsToXML\exportActiveIDs(), assClozeTestExport\exportAnswerSpecificFeedbacks(), ilChatroomXMLWriter\exportData(), ilTestResultsToXML\exportPassResult(), ilTestResultsToXML\exportRandomTestQuestions(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilSoapStructureObject\exportXML(), ilTestResultsToXML\getXML(), ilObjQuestionPool\objectToXmlWriter(), ilTestExportRandomQuestionSet\populateQuestionSetConfigXml(), ilTestExportRandomQuestionSet\populateQuestionStages(), ilTestExportRandomQuestionSet\populateSelectionDefinitions(), ilChatroomXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilForumXMLWriter\start(), ilSoapInstallationInfoXMLWriter\start(), ilSoapRoleObjectXMLWriter\start(), ilAdvancedMDFieldDefinition\toXML(), ilCourseObjective\toXml(), ilCourseObjectiveQuestion\toXml(), ilObjLinkResource\toXML(), ilAdvancedMDRecord\toXML(), ilAdvancedMDRecordTranslations\toXML(), ilDidacticTemplateBlockRoleAction\toXml(), ilDidacticTemplateLocalPolicyAction\toXml(), ilDidacticTemplateLocalRoleAction\toXml(), ilDidacticTemplateSetting\toXml(), ilMD\toXML(), ilMDAnnotation\toXML(), ilMDClassification\toXML(), ilMDContribute\toXML(), ilMDEducational\toXML(), ilMDGeneral\toXML(), ilMDLifecycle\toXML(), ilMDMetaMetadata\toXML(), ilMDOrComposite\toXML(), ilMDRelation\toXML(), ilMDRequirement\toXML(), ilMDRights\toXML(), ilMDTaxonPath\toXML(), ilMDTechnical\toXML(), ilMultilingualism\toXml(), ilWebLinkItem\toXML(), ilFolderXmlWriter\write(), ilRoleXmlExport\write(), ilAdvancedMDRecordXMLWriter\write(), ilContainerXmlWriter\write(), ilDidacticTemplateXmlWriter\write(), ilContainerXmlWriter\writeCourseItemInformation(), ilLearningSequenceXMLWriter\writeLearningSequence(), ilLearningSequenceXMLWriter\writeLSItems(), ilRoleXmlExport\writeRole(), and ilContainerXmlWriter\writeSubitems().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $dtdDef

string ilXmlWriter::$dtdDef = ""
private

Definition at line 40 of file class.ilXmlWriter.php.

Referenced by xmlHeader(), and xmlSetDtdDef().

◆ $genCmt

string ilXmlWriter::$genCmt = "Generated by ILIAS XmlWriter"
private

Definition at line 44 of file class.ilXmlWriter.php.

Referenced by xmlSetGenCmt().

◆ $inEnc

string ilXmlWriter::$inEnc
private

Definition at line 38 of file class.ilXmlWriter.php.

Referenced by __construct().

◆ $outEnc

string ilXmlWriter::$outEnc
private

Definition at line 36 of file class.ilXmlWriter.php.

Referenced by __construct().

◆ $stSheet

string ilXmlWriter::$stSheet = ""
private

Definition at line 42 of file class.ilXmlWriter.php.

Referenced by xmlHeader(), and xmlSetStSheet().

◆ $version

string ilXmlWriter::$version
private

Definition at line 34 of file class.ilXmlWriter.php.

Referenced by __construct(), and ilFileXMLWriter\start().

◆ $xmlStr

string ilXmlWriter::$xmlStr
private

Definition at line 32 of file class.ilXmlWriter.php.


The documentation for this class was generated from the following file: