note 83574 added to class.xmlreader

From: Date: Mon, 02 Jun 2008 14:51:27 +0000
Subject: note 83574 added to class.xmlreader
Groups: php.notes 
Request: Send a blank email to php-notes+get-140067@lists.php.net to get a copy of this message
Fixes a bug in WebSee.Ru's xml2assoc function: function xml2assoc($xml) { $assoc = null; while($xml->read()){ switch ($xml->nodeType) { case XMLReader::END_ELEMENT: return $assoc; case XMLReader::ELEMENT: $name = $xml->name; $atr = array(); if($xml->hasAttributes) while($xml->moveToNextAttribute()) $atr[$xml->name] = $xml->value; $assoc[$name][] = array('name' => $name, 'attributes' => $atr, 'value' => $xml->isEmptyElement ? '' : xml2assoc($xml)); break; case XMLReader::TEXT: case XMLReader::CDATA: $assoc .= $xml->value; } } return $assoc; } ---- Server IP: 69.147.83.197 Probable Submitter: 124.81.131.40 ---- Manual Page -- http://www.php.net/manual/en/class.xmlreader.php Edit -- https://master.php.net/note/edit/83574 Del: integrated -- https://master.php.net/note/delete/83574/integrated Del: useless -- https://master.php.net/note/delete/83574/useless Del: bad code -- https://master.php.net/note/delete/83574/bad+code Del: spam -- https://master.php.net/note/delete/83574/spam Del: non-english -- https://master.php.net/note/delete/83574/non-english Del: in docs -- https://master.php.net/note/delete/83574/in+docs Del: other reasons-- https://master.php.net/note/delete/83574 Reject -- https://master.php.net/note/reject/83574 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140067) next »