Class: simple_xmlnode

Quellcode Position: Program_Root/sys_simple_xmltree.php

Class simple_xmlnode

Class Overview
Properties Summary
array   $attributes   Element attributes
array   $children   Children of active Element
string   $name   Contains name of active element
xmlnode_common   $parent   parent element

Method Summary
simple_xmlnode   simple_xmlnode()  
array   &copy()   Copy node until given level
void   deleteAttribute()   Unset given attribute
void   deleteChild()   Delete a child
void   extract()   Extracted elements until given depth
void   extractAtDepth()   Extract element at depth
void   insertChildCopy()   Insert child copy
void   insertChildNode()   Insert child node
void   insertChildText()   Insert child text
void   printEcho()   Output function
void   printHTML()   Output function
void   printOut()   Output function
void   printText()   output function
void   __construct()   Constuctor

Properties
array   $attributes [Zeile 91]

Element attributes


array   $children [Zeile 97]

Children of active Element


string   $name [Zeile 85]

Contains name of active element


xmlnode_common   $parent [Zeile 79]

parent element


Methods
Constructor simple_xmlnode  [Zeile 112]

  simple_xmlnode simple_xmlnode( mixed &$parent, mixed $name, [mixed $attr = NULL]  )



copy  [Zeile 125]

  array &copy( [$deep $deep = "-1"]  )

Copy node until given level

copy() does an infinitely deep copy, as does copy(-1); any non-negative argument tells how deep the copy should be

Parameters:
$deep   $deep:  Tiefe, die angibt, bis zu welchem Level der Knoten kopiert werde soll

API Tags:
Return:  $newCopy


deleteAttribute  [Zeile 261]

  void deleteAttribute( mixed $attKey, $attKey $this-  )

Unset given attribute

Parameters:
$attKey   $this-:  >attributes key which will be unseted

API Tags:
Access:  public


deleteChild  [Zeile 240]

  void deleteChild( integer $killPlace  )

Delete a child

kills the child at the location $killPlace (or at the nearest location to it), and fills in the leftover hole

Parameters:
integer   $killPlace: 

API Tags:
Access:  public


extract  [Zeile 362]

  void extract( array &$resultArray, string &$template, [integer $depth = 0]  )

Extracted elements until given depth

extracts references to any node with the same name and attribute values as the template

Parameters:
array   &$resultArray:  ???
string   $template:  ???
integer   $depth:  Die Tiefe, bis in welche die Herausziehung vollzogen werden soll


extractAtDepth  [Zeile 409]

  void extractAtDepth( array &$resultArray, string $template, integer $targetDepth  )

Extract element at depth

extracts only those nodes at a specific depths, and returns

a flat array of those nodes, rather than a 2xN array i.e. ["nodes"][N] + ["depth"][N]

Parameters:
array   &$resultArray:  ???
string   $template:  ???
integer   $targetDepth:  Zieltieft, also in welcher Tiefe extrahiert werden soll


insertChildCopy  [Zeile 183]

  void insertChildCopy( ref &$newChild, [string $newPlace = "-1"]  )

Insert child copy

default for inserting a child node is appending; any non-negative integer passed in will put child as close to that location as possible.*

Parameters:
ref   &$newChild:  xml node reference
string   $newPlace: 


insertChildNode  [Zeile 153]

  void insertChildNode( ref &$newChild, [string $newPlace = "-1"]  )

Insert child node

default for inserting a child node is appending; any non-negative integer passed in will put child as close to that location as possible.

Parameters:
ref   &$newChild:  xml node reference
string   $newPlace: 


insertChildText  [Zeile 215]

  void insertChildText( $newChild $newChild, [string $newPlace = "-1"]  )

Insert child text

default for inserting a child node is appending; any non-negative integer passed in will put child as close to that location as possible.

Parameters:
string   $newPlace:  optional, default value "-1"
$newChild   $newChild: 

API Tags:
Access:  public


printEcho  [Zeile 271]

  void printEcho( )

Output function

prints so that formatted XML is visible in Page Source


API Tags:
Access:  public


printHTML  [Zeile 283]

  void printHTML( )

Output function

prints so that formatted XML is visible in browser display


API Tags:
Access:  public


printOut  [Zeile 304]

  void printOut( string &$xmlString, [string $indent = '']  )

Output function

Parameters:
string   &$xmlString:  Referenz auf einen XML-String
string   $indent:  Einrueckung in Leerstellen; bsp.: " ".


printText  [Zeile 340]

  void printText( string &$xmlString  )

output function

Parameters:
string   &$xmlString:  Referenz auf einen XML-String


__construct  [Zeile 102]

  void __construct( mixed &$parent, mixed $name, [mixed $attr = NULL]  )

Constuctor