Detects whether input is XML or JSON and parses accordingly. Parsing within the file provides the advantage of decoupling server calls with calls to the parser, as it is able to be agnostic to the format received. It cannot, however, parse HTML (nor should it have to).
Instantiates the class with an optional payload
Given a payload (which should be XML or JSON), it stores this and then returns itself for chainability.
Parses the payload it was Given
successCallback: {Function} called on successful parse. Takes one parameter that contains the parsed output.
errCallback: {Function} called on parsing error from XML parser. Note that this will be called even if the payload is JSON, since JSON is attempted to be parsed first.