Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: c:/www/apache/doc2//xmlreader/PhpdocXMLReader.php
PHPDOC 2000/12/03 - PHPDoc

PhpdocXMLReader

PhpdocObject
   |
  +-- PhpdocXMLReader

Reads XML documents into a multi dimensional Array.

 

private class PhpdocXMLReader extends PhpdocObject

Reads XML documents into a multi dimensional Array.

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

 

Methods inherited from PhpdocObject

setflagoutput, out, nametourl, outl, introspection

Public Method Summary

void

parse(string $filename)

Parses a given XML file and returns the data as a hash.

Private Method Summary

void

createFilehandler()

Creates a PhpdocFileHandler object and saves it to $filehandler if it does not already exist.
void

stripCloseFromStructvalues()

Strips all values out of the xml_parse_intro_struct() values array with the type "open".
array

importXML([ integer $start, integer $allowed_level ])

Converts an xml_parse_into_struct value array to an array that's simmilar to phpdocs internal arrays.
array

addToArray(array $target, string $key, [ string $value, string $attributes, string $inner ])

Appends some values to an array
string

xmldecode(string $value)

Replaces some basic entities with their character counterparts.

Fields inherited from PhpdocObject

$err, $application, $warn, $flag_output

Private Field Summary

object PhpdocFileHandler

$filehandler

PHPDocFileHandler object.
array

$structvalues

Values array from xml_parse_into_struct().

Public Method Details

parse

public void parse( string $filename )

  Parses a given XML file and returns the data as a hash.
Please do not ask me for a in detail explanation of how it is done,the documentation is in the source...

Parameter
string $filename
Name of the xml document
Returns void

Throws PhpdocError
See Also importXML()

Private Method Details

createFilehandler

private void createFilehandler( )

  Creates a PhpdocFileHandler object and saves it to $filehandler if it does not already exist.

Returns void

See Also $filehandler

stripCloseFromStructvalues

private void stripCloseFromStructvalues( )

  Strips all values out of the xml_parse_intro_struct() values array with the type "open".

Returns void

See Also $structvalues

importXML

private array importXML( [ integer $start, integer $allowed_level ] )

  Converts an xml_parse_into_struct value array to an array that's simmilar to phpdocs internal arrays.
Well, don't ask me to explain this hack. Just take it as it. For those who want to unterstand and optimizeit:- PHP3 compatibility is a must- no XML DOM- no eval(), this can't be optimized by the compiler

Parameter
integer $start = >>0<<
integer $allowed_level = >>1<<
Returns array $data

[0] = daten, $data[1] = some index value used for the recursion

See Also addToArray()

addToArray

private array addToArray( array $target, string $key, [ string $value, string $attributes, string $inner ] )

  Appends some values to an array
Well, don't ask me; just improve it with the remarks on buildXMLResult()

Parameter
array $target
string $key
string $value = >>""<<
string $attributes = >>""<<
string $inner = >>""<<
Returns array $target


xmldecode

private string xmldecode( string $value )

  Replaces some basic entities with their character counterparts.

Parameter
string $value
to decode
Returns string

Decoded string


Private Field Details

$filehandler

private object PhpdocFileHandler $filehandler

>><<

PHPDocFileHandler object.

See Also createFileHandler()

$structvalues

private array $structvalues

>>array()<<

Values array from xml_parse_into_struct().

See Also parse(), stripCloseFromStructvalues(), importXML()


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta