added xml compatibility

Added two new parameters to accomplish xml compatibility:
- format: supports 'json' or 'xml' at the moment.  Defaults to 'json', so not required.
- traverseTo: a comma-separated list which traverses the array down to the repeating items you'd like.  Not required.

Also had to add a objectToArray function, since ->xml() returns an object rather than an array.