schmittjoh/JMSSerializerBundle — Issue #59: Support for serializing arrays to XML
Author: Seldaek
Created: 2011-12-18 12:16:27+00:00
State: open

Example of desired output:

Granted that `$game` is an object.

```php
$data = array(
'game' => $game,
'players' => array(
'Alice',
'Bob',
),
);
```

```xml

3
Foo

Alice

Bob

```

To name xml elements, distinction between lists (players) and maps (the top-level array) could be done by using `isset($array[0])`, or alternatively `ìs_numeric($key)` on every key to know if it should be called `$key` or `entry`.