Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/cch/www/pear/PHPDoc/xmlreader/PhpdocXMLReader.php
PEAR Repository - 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>
Version1.0beta

 

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( $target, $key, string $value, string $attributes, string $inner)

Appends some values to an array
void

xmldecode( $value)

Fields inherited from PhpdocObject

$err, $flag_output, $application, $warn

Private Field Summary

unknown

$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 optimize
it:
- PHP3 compatibility is a must
- no XML DOM
- no eval(), this can't be optimized by the compiler

Parameter
integer $start
integer $allowed_level
Returns array $data

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

See Also addToArray()

addToArray

private array addToArray( $target, $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
$target
$key
string $value
string $attributes
string $inner
Returns array $target


xmldecode

private void xmldecode( $value )

 

Parameter
$value
Returns void


Private Field Details

$filehandler

private unknown $filehandler

>>unknown<<

See Also createFileHandler()

$structvalues

private array $structvalues

>>array()<<

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


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta