ILIAS
Release_4_0_x_branch Revision 61816
|
XML writer class. More...
Public Member Functions | |
ilExerciseXMLWriter () | |
constructor | |
setExercise (&$exercise) | |
setAttachFileContents ($attachFileContents) | |
set attachment content mode | |
getXML () | |
__buildHeader () | |
__buildFooter () | |
setAttachMembers ($value) | |
write access to property attchMarkings | |
Public Member Functions inherited from ilXmlWriter | |
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 | |
$attachFileContents | |
$attachMembers | |
$exercise | |
Data Fields inherited from ilXmlWriter | |
$xmlStr | |
$version | |
$outEnc | |
$inEnc | |
$dtdDef = "" | |
$stSheet = "" | |
$genCmt = "Generated by ILIAS XmlWriter" |
Static Public Attributes | |
static | $CONTENT_ATTACH_NO = 0 |
static | $CONTENT_ATTACH_ENCODED = 1 |
static | $CONTENT_ATTACH_ZLIB_ENCODED = 2 |
static | $CONTENT_ATTACH_GZIP_ENCODED = 3 |
static | $STATUS_NOT_GRADED = "NOT_GRADED" |
static | $STATUS_PASSED = "PASSED" |
static | $STATUS_FAILED = "FAILED" |
Private Member Functions | |
attachMarking ($a_member) | |
attach marking tag to member |
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 20 of file class.ilExerciseXMLWriter.php.
ilExerciseXMLWriter::__buildFooter | ( | ) |
Definition at line 185 of file class.ilExerciseXMLWriter.php.
ilExerciseXMLWriter::__buildHeader | ( | ) |
Definition at line 176 of file class.ilExerciseXMLWriter.php.
References ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), and ilXmlWriter\xmlSetGenCmt().
|
private |
attach marking tag to member
array | $a_member |
Definition at line 204 of file class.ilExerciseXMLWriter.php.
References $STATUS_FAILED, $STATUS_NOT_GRADED, $STATUS_PASSED, elseif(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
ilExerciseXMLWriter::getXML | ( | ) |
Definition at line 170 of file class.ilExerciseXMLWriter.php.
References ilXmlWriter\xmlDumpMem().
ilExerciseXMLWriter::ilExerciseXMLWriter | ( | ) |
constructor
string | xml version |
string | output encoding |
string | input encoding public |
Definition at line 60 of file class.ilExerciseXMLWriter.php.
References $CONTENT_ATTACH_NO, and ilXmlWriter\ilXmlWriter().
ilExerciseXMLWriter::setAttachFileContents | ( | $attachFileContents | ) |
set attachment content mode
int | $attachFileContents |
ilExerciseException | if mode is not supported |
Definition at line 78 of file class.ilExerciseXMLWriter.php.
References $attachFileContents, $CONTENT_ATTACH_GZIP_ENCODED, $CONTENT_ATTACH_ZLIB_ENCODED, and ilExerciseException\$ID_DEFLATE_METHOD_MISMATCH.
ilExerciseXMLWriter::setAttachMembers | ( | $value | ) |
write access to property attchMarkings
boolean | $value |
Definition at line 195 of file class.ilExerciseXMLWriter.php.
ilExerciseXMLWriter::setExercise | ( | & | $exercise | ) |
Definition at line 67 of file class.ilExerciseXMLWriter.php.
References $exercise.
ilExerciseXMLWriter::$attachFileContents |
Definition at line 36 of file class.ilExerciseXMLWriter.php.
Referenced by setAttachFileContents().
ilExerciseXMLWriter::$attachMembers |
Definition at line 44 of file class.ilExerciseXMLWriter.php.
|
static |
Definition at line 24 of file class.ilExerciseXMLWriter.php.
|
static |
Definition at line 26 of file class.ilExerciseXMLWriter.php.
Referenced by setAttachFileContents().
|
static |
Definition at line 23 of file class.ilExerciseXMLWriter.php.
Referenced by ilExerciseXMLWriter().
|
static |
Definition at line 25 of file class.ilExerciseXMLWriter.php.
Referenced by setAttachFileContents().
ilExerciseXMLWriter::$exercise |
Definition at line 51 of file class.ilExerciseXMLWriter.php.
Referenced by setExercise().
|
static |
Definition at line 30 of file class.ilExerciseXMLWriter.php.
Referenced by attachMarking().
|
static |
Definition at line 28 of file class.ilExerciseXMLWriter.php.
Referenced by attachMarking(), and ilExerciseXMLParser\handlerBeginTag().
|
static |
Definition at line 29 of file class.ilExerciseXMLWriter.php.
Referenced by attachMarking(), and ilExerciseXMLParser\handlerBeginTag().