Class LVU_DOMDOCUMENT

Description

Class LVU_DOMDOCUMENT

  • author: Christian Gaisberger <c.gaisberger@lvus.at>
  • copyright: (c) 2004 by Landesverlag Unternehmensservice
  • since: cg-04-07-26
  • project: Open CSP-Management

Located in /xml/LVU_DOMDOCUMENT.phpclass (line 29)


	
			
Variable Summary
 bool $debugMode
 string $gDBIDX
 object $myDom
 object $myDtd
 object $myTag
 string $xmlFile
 string $xmlWorkdir
Method Summary
 LVU_DOMDOCUMENT LVU_DOMDOCUMENT ( $xmlFile, [ $debug = FALSE])
 array getDataArray (string $key,  &$node, array &$notUsed, [boolean $debug = FALSE], DOMnode $node)
 DOMElement getRoot ()
 array getRootTags ([ $debug = FALSE])
 void getTagDescArr ([int $maxLevels = 999], [int $reqNOC = 0], [ $debug = FALSE], bool $debug @)
 void importData ([DOMnode $node = NULL], [boolean $delTab = NULL], [boolean $debug = FALSE])
 void importSubTreeData (array $parData, string $tblTag, string $rowTag,  &$node, [boolean $debug = FALSE], DOMnode $node)
 int insert_smvRow (string $smvkey, DOMNode $node, array $row, boolean $debug)
 void populateAllTagsArr ( &$tagArr, [int $maxLevels = 999], [int $reqNOC = 0], [DOMnode $node = NULL], [string $parentName = "ROOT"], [string $pPath = ""], [bool $debug = FALSE], array $arr)
 boolean populate_tmpImpArr (string $tblTag, string $rowTag, [boolean $debug = FALSE])
 void print_node ([DOMNode $node = NULL], [ $fullDebug = FALSE])
Variables
bool $debugMode = FALSE (line 58)
string $gDBIDX = "USRDB" (line 53)
  • var: key of $GLOBALS[] to the db object
object $myDom = NULL (line 41)
  • var: zum öffnen des xml files
object $myDtd = NULL (line 45)
  • var: ausgabe des dtd namen
object $myTag = NULL (line 49)
  • var: ausgabe des tagnamen
string $xmlFile = "" (line 33)
  • var: dateiname zum öffnen
string $xmlWorkdir = "" (line 37)
  • var: datei pfad
Methods
Constructor LVU_DOMDOCUMENT (line 60)
LVU_DOMDOCUMENT LVU_DOMDOCUMENT ( $xmlFile, [ $debug = FALSE])
  • $xmlFile
  • $debug
getDataArray (line 276)

gets a data array out of a node child list

each child not found in $this->tmpImpArr[$key]['COLS'] is added to $notUsed

array getDataArray (string $key,  &$node, array &$notUsed, [boolean $debug = FALSE], DOMnode $node)
  • string $key
  • DOMnode $node
  • array &$notUsed
  • boolean $debug
  • &$node
getRoot (line 83)

returns the root node of myDom

  • return: NULL in case of error
DOMElement getRoot ()
getRootTags (line 95)

gibt einen array mit dem ersten wurzel elemt zurück

array getRootTags ([ $debug = FALSE])
  • $debug
getTagDescArr (line 174)

returns an array with xml tag desc array

void getTagDescArr ([int $maxLevels = 999], [int $reqNOC = 0], [ $debug = FALSE], bool $debug @)
  • int $maxLevels: (999 = unlimited)
  • int $reqNOC: see THIS::populateAllTagsArr
  • bool $debug @: returns array
  • $debug
importData (line 370)

imports the data of the xml file

void importData ([DOMnode $node = NULL], [boolean $delTab = NULL], [boolean $debug = FALSE])
  • DOMnode $node
  • boolean $delTab
  • boolean $debug
importSubTreeData (line 328)

imports a subtree

  • since: pk-04-08-10
void importSubTreeData (array $parData, string $tblTag, string $rowTag,  &$node, [boolean $debug = FALSE], DOMnode $node)
  • array $parData
  • string $tblTag
  • string $rowTag
  • DOMnode $node
  • boolean $debug
  • &$node
insert_smvRow (line 245)

inserts single multivalue tag

for each child a db replace statement is executed returns the number of rows processed

  • since: pk-04-10-20
int insert_smvRow (string $smvkey, DOMNode $node, array $row, boolean $debug)
  • string $smvkey
  • DOMNode $node
  • array $row
  • boolean $debug
populateAllTagsArr (line 127)

returns an array of tag descriptions

use $reqNOC = 2 (require number of children) to get only nodes which are parent of a complex element

  • todo: $reqNOC may fail for complex nodes which consists of only on complex parent
void populateAllTagsArr ( &$tagArr, [int $maxLevels = 999], [int $reqNOC = 0], [DOMnode $node = NULL], [string $parentName = "ROOT"], [string $pPath = ""], [bool $debug = FALSE], array $arr)
  • array $arr
  • DOMnode $node
  • int $maxLevels: (999 = unlimited)
  • int $reqNOC
  • string $parentName
  • string $pPath: path to root (exmpl TBL>ROW>COL)
  • bool $debug
  • &$tagArr
populate_tmpImpArr (line 209)

populates a tmpImpArr element

boolean populate_tmpImpArr (string $tblTag, string $rowTag, [boolean $debug = FALSE])
  • string $tblTag
  • string $rowTag
  • boolean $debug
print_node (line 435)

echos a node used for debuging

void print_node ([DOMNode $node = NULL], [ $fullDebug = FALSE])
  • DOMNode $node
  • $fullDebug

Documentation generated on Thu, 08 Jan 2009 17:44:35 +0100 by phpDocumentor 1.4.0a2