XML added to api

Example in readme also updated. Full docs to come