Converting xml to objects?

Jul 17, 2007 at 6:18 PM
So I would like to use FQL queries for find what I need, but what it returns is a XML string. Is there a easy way to deserialize this string and turn it into a Facebook Object, eg a User object? If not does anyone know of a easy xml parser library so I can use to extract the fields from the xml file? Or do I have to write a manual parser...
Jul 18, 2007 at 3:50 PM

The easiest solution is just to use our built-in methods that do this for you. Like getUserProfile and getFriends. These use fql to get friends and hydrate the entities for you.

If those don't work for you (like you don't want the full set of attributes) you can look at the code we have for the UserParser which takes the response node from an fql query and hydrates a user. You should be able to do something similar.