On Tue, Jan 31, 2012 at 5:01 PM, Neil Kandalgaonkar <[email protected]> wrote:
> Is it supposed to be possible to transmit arbitrary nested data
> structures in the API? Or do the format serializers make some
> assumptions that limit what we can do?
>
> I added a change yesterday which returns a complex parse tree via the
> API. It works fine in JSON format, but in XML (depending on how I do it)
> I either get empty elements, or I get Sanitizer warnings. I was using
> the addPageSubItem() method, inherited from ApiQueryBase.
>
I wish I could go back in time to 2006 and warn Yuri that supporting
XML in the API was a really bad idea. I hate having to continue
support for XML because it limits the keys you can use in all sorts of
ways.

I can't tell you exactly what's going wrong unless you can give me a
full dump of the relevant PHP data structure that you tried to run
through the XML formatter. You may or may not be able to get away with
some indexed tag names here and there.

(Also, are you sure you really want to support WikiDOM being formatted
as XML or WDDX or ... ?)

Roan

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to