Index: branches/5.2.x/core/units/helpers/controls/minput_helper.php =================================================================== diff -u -N -r15145 -r15158 --- branches/5.2.x/core/units/helpers/controls/minput_helper.php (.../minput_helper.php) (revision 15145) +++ branches/5.2.x/core/units/helpers/controls/minput_helper.php (.../minput_helper.php) (revision 15158) @@ -1,6 +1,6 @@ Application->recallObject('kXMLHelper'); - /* @var $xml_helper kXMLHelper */ + $records = Array (); + $records_node = simplexml_load_string($xml); - $root_node =& $xml_helper->Parse($xml); - $root_node =& $root_node->FindChild('records'); - - if ( !$root_node || !$root_node->firstChild ) { + if ( $records_node === false ) { return false; } - $records = Array (); - $current_node = $root_node->firstChild; - /* @var $current_node kXMLNode */ - - do { + foreach ($records_node as $record_node) { $record = Array (); - $sub_node =& $current_node->firstChild; - /* @var $current_node kXMLNode */ - do { - $record[ $sub_node->Attributes['NAME'] ] = $sub_node->Data; - } while ( ($sub_node =& $sub_node->NextSibling()) ); + foreach ($record_node as $field_node) { + $record[(string)$field_node['name']] = (string)$field_node; + } $records[] = $record; - } while ( ($current_node =& $current_node->NextSibling()) ); + } return $records; }