ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 81 of file class.ilSoapStructureObjectXMLWriter.php.

Referenced by start().

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

◆ __buildHeader()

ilSoapStructureObjectXMLWriter::__buildHeader ( )

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

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

Referenced by start().

72  {
73  $this->xmlSetDtdDef("<!DOCTYPE RepositoryObject PUBLIC \"-//ILIAS//DTD UserImport//EN\" \"" . ILIAS_HTTP_PATH . "/xml/ilias_soap_structure_object_3_7.dtd\">");
74  $this->xmlSetGenCmt("Internal Structure Information of Repository Object");
75  $this->xmlHeader();
76 
77 
78  return true;
79  }
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 65 of file class.ilSoapStructureObjectXMLWriter.php.

References ilXmlWriter\xmlDumpMem().

66  {
67  return $this->xmlDumpMem(false);
68  }
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 
56  $this->__buildHeader();
57 
58  $this->structureObject->exportXML($this);
59 
60  $this->__buildFooter();
61 
62  return true;
63  }
+ 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: