ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilXmlWriter Class Reference

XML writer class. More...

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

Public Member Functions

 ilXmlWriter ($version="1.0", $outEnc="utf-8", $inEnc="utf-8")
 constructor
 _ilXmlWriter ()
 destructor public
 xmlSetDtdDef ($dtdDef)
 Sets dtd definition.
 xmlSetStSheet ($stSheet)
 Sets stylesheet.
 xmlSetGenCmt ($genCmt)
 Sets generated comment.
 _xmlEscapeData ($data)
 Escapes reserved characters.
 xmlEncodeData ($data)
 Encodes text from input encoding into output encoding.
 xmlFormatData ($data)
 Indents text for better reading.
 xmlFormatElement ($array)
 Callback function for xmlFormatData; do not invoke directly.
 xmlHeader ()
 Writes xml header public.
 xmlStartTag ($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
 Writes a starttag.
 xmlEndTag ($tag)
 Writes an endtag.
 xmlComment ($comment)
 Writes a comment.
 xmlData ($data, $encode=TRUE, $escape=TRUE)
 Writes data.
 xmlElement ($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
 Writes a basic element (no children, just textual content)
 xmlDumpFile ($file, $format=TRUE)
 Dumps xml document from memory into a file.
 xmlDumpMem ($format=TRUE)
 Returns xml document from memory.
 appendXML ($a_str)
 append xml string to document
 xmlClear ()
 clears xmlStr public

Data Fields

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

Detailed Description

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:
class.ilXmlWriter.php 54904 2014-11-07 10:58:25Z smeyer

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

Member Function Documentation

ilXmlWriter::_ilXmlWriter ( )

destructor public

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

{
// terminate xml string
unset($this->xmlStr);
}
ilXmlWriter::_xmlEscapeData (   $data)

Escapes reserved characters.

Parameters
stringinput text
Returns
string escaped text static

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

Referenced by xmlData(), and xmlStartTag().

{
$position = 0;
$length = strlen($data);
$escapedData = "";
for(; $position < $length;)
{
$character = substr($data, $position, 1);
$code = Ord($character);
switch($code)
{
case 34:
$character = "&quot;";
break;
case 38:
$character = "&amp;";
break;
case 39:
$character = "&apos;";
break;
case 60:
$character = "&lt;";
break;
case 62:
$character = "&gt;";
break;
default:
if ($code < 32)
{
$character = ("&#".strval($code).";");
}
break;
}
$escapedData .= $character;
$position ++;
}
return $escapedData;
}

+ Here is the caller graph for this function:

ilXmlWriter::appendXML (   $a_str)

append xml string to document

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

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

{
$this->xmlStr .= $a_str;
}

+ Here is the caller graph for this function:

ilXmlWriter::ilXmlWriter (   $version = "1.0",
  $outEnc = "utf-8",
  $inEnc = "utf-8" 
)
ilXmlWriter::xmlComment (   $comment)

Writes a comment.

Parameters
stringcomment public

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

Referenced by xmlHeader().

{
$this->xmlStr .= "<!--".$comment."-->";
}

+ Here is the caller graph for this function:

ilXmlWriter::xmlData (   $data,
  $encode = TRUE,
  $escape = TRUE 
)

Writes data.

Parameters
stringdata
stringecode data (TRUE) or not (FALSE)
stringescape data (TRUE) or not (FALSE) public

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

References _xmlEscapeData(), and xmlEncodeData().

Referenced by ilContainer\_exportContainerSettings(), and xmlElement().

{
// encode
if ($encode)
{
$data = $this->xmlEncodeData($data);
}
// escape
if ($escape)
{
}
$this->xmlStr .= $data;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXmlWriter::xmlDumpFile (   $file,
  $format = TRUE 
)

Dumps xml document from memory into a file.

Parameters
stringfile name (full path)
booleanindent text (TRUE) or not (FALSE) public

Reimplemented in ilTestResultsToXML.

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

References $file, $xmlStr, and xmlFormatData().

{
// open file
if (!($fp = @fopen($file,"w+")))
{
die ("<b>Error</b>: Could not open \"".$file."\" for writing".
" in <b>".__FILE__."</b> on line <b>".__LINE__."</b><br />");
}
// set file permissions
chmod($file, 0770);
// format xml data
if ($format)
{
$xmlStr = $this->xmlFormatData($this->xmlStr);
}
else
{
}
// write xml data into the file
fwrite($fp, $xmlStr);
// close file
fclose($fp);
}

+ Here is the call graph for this function:

ilXmlWriter::xmlDumpMem (   $format = TRUE)

Returns xml document from memory.

Parameters
booleanindent text (TRUE) or not (FALSE)
Returns
string xml document public

Reimplemented in ilTestResultsToXML.

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

References $xmlStr, and xmlFormatData().

Referenced by ilXMLResultSetWriter\getXML(), ilSoapInstallationInfoXMLWriter\getXML(), ilMD2XML\getXML(), ilSoapStructureObjectXMLWriter\getXML(), ilContainerReferenceXmlWriter\getXml(), ilCategoryXmlWriter\getXml(), ilUserXMLWriter\getXML(), ilGroupXMLWriter\getXML(), ilSoapRoleObjectXMLWriter\getXML(), ilCourseXMLWriter\getXML(), ilExerciseXMLWriter\getXML(), ilObjectXMLWriter\getXML(), ilFileXMLWriter\getXML(), ilForumXMLWriter\getXML(), and ilnetucateXMLAPI\sendRequest().

{
// format xml data
if ($format)
{
$xmlStr = $this->xmlFormatData($this->xmlStr);
}
else
{
}
return $xmlStr;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXmlWriter::xmlElement (   $tag,
  $attrs = NULL,
  $data = Null,
  $encode = TRUE,
  $escape = TRUE 
)

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

Parameters
stringtag name
arrayattributes (name => value)
stringdata
booleanecode attributes' values and data (TRUE) or not (FALSE)
booleanescape attributes' values and data (TRUE) or not (FALSE) public

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

References xmlData(), xmlEndTag(), and xmlStartTag().

Referenced by ilUserXMLWriter\__addElement(), ilObjectXMLWriter\__appendObject(), ilObjectXMLWriter\__appendObjectProperties(), ilObjectXMLWriter\__appendOperations(), ilXMLResultSetWriter\__appendRow(), ilObjectXMLWriter\__appendTimeTargets(), ilGroupXMLWriter\__buildAdmin(), ilSoapInstallationInfoXMLWriter\__buildClient(), ilXMLResultSetWriter\__buildColSpecs(), ilSoapInstallationInfoXMLWriter\__buildInstallationInfo(), ilGroupXMLWriter\__buildMember(), ilGroupXMLWriter\__buildRegistration(), ilCourseXMLWriter\__buildSetting(), ilGroupXMLWriter\__buildTitleDescription(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilAdvancedMDValues\_appendXMLByObjId(), ilContainerSortingSettings\_exportContainerSortingSettings(), ilLPXmlWriter\addLPInformation(), ilAdvancedMDFieldDefinitionFloat\addPropertiesToXML(), ilAdvancedMDFieldDefinitionText\addPropertiesToXML(), ilAdvancedMDFieldDefinitionInteger\addPropertiesToXML(), ilAdvancedMDFieldDefinitionSelect\addPropertiesToXML(), assQuestionExport\addQtiMetaDataField(), ilExerciseXMLWriter\attachMarking(), ilContainerReferenceXmlWriter\buildTarget(), ilContainerReferenceXmlWriter\buildTitle(), ilCategoryXmlWriter\buildTranslations(), ilTestResultsToXML\exportActiveIDs(), ilTestResultsToXML\exportPassResult(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestQuestions(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilExerciseXMLWriter\handleAssignmentFiles(), ilSoapRoleObjectXMLWriter\start(), ilForumXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilDidacticTemplateExcludeFilterPattern\toXml(), ilDidacticTemplateIncludeFilterPattern\toXml(), ilObjLinkResource\toXML(), ilDidacticTemplateSetting\toXml(), ilAdvancedMDRecord\toXML(), ilLinkResourceItems\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilFolderXmlWriter\write(), ilContainerXmlWriter\writeCourseItemInformation(), and ilRoleXmlExport\writeRole().

{
// check for existing data (element's content)
if (is_string($data) or
is_integer($data) or
is_float($data))
{
// write starttag
$this->xmlStartTag($tag, $attrs, FALSE, $encode, $escape);
// write text
$this->xmlData($data, $encode, $escape);
// write endtag
$this->xmlEndTag($tag);
}
else // no data
{
// write starttag (= empty tag)
$this->xmlStartTag($tag, $attrs, TRUE, $encode, $escape);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXmlWriter::xmlEncodeData (   $data)

Encodes text from input encoding into output encoding.

Parameters
stringinput text
Returns
string encoded text private

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

Referenced by xmlData(), and xmlStartTag().

{
if ($this->inEnc == $this->outEnc)
{
$encodedData = $data;
}
else
{
switch(strtolower($this->outEnc))
{
case "utf-8":
if(strtolower($this->inEnc) == "iso-8859-1")
{
$encodedData = utf8_encode($data);
}
else
{
die ("<b>Error</b>: Cannot encode iso-8859-1 data in ".$this->outEnc.
" in <b>".__FILE__."</b> on line <b>".__LINE__."</b><br />");
}
break;
case "iso-8859-1":
if(strtolower($this->inEnc) == "utf-8")
{
$encodedData = utf8_decode($data);
}
else
{
die ("<b>Error</b>: Cannot encode utf-8 data in ".$this->outEnc.
" in <b>".__FILE__."</b> on line <b>".__LINE__."</b><br />");
}
break;
default:
die ("<b>Error</b>: Cannot encode ".$this->inEnc." data in ".$this->outEnc.
" in <b>".__FILE__."</b> on line <b>".__LINE__."</b><br />");
}
}
return $encodedData;
}

+ Here is the caller graph for this function:

ilXmlWriter::xmlEndTag (   $tag)

Writes an endtag.

Parameters
stringtag name public

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

Referenced by ilObjectXMLWriter\__appendObject(), ilObjectXMLWriter\__appendObjectProperties(), ilXMLResultSetWriter\__appendRow(), ilObjectXMLWriter\__appendTimeTargets(), ilCourseXMLWriter\__buildAdmin(), ilSoapInstallationInfoXMLWriter\__buildClient(), ilXMLResultSetWriter\__buildColSpecs(), ilSoapInstallationInfoXMLWriter\__buildFooter(), ilXMLResultSetWriter\__buildFooter(), ilUserXMLWriter\__buildFooter(), ilSoapRoleObjectXMLWriter\__buildFooter(), ilGroupXMLWriter\__buildFooter(), ilCourseXMLWriter\__buildFooter(), ilObjectXMLWriter\__buildFooter(), ilSoapInstallationInfoXMLWriter\__buildInstallationInfo(), ilCourseXMLWriter\__buildMember(), ilGroupXMLWriter\__buildRegistration(), ilXMLResultSetWriter\__buildRows(), ilCourseXMLWriter\__buildSetting(), ilCourseXMLWriter\__buildSubscriber(), ilCourseXMLWriter\__buildTutor(), ilCourseXMLWriter\__buildWaitingList(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilAdvancedMDValues\_appendXMLByObjId(), ilContainer\_exportContainerSettings(), ilnetucateXMLAPI\addClass(), ilnetucateXMLAPI\addCourse(), ilLPXmlWriter\addLPInformation(), assQuestionExport\addQtiMetaDataField(), ilnetucateXMLAPI\addUser(), ilnetucateXMLAPI\addUserOLD(), ilExerciseXMLWriter\attachMarking(), ilCategoryXmlWriter\buildFooter(), ilContainerReferenceXmlWriter\buildFooter(), ilCategoryXmlWriter\buildTranslations(), ilnetucateXMLAPI\editClass(), ilnetucateXMLAPI\editCourse(), ilnetucateXMLAPI\editUser(), ilSoapInstallationInfoXMLWriter\end(), ilTestResultsToXML\exportActiveIDs(), ilTestResultsToXML\exportPassResult(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestQuestions(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilnetucateXMLAPI\findClass(), ilnetucateXMLAPI\findCourseClasses(), ilnetucateXMLAPI\findRegisteredUsersByRole(), ilnetucateXMLAPI\findUser(), ilTestResultsToXML\getXML(), ilExerciseXMLWriter\handleAssignmentFiles(), ilExerciseXMLWriter\handleAssignmentMembers(), ilnetucateXMLAPI\joinClass(), ilnetucateXMLAPI\registerUser(), ilnetucateXMLAPI\removeClass(), ilnetucateXMLAPI\removeCourse(), ilnetucateXMLAPI\removeUser(), ilSoapRoleObjectXMLWriter\start(), ilForumXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilDidacticTemplateLocalRoleAction\toXml(), ilObjLinkResource\toXML(), ilDidacticTemplateBlockRoleAction\toXml(), ilDidacticTemplateLocalPolicyAction\toXml(), ilDidacticTemplateSetting\toXml(), ilAdvancedMDRecord\toXML(), ilLinkResourceItems\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilnetucateXMLAPI\unregisterUser(), ilnetucateXMLAPI\uploadPicture(), ilnetucateXMLAPI\userLogin(), ilContainerXmlWriter\write(), ilDidacticTemplateXmlWriter\write(), ilFolderXmlWriter\write(), ilAdvancedMDRecordXMLWriter\write(), ilRoleXmlExport\write(), ilContainerXmlWriter\writeCourseItemInformation(), ilRoleXmlExport\writeRole(), ilContainerXmlWriter\writeSubitems(), and xmlElement().

{
$this->xmlStr .= "</".$tag.">";
}

+ Here is the caller graph for this function:

ilXmlWriter::xmlFormatData (   $data)

Indents text for better reading.

Parameters
stringinput text
Returns
string indented text private

Reimplemented in ilnetucateXMLAPI.

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

Referenced by xmlDumpFile(), and xmlDumpMem().

{
// regular expression for tags
$formatedXml = preg_replace_callback("|<[^>]*>[^<]*|", array($this, "xmlFormatElement"), $data);
return $formatedXml;
}

+ Here is the caller graph for this function:

ilXmlWriter::xmlFormatElement (   $array)

Callback function for xmlFormatData; do not invoke directly.

Parameters
arrayresult of reg. expr. search
Returns
string indented substring private

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

References $tab.

{
$found = trim($array[0]);
static $indent;
// linebreak (default)
$nl = "\n";
$tab = str_repeat(" ", $indent * 2);
// closing tag
if (substr($found, 0, 2) == "</")
{
if($indent)
{
$indent --;
}
$tab = str_repeat(" ", $indent * 2);
}
elseif (substr($found, -2, 1) == "/" or // opening and closing, comment, ...
strpos($found, "/>") or
substr($found, 0, 2) == "<!")
{
// do not change indent
}
elseif (substr($found, 0, 2) == "<?")
{
// do not change indent
// no linebreak
$nl = "";
}
else // opening tag
{
$indent ++;
}
// content
if (substr($found, -1) != ">")
{
$found = str_replace(">", ">\n".str_repeat(" ", ($indent + 0) * 2), $found);
}
return $nl.$tab.$found;
}
ilXmlWriter::xmlHeader ( )

Writes xml header public.

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

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

Referenced by ilSoapInstallationInfoXMLWriter\__buildHeader(), ilXMLResultSetWriter\__buildHeader(), ilSoapStructureObjectXMLWriter\__buildHeader(), ilUserXMLWriter\__buildHeader(), ilGroupXMLWriter\__buildHeader(), ilSoapRoleObjectXMLWriter\__buildHeader(), ilCourseXMLWriter\__buildHeader(), ilExerciseXMLWriter\__buildHeader(), ilFileXMLWriter\__buildHeader(), ilObjectXMLWriter\__buildHeader(), ilnetucateXMLAPI\addClass(), ilnetucateXMLAPI\addCourse(), ilnetucateXMLAPI\addUser(), ilnetucateXMLAPI\addUserOLD(), ilCourseReferenceXmlWriter\buildHeader(), ilCategoryReferenceXmlWriter\buildHeader(), ilWebLinkXmlWriter\buildHeader(), ilFolderXmlWriter\buildHeader(), ilAdvancedMDRecordXMLWriter\buildHeader(), ilContainerReferenceXmlWriter\buildHeader(), ilCategoryXmlWriter\buildHeader(), ilLPXmlWriter\buildHeader(), ilContainerXmlWriter\buildHeader(), ilContObjectManifestBuilder\buildManifest(), ilnetucateXMLAPI\editClass(), ilnetucateXMLAPI\editCourse(), ilnetucateXMLAPI\editUser(), ilnetucateXMLAPI\findClass(), ilnetucateXMLAPI\findCourseClasses(), ilnetucateXMLAPI\findRegisteredUsersByRole(), ilnetucateXMLAPI\findUser(), ilTestResultsToXML\getXML(), ilnetucateXMLAPI\joinClass(), ilnetucateXMLAPI\registerUser(), ilnetucateXMLAPI\removeClass(), ilnetucateXMLAPI\removeCourse(), ilnetucateXMLAPI\removeUser(), assKprimChoiceExport\toXML(), assErrorTextExport\toXML(), assFileUploadExport\toXML(), assFlashQuestionExport\toXML(), assOrderingHorizontalExport\toXML(), assJavaAppletExport\toXML(), assTextSubsetExport\toXML(), assFormulaQuestionExport\toXML(), assImagemapQuestionExport\toXML(), assMultipleChoiceExport\toXML(), assTextQuestionExport\toXML(), assOrderingQuestionExport\toXML(), assClozeTestExport\toXML(), assNumericExport\toXML(), assSingleChoiceExport\toXML(), assMatchingQuestionExport\toXML(), SurveyTextQuestion\toXML(), SurveyMultipleChoiceQuestion\toXML(), SurveySingleChoiceQuestion\toXML(), SurveyMetricQuestion\toXML(), ilObjSurveyQuestionPool\toXML(), SurveyMatrixQuestion\toXML(), ilObjSurvey\toXML(), ilObjTest\toXML(), ilnetucateXMLAPI\unregisterUser(), ilnetucateXMLAPI\uploadPicture(), ilnetucateXMLAPI\userLogin(), ilDidacticTemplateXmlWriter\write(), and ilRoleXmlExport\writeHeader().

{
// version and encoding
$this->xmlStr .= "<?xml version=\"".$this->version."\" encoding=\"".$this->outEnc."\"?>";
// dtd definition
if ($this->dtdDef <> "")
{
$this->xmlStr .= $this->dtdDef;
}
// stSheet
if ($this->stSheet <> "")
{
$this->xmlStr .= $this->stSheet;
}
// generated comment
if ($this->genCmt <> "")
{
$this->xmlComment($this->genCmt);
}
return $xmlStr;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXmlWriter::xmlSetStSheet (   $stSheet)

Sets stylesheet.

Parameters
stringstylesheet public

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

References $stSheet.

{
$this->stSheet = $stSheet;
}
ilXmlWriter::xmlStartTag (   $tag,
  $attrs = NULL,
  $empty = FALSE,
  $encode = TRUE,
  $escape = TRUE 
)

Writes a starttag.

Parameters
stringtag name
arrayattributes (name => value)
booleantag empty (TRUE) or not (FALSE)
booleanecode attributes' values (TRUE) or not (FALSE)
booleanescape attributes' values (TRUE) or not (FALSE) public

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

References _xmlEscapeData(), and xmlEncodeData().

Referenced by ilObjectXMLWriter\__appendObject(), ilObjectXMLWriter\__appendObjectProperties(), ilXMLResultSetWriter\__appendRow(), ilObjectXMLWriter\__appendTimeTargets(), ilCourseXMLWriter\__buildAdmin(), ilSoapInstallationInfoXMLWriter\__buildClient(), ilXMLResultSetWriter\__buildColSpecs(), ilCourseXMLWriter\__buildCourseStart(), ilGroupXMLWriter\__buildGroup(), ilSoapInstallationInfoXMLWriter\__buildHeader(), ilXMLResultSetWriter\__buildHeader(), ilUserXMLWriter\__buildHeader(), ilSoapRoleObjectXMLWriter\__buildHeader(), ilObjectXMLWriter\__buildHeader(), ilSoapInstallationInfoXMLWriter\__buildInstallationInfo(), ilCourseXMLWriter\__buildMember(), ilGroupXMLWriter\__buildRegistration(), ilXMLResultSetWriter\__buildRows(), ilCourseXMLWriter\__buildSetting(), ilCourseXMLWriter\__buildSubscriber(), ilCourseXMLWriter\__buildTutor(), ilCourseXMLWriter\__buildWaitingList(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilAdvancedMDValues\_appendXMLByObjId(), ilContainer\_exportContainerSettings(), ilnetucateXMLAPI\addClass(), ilnetucateXMLAPI\addCourse(), ilLPXmlWriter\addLPInformation(), assQuestionExport\addQtiMetaDataField(), ilnetucateXMLAPI\addUser(), ilnetucateXMLAPI\addUserOLD(), ilExerciseXMLWriter\attachMarking(), ilCategoryXmlWriter\buildCategory(), ilContainerReferenceXmlWriter\buildReference(), ilCategoryXmlWriter\buildTranslations(), ilnetucateXMLAPI\editClass(), ilnetucateXMLAPI\editCourse(), ilnetucateXMLAPI\editUser(), ilTestResultsToXML\exportActiveIDs(), ilTestResultsToXML\exportPassResult(), ilSCORM2004Asset\exportPDF(), ilObjSCORM2004LearningModule\exportPDF(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestQuestions(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilnetucateXMLAPI\findClass(), ilnetucateXMLAPI\findCourseClasses(), ilnetucateXMLAPI\findRegisteredUsersByRole(), ilnetucateXMLAPI\findUser(), ilTestResultsToXML\getXML(), ilAdvancedMetaDataExporter\getXmlRepresentation(), ilExerciseXMLWriter\handleAssignmentFiles(), ilExerciseXMLWriter\handleAssignmentMembers(), ilnetucateXMLAPI\joinClass(), ilnetucateXMLAPI\registerUser(), ilnetucateXMLAPI\removeClass(), ilnetucateXMLAPI\removeCourse(), ilnetucateXMLAPI\removeUser(), ilSoapInstallationInfoXMLWriter\start(), ilSoapRoleObjectXMLWriter\start(), ilForumXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilDidacticTemplateLocalRoleAction\toXml(), ilObjLinkResource\toXML(), ilDidacticTemplateBlockRoleAction\toXml(), ilDidacticTemplateLocalPolicyAction\toXml(), ilDidacticTemplateSetting\toXml(), ilAdvancedMDRecord\toXML(), ilLinkResourceItems\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilnetucateXMLAPI\unregisterUser(), ilnetucateXMLAPI\uploadPicture(), ilnetucateXMLAPI\userLogin(), ilContainerXmlWriter\write(), ilDidacticTemplateXmlWriter\write(), ilFolderXmlWriter\write(), ilAdvancedMDRecordXMLWriter\write(), ilRoleXmlExport\write(), ilContainerXmlWriter\writeCourseItemInformation(), ilRoleXmlExport\writeRole(), ilContainerXmlWriter\writeSubitems(), and xmlElement().

{
// write first part of the starttag
$this->xmlStr .= "<".$tag;
// check for existing attributes
if (is_array($attrs))
{
// write attributes
foreach ($attrs as $name => $value)
{
// encode
if ($encode)
{
$value = $this->xmlEncodeData($value);
}
// escape
if ($escape)
{
$value = ilXmlWriter::_xmlEscapeData($value);
}
$this->xmlStr .= " ".$name."=\"".$value."\"";
}
}
// write last part of the starttag
if ($empty)
{
$this->xmlStr .= "/>";
}
else
{
$this->xmlStr .= ">";
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilXmlWriter::$dtdDef = ""

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

Referenced by xmlHeader(), and xmlSetDtdDef().

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

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

Referenced by xmlSetGenCmt().

ilXmlWriter::$inEnc

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

Referenced by ilXmlWriter().

ilXmlWriter::$outEnc

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

Referenced by ilXmlWriter().

ilXmlWriter::$stSheet = ""

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

Referenced by xmlHeader(), and xmlSetStSheet().

ilXmlWriter::$version

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

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

ilXmlWriter::$xmlStr

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

Referenced by xmlDumpFile(), xmlDumpMem(), and xmlHeader().


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