A problem I frequently run into is when the value of a given key somewhat randomly switches between an array value and an object value. In my most recent they key is the ItemLookupResponse.Items.Item which sometimes contains an array and sometimes contains a single object which tends to cause errors like TypeError: Cannot read property 'length' of undefined.
Obviously the reason why it switches is because sometimes there's multiple values and sometimes there's a single value, which is why you can't use a generic function to translate XML in to JSON since they're not the same type of structure.
This can be worked around in the requiring code with some annoyance but would make for much simpler code if it was fixed in the library code, which in this case means that Items.Item should always be an array.