Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: c:/www/apache/doc2//xmlwriter/PhpdocXMLWriter.php
PHPDOC 2000/12/03 - PHPDoc

PhpdocXMLWriter

PhpdocObject
   |
  +-- PhpdocXMLWriter

Creates XML documents.

 

private class PhpdocXMLWriter extends PhpdocObject

Creates XML documents.
PHPDoc uses this helper class to generate xml documents. It'snot much what this class can do but it provides some simplefunctions to handle attributes and hides file handling tasks.

AuthorsUlf Wendel <ulf.wendel@phpdoc.de>
Version$Id: $

 

Methods inherited from PhpdocObject

setflagoutput, out, nametourl, outl, introspection

Public Method Summary

void

PhpdocXMLWriter()

Creates a new PhpdocFileHandler
void

free()

Clears the internal xml data buffer so that a new document can be passed to the object.
void

addXML(string $xml)

Adds xml to the generated xml.
void

export(string $filename)

Saves the xml to the specified file.
void

startElement(string $name, [ string $value, string $attribs, boolean $close ])

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

endElement(string $name)

Adds a closing xml tag to the generated xml document.
void

addElement(string $name, [ string $value, string $attribs ])

Adds a complete xml container to the generated xml document.

Private Method Summary

string

xmlencode(string $value)

Encodes XML values.

Fields inherited from PhpdocObject

$err, $application, $flag_output

Private Field Summary

string

$xml

Generated XML document.
object PhpdocWarning

$warn

PHPDoc Warning object
object PhpdocFilehandler

$fileHandler

Filehandler used for IO operations

Public Method Details

PhpdocXMLWriter

public void PhpdocXMLWriter( )

  Creates a new PhpdocFileHandler

Returns void

See Also $filehandler

free

public void free( )

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

Returns void


addXML

public void addXML( string $xml )

  Adds xml to the generated xml.

Parameter
string $xml
to append
Returns void


export

public void export( string $filename )

  Saves the xml to the specified file.

Parameter
string $filename
of the target file
Returns void


startElement

public void startElement( string $name, [ string $value, string $attribs, boolean $close ] )

  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.

Parameter
string $name
(tagname)
string $value = >>""<<
of the container: <name>value
string $attribs = >>""<<
of attributes: $attribs[n][type] = boolean|cdata, $attribs[n][value] = value
boolean $close = >>false<<
indication that you want an empty tag like <name/>.
Returns void

See Also endElement()

endElement

public void endElement( string $name )

  Adds a closing xml tag to the generated xml document.

Parameter
string $name
(tagname)
Returns void

See Also startElement()

addElement

public void addElement( string $name, [ string $value, string $attribs ] )

  Adds a complete xml container to the generated xml document.

Parameter
string $name
(tagname)
string $value = >>""<<
string $attribs = >>""<<
Returns void

See Also startElement(), endElement()

Private Method Details

xmlencode

private string xmlencode( string $value )

  Encodes XML values.

Parameter
string $value
Returns string $value


Private Field Details

$xml

private string $xml

>>""<<

Generated XML document.


$warn

private object PhpdocWarning $warn

>><<

PHPDoc Warning object


$fileHandler

private object PhpdocFilehandler $fileHandler

>><<

Filehandler used for IO operations

See Also PhpdocXMLWriter()


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta