codeinchaos/restful-zend-framework — Issue #2: XML elements probably shouldn't be numbered
Author: tbrannam
Created: 2012-01-04 20:16:45+00:00
State: open

First - thanks for the hard work. It's the clearest pattern for RESTful Zend I've seen

Not sure why XML elements get set with a number, I would expect that arrays of items added to the DOM would be a the singular of the parent node. It's confusing that each result would get a different XML element name for what is actually the same data type.

actual:
<response>
<resources>
<resources_0>
<title>foobar</title>
</resources_0>
<resources_1>
<title>title</title>
</resources_1>
</resources>
</response>

expected:
<response>
<resources>
<resource>
<title>foobar</title>
</resource>
<resource>
<title>title</title>
</resource>
</resources>
</response>