Hi Alex, There might be some confusion about where the escaping comes in. For example, the XML returned by the /categories/list method looks like this:
http://api.eventful.com/rest/categories/list?app_key=test_key The name field of the first category contains "Concerts & Tour Dates". As is appropriate for XML, the '&' in '&' is escaped as '&', resulting in "Concerts & Tour Dates" on the wire. Your parser (or browser) should be un-escaping that as it deserializes the XML, giving you the original "Concerts & Tour Dates" value. Here's the part that might be confusing: that name field is an HTML snippet, not text, so it also has an HTML-escaped '&'. When displayed as part of a web page, it shows up correctly as "Concerts & Tour Dates". If you're using it in another context, though, you would need to render the HTML to text. You can see the result here: http://eventful.com/sandiego/events/categories/music Your next question is probably: "Which fields are HTML snippets?" I'm working on an authoritative answer to that*, but for now you can treat any 'name', 'title', or 'description' field as an HTML snippet and it should give you the correct result. I hope that makes sense. Let me know if you have any questions. Cheers, ~chris * We get our data from many sources and export it in lots of contexts, so this is a more complex question than it might seem. On Nov 16, 2010, at 3:55 PM, Alex Matulich wrote: > Chris, just to clarify something: > When I look at a dump of the categories, I see these category names: > > Sales & Retail > Religion & Spirituality > and so on. > > Is this correct, what you intended? I'm wondering what purpose there > is to double-escape an ampersand in the output, since it is being > processed internally (in PHP or whatever) before rendering on the > client's browser. I have to do an extra internal step to un-escape the > extra one. > > -Alex
