Writing an app in adobe flex 3 getting data from http://drupal.org/project/services module (and amfphp)
Get data from services module as array calling taxonomy_select_nodes
Using simpleXMLEncoder.encodeValue() to convert result array into XML
resulting XML is incorrectly formatted:
<root>
<item>
<some nodes>
<taxonomy>
<25>
<description/>
<name>who</name>
<tid>25</tid>
<vid>5</vid>
<weight>0</weight>
</25>
<4>
<description/>
<name>Institutional Changes</name>
<tid>4</tid>
<vid>1</vid>
<weight>-10</weight>
</4>
</taxonomy>
</some nodes>
</item>
</root>"<25>" is an actual tid
"<4>" is an actual vid
The 4 and 25 are already included in the XML. These nodes should be named the same word/identifier so that they can be referenced programmatically.
This is invalid XML structure as these nodes should have a common identifier.
We are thinking we should submit a patch to taxonomy.module to correct this problem
But, as far we can see, this would actually require an extensive rewrite of the whole taxonomy.module
We may end up doing this locally, but would there be interest in us submitting this patch for actual inclusion in drupal core itself?
(repost of http://drupal.org/node/318730 to here for feedback)
Or, question for Services group: how would you solve this problem?
