cvs: pear /Config/Config/Container xml.php

From: Date: Mon, 10 Sep 2001 11:22:23 +0000
Subject: cvs: pear /Config/Config/Container xml.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-825@lists.php.net to get a copy of this message
chregu Mon Sep 10 07:22:23 2001 EDT Modified files: /pear/Config/Config/Container xml.php Log: check for KeyAttribute was in the wrong place Index: pear/Config/Config/Container/xml.php diff -u pear/Config/Config/Container/xml.php:1.4 pear/Config/Config/Container/xml.php:1.5 --- pear/Config/Config/Container/xml.php:1.4 Mon Sep 10 04:07:35 2001 +++ pear/Config/Config/Container/xml.php Mon Sep 10 07:22:23 2001 @@ -1,4 +1,4 @@ - <?php +<?php //+----------------------------------------------------------------------+ // | PHP version 4.0 | //+----------------------------------------------------------------------+ @@ -101,7 +101,14 @@ { if (XML_ELEMENT_NODE == $value->type) { + //if feature KeyAttribute is set and the name is an attribute in the xml, take this as key for the array + if ($this->feature["KeyAttribute"] && $value->get_attribute($this->feature["KeyAttribute"])) + { + $value->{$this->tagname} = $value->get_attribute($this->feature["KeyAttribute"]); + } + $this->addAttributes($value,$parent); + if ($value->children()) { $this->parseElement($value,$parent."/".$value->{$this->tagname}); @@ -125,11 +132,6 @@ if ($parent=="") { //this is only for the root element $parentslash ="/"; - } - //if feature KeyAttribute is set and the name is an attribute in the xml, take this as key for the array - if ($this->feature["KeyAttribute"] && $element->get_attribute($this->feature["KeyAttribute"])) - { - $element->{$this->tagname} = $element->get_attribute($this->feature["KeyAttribute"]); }

« previous php.pear.cvs (#825) next »