ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
XML writer class. More...
Public Member Functions | |
__construct ($version="1.0", $outEnc="utf-8", $inEnc="utf-8") | |
constructor More... | |
_ilXmlWriter () | |
destructor public More... | |
xmlSetDtdDef ($dtdDef) | |
Sets dtd definition. More... | |
xmlSetStSheet ($stSheet) | |
Sets stylesheet. More... | |
xmlSetGenCmt ($genCmt) | |
Sets generated comment. More... | |
xmlEncodeData ($data) | |
Encodes text from input encoding into output encoding. More... | |
xmlFormatData ($data) | |
Indents text for better reading. More... | |
xmlFormatElement ($array) | |
Callback function for xmlFormatData; do not invoke directly. More... | |
xmlHeader () | |
Writes xml header public. More... | |
xmlStartTag ($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE) | |
Writes a starttag. More... | |
xmlEndTag ($tag) | |
Writes an endtag. More... | |
xmlComment ($comment) | |
Writes a comment. More... | |
xmlData ($data, $encode=TRUE, $escape=TRUE) | |
Writes data. More... | |
xmlElement ($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE) | |
Writes a basic element (no children, just textual content) More... | |
xmlDumpFile ($file, $format=TRUE) | |
Dumps xml document from memory into a file. More... | |
xmlDumpMem ($format=TRUE) | |
Returns xml document from memory. More... | |
appendXML ($a_str) | |
append xml string to document More... | |
xmlClear () | |
clears xmlStr public More... | |
Static Public Member Functions | |
static | _xmlEscapeData ($data) |
Escapes reserved characters. More... | |
Data Fields | |
$xmlStr | |
$version | |
$outEnc | |
$inEnc | |
$dtdDef = "" | |
$stSheet = "" | |
$genCmt = "Generated by ILIAS XmlWriter" | |
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.
Definition at line 17 of file class.ilXmlWriter.php.
ilXmlWriter::__construct | ( | $version = "1.0" , |
|
$outEnc = "utf-8" , |
|||
$inEnc = "utf-8" |
|||
) |
constructor
string | xml version |
string | output encoding |
string | input encoding public |
Definition at line 75 of file class.ilXmlWriter.php.
References $inEnc, $outEnc, and $version.
ilXmlWriter::_ilXmlWriter | ( | ) |
destructor public
Definition at line 90 of file class.ilXmlWriter.php.
|
static |
Escapes reserved characters.
string | input text |
Definition at line 132 of file class.ilXmlWriter.php.
Referenced by xmlData(), and xmlStartTag().
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().
ilXmlWriter::xmlClear | ( | ) |
clears xmlStr public
Definition at line 514 of file class.ilXmlWriter.php.
Referenced by ilWebLinkXmlWriter\init(), ilFolderXmlWriter\init(), and ilLPXmlWriter\init().
ilXmlWriter::xmlComment | ( | $comment | ) |
Writes a comment.
string | comment public |
Definition at line 385 of file class.ilXmlWriter.php.
Referenced by xmlHeader().
ilXmlWriter::xmlData | ( | $data, | |
$encode = TRUE , |
|||
$escape = TRUE |
|||
) |
Writes data.
string | data |
string | ecode data (TRUE) or not (FALSE) |
string | escape data (TRUE) or not (FALSE) public |
Definition at line 397 of file class.ilXmlWriter.php.
References $data, _xmlEscapeData(), and xmlEncodeData().
Referenced by ilContainer\_exportContainerSettings(), ilTestExportRandomQuestionSet\populateQuestionStages(), and xmlElement().
ilXmlWriter::xmlDumpFile | ( | $file, | |
$format = TRUE |
|||
) |
Dumps xml document from memory into a file.
string | file name (full path) |
boolean | indent text (TRUE) or not (FALSE) public |
Definition at line 452 of file class.ilXmlWriter.php.
References $file, $xmlStr, and xmlFormatData().
ilXmlWriter::xmlDumpMem | ( | $format = TRUE | ) |
Returns xml document from memory.
boolean | indent text (TRUE) or not (FALSE) |
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 ilAdvancedMetaDataExporter\getXmlRepresentation().
ilXmlWriter::xmlElement | ( | $tag, | |
$attrs = NULL , |
|||
$data = Null , |
|||
$encode = TRUE , |
|||
$escape = TRUE |
|||
) |
Writes a basic element (no children, just textual content)
string | tag name |
array | attributes (name => value) |
string | data |
boolean | ecode attributes' values and data (TRUE) or not (FALSE) |
boolean | escape attributes' values and data (TRUE) or not (FALSE) public |
Definition at line 423 of file class.ilXmlWriter.php.
References $data, 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(), ilSoapLearningProgressAdministration\addUserProgress(), ilExerciseXMLWriter\attachMarking(), ilContainerReferenceXmlWriter\buildTarget(), ilContainerReferenceXmlWriter\buildTitle(), ilCategoryXmlWriter\buildTranslations(), ilTestResultsToXML\exportActiveIDs(), ilTestResultsToXML\exportPassResult(), ilTestResultsToXML\exportRandomTestQuestions(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilExerciseXMLWriter\handleAssignmentFiles(), ilExerciseXMLWriter\handleAssignmentMembers(), ilTestExportRandomQuestionSet\populateCommonSettings(), ilTestExportRandomQuestionSet\populateSelectionDefinitions(), ilSoapRoleObjectXMLWriter\start(), ilForumXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilDidacticTemplateExcludeFilterPattern\toXml(), ilDidacticTemplateIncludeFilterPattern\toXml(), ilObjLinkResource\toXML(), ilLORandomTestQuestionPools\toXml(), ilLOTestAssignments\toXml(), ilMultilingualism\toXml(), ilCourseObjectiveMaterials\toXml(), ilDidacticTemplateSetting\toXml(), ilCourseObjective\toXml(), ilLOSettings\toXml(), ilLinkResourceItems\toXML(), ilAdvancedMDRecord\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilCourseObjectiveQuestion\toXml(), ilFolderXmlWriter\write(), ilContainerXmlWriter\writeCourseItemInformation(), and ilRoleXmlExport\writeRole().
ilXmlWriter::xmlEncodeData | ( | $data | ) |
Encodes text from input encoding into output encoding.
string | input text |
Definition at line 185 of file class.ilXmlWriter.php.
References $data.
Referenced by xmlData(), and xmlStartTag().
ilXmlWriter::xmlEndTag | ( | $tag | ) |
Writes an endtag.
string | tag 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(), assQuestionExport\addAnswerSpecificFeedback(), ilLPXmlWriter\addLPInformation(), assQuestionExport\addQtiMetaDataField(), ilSoapLearningProgressAdministration\addUserProgress(), ilExerciseXMLWriter\attachMarking(), ilCategoryXmlWriter\buildFooter(), ilContainerReferenceXmlWriter\buildFooter(), ilCategoryXmlWriter\buildTranslations(), ilSoapInstallationInfoXMLWriter\end(), ilTestResultsToXML\exportActiveIDs(), ilTestResultsToXML\exportPassResult(), ilTestResultsToXML\exportRandomTestQuestions(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilTestResultsToXML\getXML(), ilExerciseXMLWriter\handleAssignmentFiles(), ilExerciseXMLWriter\handleAssignmentMembers(), ilObjQuestionPool\objectToXmlWriter(), ilTestExportRandomQuestionSet\populateQuestionSetConfigXml(), ilTestExportRandomQuestionSet\populateQuestionStages(), ilTestExportRandomQuestionSet\populateSelectionDefinitions(), ilSoapRoleObjectXMLWriter\start(), ilForumXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilDidacticTemplateLocalRoleAction\toXml(), ilObjLinkResource\toXML(), ilDidacticTemplateBlockRoleAction\toXml(), ilDidacticTemplateLocalPolicyAction\toXml(), ilMultilingualism\toXml(), ilDidacticTemplateSetting\toXml(), ilCourseObjective\toXml(), ilLinkResourceItems\toXML(), ilAdvancedMDRecord\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilCourseObjectiveQuestion\toXml(), ilContainerXmlWriter\write(), ilDidacticTemplateXmlWriter\write(), ilFolderXmlWriter\write(), ilAdvancedMDRecordXMLWriter\write(), ilRoleXmlExport\write(), ilContainerXmlWriter\writeCourseItemInformation(), ilRoleXmlExport\writeRole(), ilContainerXmlWriter\writeSubitems(), and xmlElement().
ilXmlWriter::xmlFormatData | ( | $data | ) |
Indents text for better reading.
string | input text |
Definition at line 233 of file class.ilXmlWriter.php.
Referenced by xmlDumpFile(), and xmlDumpMem().
ilXmlWriter::xmlFormatElement | ( | $array | ) |
Callback function for xmlFormatData; do not invoke directly.
array | result of reg. expr. search |
Definition at line 247 of file class.ilXmlWriter.php.
References $tab.
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(), ilGroupReferenceXmlWriter\buildHeader(), ilCourseReferenceXmlWriter\buildHeader(), ilCategoryReferenceXmlWriter\buildHeader(), ilWebLinkXmlWriter\buildHeader(), ilFolderXmlWriter\buildHeader(), ilAdvancedMDRecordXMLWriter\buildHeader(), ilContainerReferenceXmlWriter\buildHeader(), ilCategoryXmlWriter\buildHeader(), ilLPXmlWriter\buildHeader(), ilContainerXmlWriter\buildHeader(), ilContObjectManifestBuilder\buildManifest(), ilTestResultsToXML\getXML(), assLongMenuExport\toXML(), assKprimChoiceExport\toXML(), assErrorTextExport\toXML(), assOrderingHorizontalExport\toXML(), assFileUploadExport\toXML(), assFlashQuestionExport\toXML(), assSingleChoiceExport\toXML(), assNumericExport\toXML(), assTextSubsetExport\toXML(), assTextQuestionExport\toXML(), assClozeTestExport\toXML(), assFormulaQuestionExport\toXML(), assImagemapQuestionExport\toXML(), assMultipleChoiceExport\toXML(), assJavaAppletExport\toXML(), assMatchingQuestionExport\toXML(), assOrderingQuestionExport\toXML(), SurveyTextQuestion\toXML(), SurveyMultipleChoiceQuestion\toXML(), SurveySingleChoiceQuestion\toXML(), SurveyMetricQuestion\toXML(), ilObjSurveyQuestionPool\toXML(), SurveyMatrixQuestion\toXML(), ilObjSurvey\toXML(), ilObjTest\toXML(), ilDidacticTemplateXmlWriter\write(), and ilRoleXmlExport\writeHeader().
ilXmlWriter::xmlSetDtdDef | ( | $dtdDef | ) |
Sets dtd definition.
string | dtd definition public |
Definition at line 101 of file class.ilXmlWriter.php.
References $dtdDef.
Referenced by ilSoapInstallationInfoXMLWriter\__buildHeader(), ilXMLResultSetWriter\__buildHeader(), ilSoapStructureObjectXMLWriter\__buildHeader(), ilUserXMLWriter\__buildHeader(), ilGroupXMLWriter\__buildHeader(), ilSoapRoleObjectXMLWriter\__buildHeader(), ilCourseXMLWriter\__buildHeader(), ilExerciseXMLWriter\__buildHeader(), ilFileXMLWriter\__buildHeader(), ilObjectXMLWriter\__buildHeader(), ilGlossaryExport\buildExportFileXML(), ilQuestionpoolExport\buildExportFileXML(), ilContObjectExport\buildExportFileXML(), ilTestExport\buildExportFileXML(), ilGroupReferenceXmlWriter\buildHeader(), ilCourseReferenceXmlWriter\buildHeader(), ilCategoryReferenceXmlWriter\buildHeader(), ilWebLinkXmlWriter\buildHeader(), ilFolderXmlWriter\buildHeader(), ilAdvancedMDRecordXMLWriter\buildHeader(), ilContainerReferenceXmlWriter\buildHeader(), ilCategoryXmlWriter\buildHeader(), ilContainerXmlWriter\buildHeader(), ilSCORM2004Asset\exportScorm(), ilObjSCORM2004LearningModule\exportScorm(), and ilRoleXmlExport\writeHeader().
ilXmlWriter::xmlSetGenCmt | ( | $genCmt | ) |
Sets generated comment.
string | generated comment public |
Definition at line 121 of file class.ilXmlWriter.php.
References $genCmt.
Referenced by ilSoapInstallationInfoXMLWriter\__buildHeader(), ilSoapStructureObjectXMLWriter\__buildHeader(), ilUserXMLWriter\__buildHeader(), ilGroupXMLWriter\__buildHeader(), ilSoapRoleObjectXMLWriter\__buildHeader(), ilCourseXMLWriter\__buildHeader(), ilExerciseXMLWriter\__buildHeader(), ilFileXMLWriter\__buildHeader(), ilObjectXMLWriter\__buildHeader(), ilGroupReferenceXmlWriter\buildHeader(), ilCourseReferenceXmlWriter\buildHeader(), ilCategoryReferenceXmlWriter\buildHeader(), ilWebLinkXmlWriter\buildHeader(), ilFolderXmlWriter\buildHeader(), ilAdvancedMDRecordXMLWriter\buildHeader(), ilContainerReferenceXmlWriter\buildHeader(), ilCategoryXmlWriter\buildHeader(), ilContainerXmlWriter\buildHeader(), and ilRoleXmlExport\writeHeader().
ilXmlWriter::xmlSetStSheet | ( | $stSheet | ) |
Sets stylesheet.
string | stylesheet public |
Definition at line 111 of file class.ilXmlWriter.php.
References $stSheet.
ilXmlWriter::xmlStartTag | ( | $tag, | |
$attrs = NULL , |
|||
$empty = FALSE , |
|||
$encode = TRUE , |
|||
$escape = TRUE |
|||
) |
Writes a starttag.
string | tag name |
array | attributes (name => value) |
boolean | tag empty (TRUE) or not (FALSE) |
boolean | ecode attributes' values (TRUE) or not (FALSE) |
boolean | escape 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(), assQuestionExport\addAnswerSpecificFeedback(), ilLPXmlWriter\addLPInformation(), assQuestionExport\addQtiMetaDataField(), ilSoapLearningProgressAdministration\addUserProgress(), ilExerciseXMLWriter\attachMarking(), ilCategoryXmlWriter\buildCategory(), ilContainerReferenceXmlWriter\buildReference(), ilCategoryXmlWriter\buildTranslations(), ilTestResultsToXML\exportActiveIDs(), ilTestResultsToXML\exportPassResult(), ilSCORM2004Asset\exportPDF(), ilObjSCORM2004LearningModule\exportPDF(), ilTestResultsToXML\exportRandomTestQuestions(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilTestResultsToXML\getXML(), ilAdvancedMetaDataExporter\getXmlRepresentation(), ilExerciseXMLWriter\handleAssignmentFiles(), ilExerciseXMLWriter\handleAssignmentMembers(), ilObjQuestionPool\objectToXmlWriter(), ilTestExportRandomQuestionSet\populateQuestionSetConfigXml(), ilTestExportRandomQuestionSet\populateQuestionStages(), ilTestExportRandomQuestionSet\populateSelectionDefinitions(), ilSoapInstallationInfoXMLWriter\start(), ilSoapRoleObjectXMLWriter\start(), ilForumXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilDidacticTemplateLocalRoleAction\toXml(), ilObjLinkResource\toXML(), ilDidacticTemplateBlockRoleAction\toXml(), ilDidacticTemplateLocalPolicyAction\toXml(), ilMultilingualism\toXml(), ilDidacticTemplateSetting\toXml(), ilCourseObjective\toXml(), ilLinkResourceItems\toXML(), ilAdvancedMDRecord\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilCourseObjectiveQuestion\toXml(), ilContainerXmlWriter\write(), ilDidacticTemplateXmlWriter\write(), ilFolderXmlWriter\write(), ilAdvancedMDRecordXMLWriter\write(), ilRoleXmlExport\write(), ilContainerXmlWriter\writeCourseItemInformation(), ilRoleXmlExport\writeRole(), ilContainerXmlWriter\writeSubitems(), and xmlElement().
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 __construct().
ilXmlWriter::$outEnc |
Definition at line 38 of file class.ilXmlWriter.php.
Referenced by __construct().
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 __construct(), and ilFileXMLWriter\start().
ilXmlWriter::$xmlStr |
Definition at line 24 of file class.ilXmlWriter.php.
Referenced by xmlDumpFile(), xmlDumpMem(), and xmlHeader().