Updated API constructor to take configuration XML.

As per the code review, the API constructor was updated to take as a
parameter a configuration string that is XML.