ILIAS
eassessment Revision 61809
|
XML writer class. More...
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" |
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::_ilXmlWriter | ( | ) |
destructor public
Definition at line 90 of file class.ilXmlWriter.php.
ilXmlWriter::_xmlEscapeData | ( | $data | ) |
Escapes reserved characters.
string | input text |
Definition at line 132 of file class.ilXmlWriter.php.
References $data.
Referenced by xmlData(), and xmlStartTag().
ilXmlWriter::appendXML | ( | $a_str | ) |
append xml string to document
Definition at line 504 of file class.ilXmlWriter.php.
Referenced by ilCourseXMLWriter\__buildMetaData(), and ilObjLinkResource\toXML().
ilXmlWriter::ilXmlWriter | ( | $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.
Referenced by ilAdvancedMDRecordXMLWriter\__construct(), ilCourseXMLWriter\ilCourseXMLWriter(), ilExerciseXMLWriter\ilExerciseXMLWriter(), ilFileXMLWriter\ilFileXMLWriter(), ilGroupXMLWriter\ilGroupXMLWriter(), ilMD2XML\ilMD2XML(), ilnetucateXMLAPI\ilnetucateXMLAPI(), ilObjectXMLWriter\ilObjectXMLWriter(), ilSoapInstallationInfoXMLWriter\ilSoapInstallationInfoXMLWriter(), ilSoapRoleObjectXMLWriter\ilSoapRoleObjectXMLWriter(), ilSoapStructureObjectXMLWriter\ilSoapStructureObjectXMLWriter(), ilUserXMLWriter\ilUserXMLWriter(), and ilXMLResultSetWriter\ilXMLResultSetWriter().
ilXmlWriter::xmlClear | ( | ) |
clears xmlStr public
Definition at line 513 of file class.ilXmlWriter.php.
Referenced by ilnetucateXMLAPI\addClass(), ilnetucateXMLAPI\addCourse(), ilnetucateXMLAPI\addUser(), ilnetucateXMLAPI\addUserOLD(), ilnetucateXMLAPI\editClass(), ilnetucateXMLAPI\editCourse(), ilnetucateXMLAPI\editUser(), ilnetucateXMLAPI\findClass(), ilnetucateXMLAPI\findCourseClasses(), ilnetucateXMLAPI\findRegisteredUsersByRole(), ilnetucateXMLAPI\findUser(), ilWebLinkXmlWriter\init(), ilFolderXmlWriter\init(), ilnetucateXMLAPI\joinClass(), ilnetucateXMLAPI\registerUser(), ilnetucateXMLAPI\removeClass(), ilnetucateXMLAPI\removeCourse(), ilnetucateXMLAPI\removeUser(), ilnetucateXMLAPI\unregisterUser(), and ilnetucateXMLAPI\userLogin().
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 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 |
Reimplemented in ilTestResultsToXML.
Definition at line 451 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) |
Reimplemented in ilTestResultsToXML.
Definition at line 486 of file class.ilXmlWriter.php.
References $xmlStr, and xmlFormatData().
Referenced by ilXMLResultSetWriter\getXML(), ilSoapInstallationInfoXMLWriter\getXML(), ilMD2XML\getXML(), ilSoapStructureObjectXMLWriter\getXML(), ilUserXMLWriter\getXML(), ilGroupXMLWriter\getXML(), ilSoapRoleObjectXMLWriter\getXML(), ilCourseXMLWriter\getXML(), ilObjectXMLWriter\getXML(), ilExerciseXMLWriter\getXML(), ilFileXMLWriter\getXML(), and ilnetucateXMLAPI\sendRequest().
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\__appendOperations(), ilXMLResultSetWriter\__appendRow(), ilObjectXMLWriter\__appendTimeTargets(), ilGroupXMLWriter\__buildAdmin(), ilSoapInstallationInfoXMLWriter\__buildClient(), ilXMLResultSetWriter\__buildColSpecs(), ilSoapInstallationInfoXMLWriter\__buildInstallationInfo(), ilGroupXMLWriter\__buildMember(), ilCourseXMLWriter\__buildObject(), ilGroupXMLWriter\__buildRegistration(), ilCourseXMLWriter\__buildSetting(), ilGroupXMLWriter\__buildTitleDescription(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilExerciseXMLWriter\attachMarking(), ilTestResultsToXML\exportActiveIDs(), ilTestResultsToXML\exportPassResult(), ilTestResultsToXML\exportResultCache(), ilTestResultsToXML\exportTestQuestions(), ilTestResultsToXML\exportTestResults(), ilTestResultsToXML\exportTestSequence(), ilTestResultsToXML\exportTestSolutions(), ilTestResultsToXML\exportTestTimes(), ilExerciseXMLWriter\handleAssignmentFiles(), ilSoapRoleObjectXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilObjLinkResource\toXML(), ilAdvancedMDRecord\toXML(), ilLinkResourceItems\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilFolderXmlWriter\write(), and ilContainerXmlWriter\writeCourseItemInformation().
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(), ilXMLResultSetWriter\__appendRow(), ilObjectXMLWriter\__appendTimeTargets(), ilCourseXMLWriter\__buildAdmin(), ilSoapInstallationInfoXMLWriter\__buildClient(), ilXMLResultSetWriter\__buildColSpecs(), ilSoapInstallationInfoXMLWriter\__buildFooter(), ilXMLResultSetWriter\__buildFooter(), ilUserXMLWriter\__buildFooter(), ilSoapRoleObjectXMLWriter\__buildFooter(), ilGroupXMLWriter\__buildFooter(), ilObjectXMLWriter\__buildFooter(), ilCourseXMLWriter\__buildFooter(), ilSoapInstallationInfoXMLWriter\__buildInstallationInfo(), ilCourseXMLWriter\__buildMember(), ilCourseXMLWriter\__buildObject(), ilGroupXMLWriter\__buildRegistration(), ilXMLResultSetWriter\__buildRows(), ilCourseXMLWriter\__buildSetting(), ilCourseXMLWriter\__buildSubscriber(), ilCourseXMLWriter\__buildTutor(), ilCourseXMLWriter\__buildWaitingList(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilAdvancedMDValues\_appendXMLByObjId(), ilnetucateXMLAPI\addClass(), ilnetucateXMLAPI\addCourse(), ilnetucateXMLAPI\addUser(), ilnetucateXMLAPI\addUserOLD(), ilExerciseXMLWriter\attachMarking(), 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(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilObjLinkResource\toXML(), ilAdvancedMDRecord\toXML(), ilLinkResourceItems\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilnetucateXMLAPI\unregisterUser(), ilnetucateXMLAPI\uploadPicture(), ilnetucateXMLAPI\userLogin(), ilContainerXmlWriter\write(), ilFolderXmlWriter\write(), ilAdvancedMDRecordXMLWriter\write(), ilContainerXmlWriter\writeCourseItemInformation(), ilContainerXmlWriter\writeSubitems(), and xmlElement().
ilXmlWriter::xmlFormatData | ( | $data | ) |
Indents text for better reading.
string | input text |
Reimplemented in ilnetucateXMLAPI.
Definition at line 233 of file class.ilXmlWriter.php.
References $data.
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(), ilnetucateXMLAPI\addClass(), ilnetucateXMLAPI\addCourse(), ilnetucateXMLAPI\addUser(), ilnetucateXMLAPI\addUserOLD(), ilContObjectExport\buildExportFilePDF(), ilWebLinkXmlWriter\buildHeader(), ilFolderXmlWriter\buildHeader(), ilAdvancedMDRecordXMLWriter\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(), ilTestExportQTI\toXML(), ilTestExportResults\toXML(), assErrorTextExport\toXML(), assFileUploadExport\toXML(), assOrderingHorizontalExport\toXML(), assFlashQuestionExport\toXML(), assSingleChoiceExport\toXML(), assTextQuestionExport\toXML(), assClozeTestExport\toXML(), assImagemapQuestionExport\toXML(), assMultipleChoiceExport\toXML(), assMatchingQuestionExport\toXML(), assTextSubsetExport\toXML(), assOrderingQuestionExport\toXML(), assNumericExport\toXML(), assJavaAppletExport\toXML(), SurveyTextQuestion\toXML(), SurveyMultipleChoiceQuestion\toXML(), SurveySingleChoiceQuestion\toXML(), SurveyMetricQuestion\toXML(), ilObjSurveyQuestionPool\toXML(), SurveyMatrixQuestion\toXML(), ilObjSurvey\toXML(), ilnetucateXMLAPI\unregisterUser(), ilnetucateXMLAPI\uploadPicture(), and ilnetucateXMLAPI\userLogin().
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(), ilContObjectExport\buildExportFileXML(), ilQuestionpoolExport\buildExportFileXML(), ilGlossaryExport\buildExportFileXML(), ilTestExport\buildExportFileXML(), ilWebLinkXmlWriter\buildHeader(), ilFolderXmlWriter\buildHeader(), ilAdvancedMDRecordXMLWriter\buildHeader(), ilContainerXmlWriter\buildHeader(), ilObjSCORM2004LearningModule\exportHTML(), ilSCORM2004Sco\exportScorm(), and ilObjSCORM2004LearningModule\exportScorm().
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(), ilWebLinkXmlWriter\buildHeader(), ilFolderXmlWriter\buildHeader(), ilAdvancedMDRecordXMLWriter\buildHeader(), and ilContainerXmlWriter\buildHeader().
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 $name, _xmlEscapeData(), and xmlEncodeData().
Referenced by ilObjectXMLWriter\__appendObject(), 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(), ilCourseXMLWriter\__buildObject(), ilGroupXMLWriter\__buildRegistration(), ilXMLResultSetWriter\__buildRows(), ilCourseXMLWriter\__buildSetting(), ilCourseXMLWriter\__buildSubscriber(), ilCourseXMLWriter\__buildTutor(), ilCourseXMLWriter\__buildWaitingList(), ilUserXMLWriter\__handlePreferences(), ilUserXMLWriter\__handleUser(), ilAdvancedMDValues\_appendXMLByObjId(), ilnetucateXMLAPI\addClass(), ilnetucateXMLAPI\addCourse(), ilnetucateXMLAPI\addUser(), ilnetucateXMLAPI\addUserOLD(), ilExerciseXMLWriter\attachMarking(), ilnetucateXMLAPI\editClass(), ilnetucateXMLAPI\editCourse(), ilnetucateXMLAPI\editUser(), ilTestResultsToXML\exportActiveIDs(), ilTestResultsToXML\exportPassResult(), ilSCORM2004Sco\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(), ilExerciseXMLWriter\handleAssignmentFiles(), ilExerciseXMLWriter\handleAssignmentMembers(), ilnetucateXMLAPI\joinClass(), ilnetucateXMLAPI\registerUser(), ilnetucateXMLAPI\removeClass(), ilnetucateXMLAPI\removeCourse(), ilnetucateXMLAPI\removeUser(), ilSoapInstallationInfoXMLWriter\start(), ilSoapRoleObjectXMLWriter\start(), ilExerciseXMLWriter\start(), ilFileXMLWriter\start(), ilObjLinkResource\toXML(), ilAdvancedMDRecord\toXML(), ilLinkResourceItems\toXML(), ilAdvancedMDFieldDefinition\toXML(), ilnetucateXMLAPI\unregisterUser(), ilnetucateXMLAPI\uploadPicture(), ilnetucateXMLAPI\userLogin(), ilContainerXmlWriter\write(), ilFolderXmlWriter\write(), ilAdvancedMDRecordXMLWriter\write(), ilContainerXmlWriter\writeCourseItemInformation(), 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 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().