Moved xml generation classes to API.