Understanding Return Values
When you run an API call, the data returned by the API is natively in XML format, and it looks something like this:
<api_result>
<result>The Result</result>
</api_result>
... or it could look like this if it has multiple results:
<api_result>
<result>The Result</result>
<result>The Result</result>
<result>The Result</result>
</api_result>
... or it may look like this (specific tags determined by exact API function):
<api_result>
<some_tag>The Result</some_tag>
<another_tag>The Result</another_tag>
<third_tag>The Result</third_tag>
</api_result>
As you can see, there can be more than one result returned (typically for the getList functions), or named tags (usually for getRecord functions). The data returned inside each result or named tag can be a boolean value (true/false), an integer value, a string, or a tagged (xml-like) string with multiple data items inside tags. Each command explained in this documentation reveals what kind of data it will return.
If you are using one of the SDK's available, some let you easily set the data to be returned as JSON instead of XML. Also a special note on the tagged (xml-like) string that is returned by some functions. The structure is similar to XML, but it is not necessarily valid XML. It’s easy enough to parse through though. Each SDK has a function that parses through the tagged data for easy access to the data. If you are not using an SDK, you can write a similar parsing function derived from the functions in the SDK.