1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Remote communication rewrite (still in progress); Experimental XML

parser (testing phase)
This commit is contained in:
SecretR
2013-05-16 19:48:44 +03:00
parent f5a4f06791
commit a6a49b18e1
2 changed files with 137 additions and 11 deletions

View File

@@ -473,7 +473,8 @@ class xmlClass
* Advanced XML parser - handles tags with attributes and values
* properly.
* TODO - filter (see xml_convert_to_array)
*
* FIXME can't handle multi-dimensional associative arrays (e.g. <screnshots><image>...</image><image>...</image></screenshots> to screenshots[image] = array(...))
* XXX New parser in testing phase - see e_marketplace::parse()
* @param SimpleXMLElement $xml
* @param string $rec_parent used for recursive calls only
* @return array
@@ -570,7 +571,8 @@ class xmlClass
else $ret[$tag] = '';
break;
}
$count = count($xml->{$tag});
$count = $xml->{$tag}->count();
if($count >= 1) //array of elements - loop
{
for ($i = 0; $i < $count; $i++)