note 83242 added to class.xmlreader

From: Date: Fri, 16 May 2008 12:09:34 +0000
Subject: note 83242 added to class.xmlreader
Groups: php.notes 
Request: Send a blank email to php-notes+get-139443@lists.php.net to get a copy of this message
Next version xml2assoc (real assoc): function xml2assoc(&$xml) { $assoc = NULL; while($xml->read()){ switch ($xml->nodeType) { case XMLReader::END_ELEMENT: return $assoc; case XMLReader::ELEMENT: $atr = array(); if($xml->hasAttributes) while($xml->moveToNextAttribute()) $atr[$xml->name] = $xml->value; $assoc[$xml->name][] = array('name' => $xml->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: 80.243.65.155 ---- Manual Page -- http://www.php.net/manual/en/class.xmlreader.php Edit -- https://master.php.net/note/edit/83242 Del: integrated -- https://master.php.net/note/delete/83242/integrated Del: useless -- https://master.php.net/note/delete/83242/useless Del: bad code -- https://master.php.net/note/delete/83242/bad+code Del: spam -- https://master.php.net/note/delete/83242/spam Del: non-english -- https://master.php.net/note/delete/83242/non-english Del: in docs -- https://master.php.net/note/delete/83242/in+docs Del: other reasons-- https://master.php.net/note/delete/83242 Reject -- https://master.php.net/note/reject/83242 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139443) next »