Issue Feature Closed

#15342t3div_lib::array2xml problem when encounters multiples of the same tag

Brice BERNARD 12/31/05, 17:31 updated 08/29/11, 13:59

Description

when parsing this xml code :

<?xml version="1.0"?>
<moldb></moldb>

<molecule>
<name>Alanine</name>
<symbol>ala</symbol>
rmtokb37bb9670ab61a0dc0
<type>hydrophobic</type>
</molecule>
<molecule>
<name>Lysine</name>
<symbol>lys</symbol>
rmtokb37bb9670ab61a0dc1
<type>charged</type>
</molecule>

we have this array :

Array
(
[molecule] => Array
(
[name] => Lysine
[symbol] => lys
[code] => K
[type] => charged
)
)

The tags are overwriting it would be great to obtain this instead (when multiple tags…) :

Array
(
[molecule] => Array
[0] =>
(
[name] => Alanine
[symbol] => ala
[code] => A
[type] => hydrophobic
)
[1] =>
(
[name] => Lysine
[symbol] => lys
[code] => K
[type] => charged
)
)

(issue imported from #M2149)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.