Hi,
since updating to cake 1.2. I have been having problems with the xml
helper. This ticket (https://trac.cakephp.org/ticket/6538) seems to
fix a bug, but I still have the following problem. If I have a data
structure like this:
Array
(
[result] => Array
(
[vouchercategories] => Array
(
[0] => Array
(
[Vouchercategory] => Array
(
[id] => 1
[parent_id] => 0
[name] => Essen & Trinken
)
)
[1] => Array
(
[Vouchercategory] => Array
(
[id] => 2
[parent_id] => 0
[name] => Kultur
)
)
)
[remembered_vouchers] => Array
(
[0] => Array
(
[Voucher] => Array
(
[id] => 15
)
)
[1] => Array
(
[Voucher] => Array
(
[id] => 16
)
)
)
)
)
and I do a xml->serialize($data, array('format' => 'tags') I get this:
<result>
<vouchercategories>
<vouchercategory>
<id>1</id>
<parent_id/>
<name>Essen & Trinken</name>
</vouchercategory>
<_name_/>
</vouchercategories>
<vouchercategories>
<vouchercategory>
<id>2</id>
<parent_id/>
<name>Kultur</name>
</vouchercategory>
<_name_/>
</vouchercategories>
<remembered_vouchers>
<voucher>
<id>15</id>
</voucher>
<_name_/>
</remembered_vouchers>
<remembered_vouchers>
<voucher>
<id>16</id>
</voucher>
<_name_/>
</remembered_vouchers>
</result>
instead of an expected
<result>
<vouchercategories>
<vouchercategory>
<id>1</id>
<parent_id/>
<name>Essen & Trinken</name>
</vouchercategory>
<vouchercategory>
<id>2</id>
<parent_id/>
<name>Kultur</name>
</vouchercategory>
</vouchercategories>
<remembered_vouchers>
<voucher>
<id>15</id>
</voucher>
<voucher>
<id>16</id>
</voucher>
</remembered_vouchers>
</result>
Am I doing something wrong here, or is this a bug?
Cheers,
tobi_one
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---