ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSoapStructureObjectXMLWriter Class Reference

XML writer class. More...

+ Inheritance diagram for ilSoapStructureObjectXMLWriter:
+ Collaboration diagram for ilSoapStructureObjectXMLWriter:

Public Member Functions

 __construct ()
 constructor More...
 
 setStructureObject (& $structureObject)
 
 start ()
 
 getXML ()
 
 __buildHeader ()
 
 __buildFooter ()
 
- Public Member Functions inherited from ilXmlWriter
 __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...
 

Data Fields

 $ilias
 
 $xml
 
 $structureObject
 
 $user_id = 0
 
- Data Fields inherited from ilXmlWriter
 $xmlStr
 
 $version
 
 $outEnc
 
 $inEnc
 
 $dtdDef = ""
 
 $stSheet = ""
 
 $genCmt = "Generated by ILIAS XmlWriter"
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlWriter
static _xmlEscapeData ($data)
 Escapes reserved characters. More...
 

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
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id
class.ilObjectXMLWriter.php,v 1.3 2005/11/04 12:50:24 smeyer Exp

Definition at line 19 of file class.ilSoapStructureObjectXMLWriter.php.

Constructor & Destructor Documentation

◆ __construct()

ilSoapStructureObjectXMLWriter::__construct ( )

constructor

Parameters
stringxml version
stringoutput encoding
stringinput encoding public

Definition at line 33 of file class.ilSoapStructureObjectXMLWriter.php.

References $ilias, and $ilUser.

34  {
35  global $ilias,$ilUser;
36 
37  parent::__construct();
38 
39  $this->ilias =& $ilias;
40  $this->user_id = $ilUser->getId();
41  }
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...

Member Function Documentation

◆ __buildFooter()

ilSoapStructureObjectXMLWriter::__buildFooter ( )

Definition at line 80 of file class.ilSoapStructureObjectXMLWriter.php.

Referenced by start().

81  {
82 
83  }
+ Here is the caller graph for this function:

◆ __buildHeader()

ilSoapStructureObjectXMLWriter::__buildHeader ( )

Definition at line 70 of file class.ilSoapStructureObjectXMLWriter.php.

References ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), and ilXmlWriter\xmlSetGenCmt().

Referenced by start().

71  {
72  $this->xmlSetDtdDef("<!DOCTYPE RepositoryObject PUBLIC \"-//ILIAS//DTD UserImport//EN\" \"".ILIAS_HTTP_PATH."/xml/ilias_soap_structure_object_3_7.dtd\">");
73  $this->xmlSetGenCmt("Internal Structure Information of Repository Object");
74  $this->xmlHeader();
75 
76 
77  return true;
78  }
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
xmlHeader()
Writes xml header public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getXML()

ilSoapStructureObjectXMLWriter::getXML ( )

Definition at line 64 of file class.ilSoapStructureObjectXMLWriter.php.

References ilXmlWriter\xmlDumpMem().

65  {
66  return $this->xmlDumpMem(FALSE);
67  }
xmlDumpMem($format=TRUE)
Returns xml document from memory.
+ Here is the call graph for this function:

◆ setStructureObject()

ilSoapStructureObjectXMLWriter::setStructureObject ( $structureObject)

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

References $structureObject.

45  {
46  $this->structureObject = & $structureObject;
47  }

◆ start()

ilSoapStructureObjectXMLWriter::start ( )

Definition at line 50 of file class.ilSoapStructureObjectXMLWriter.php.

References __buildFooter(), and __buildHeader().

51  {
52  if (!is_object($this->structureObject))
53  return false;
54 
55  $this->__buildHeader();
56 
57  $this->structureObject->exportXML ($this);
58 
59  $this->__buildFooter();
60 
61  return true;
62  }
+ Here is the call graph for this function:

Field Documentation

◆ $ilias

ilSoapStructureObjectXMLWriter::$ilias

Definition at line 21 of file class.ilSoapStructureObjectXMLWriter.php.

Referenced by __construct().

◆ $structureObject

ilSoapStructureObjectXMLWriter::$structureObject

Definition at line 23 of file class.ilSoapStructureObjectXMLWriter.php.

Referenced by setStructureObject().

◆ $user_id

ilSoapStructureObjectXMLWriter::$user_id = 0

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

◆ $xml

ilSoapStructureObjectXMLWriter::$xml

Definition at line 22 of file class.ilSoapStructureObjectXMLWriter.php.


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