PHPDoc
[ class tree: PHPDoc ] [ index: PHPDoc ] [ all elements ]

Class: PhpdocXMLWriter

Source Location: /PHPDoc-0.1.0/xmlwriter/PhpdocXMLWriter.php

Class Overview

PhpdocObject
   |
   --PhpdocXMLWriter

Creates XML documents.


Author(s):

Version:

  • $Id: PhpdocXMLWriter.php,v 1.1 2001/05/08 04:48:47 sbergmann Exp $

Variables

Methods


Inherited Variables

Inherited Methods

Class: PhpdocObject

PhpdocObject::introspection()
Dumps objects and arrays.
PhpdocObject::nameToUrl()
Encodes an element name so that it can be used as a file name.
PhpdocObject::out()
Print a string and flush the output buffer
PhpdocObject::outl()
Print a string, the specified HTML line break sign and flushes the output buffer
PhpdocObject::setFlagOutput()
Sets the output flag - if set to true out() and outl() print messages

Class Details

[line 11]
Creates XML documents.

PHPDoc uses this helper class to generate xml documents. It's not much what this class can do but it provides some simple functions to handle attributes and hides file handling tasks.



[ Top ]


Class Variables

$fileHandler =

[line 33]

Filehandler used for IO operations

Type:   object PhpdocFilehandler


[ Top ]

$warn =

[line 25]

PHPDoc Warning object

Type:   object PhpdocWarning
Overrides:   Array


[ Top ]

$xml =  ""

[line 18]

Generated XML document.

Type:   string


[ Top ]



Method Detail

PhpdocXMLWriter (Constructor)   [line 40]

PhpdocXMLWriter PhpdocXMLWriter( )

Creates a new PhpdocFileHandler
  • See: $filehandler

[ Top ]

addElement   [line 148]

void addElement( string $name, [string $value = ""], [array $attribs = ""])

Adds a complete xml container to the generated xml document.

Parameters:

string   $name     Elementname (tagname)
string   $value     Value
array   $attribs     Attributes

[ Top ]

addXML   [line 58]

void addXML( string $xml)

Adds xml to the generated xml.
  • Access: public

Parameters:

string   $xml     xml to append

[ Top ]

endElement   [line 135]

void endElement( string $name)

Adds a closing xml tag to the generated xml document.

Parameters:

string   $name     Elementname (tagname)

[ Top ]

export   [line 70]

void export( string $filename)

Saves the xml to the specified file.
  • Access: public

Parameters:

string   $filename     Name of the target file

[ Top ]

free   [line 48]

void free( )

Clears the internal xml data buffer so that a new document can be passed to the object.
  • Access: public

[ Top ]

startElement   [line 87]

void startElement( string $name, [string $value = ""], [array $attribs = ""], [boolean $close = false])

Adds an open (or single) xml tag to the generated xml.

Use this function to add new elements/tags to the xml document. The tagname and all attributenames will be converted to lowercase.


Parameters:

string   $name     elementname (tagname)
string   $value     value of the container: <name>value
array   $attribs     Array of attributes: $attribs[n][type] = boolean|cdata, $attribs[n][value] = value
boolean   $close     Flag indication that you want an empty tag like <name/>.

[ Top ]

xmlencode   [line 168]

string xmlencode( string $value)

Encodes XML values.

Parameters:

string   $value     

[ Top ]


Documentation generated on Fri, 30 Apr 2004 21:28:02 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.