How to call sonar api from my java code

A post was split to a new topic: Analyze XML on the fly