The reason the documentation is that way is that historically the command line way has been the way things have been done, it's only more recently that the xapi has become available and is something that is starting to be utilised more.
Translating from the xCommand to XML isn't difficult to do, there is a second on how to do this in the API guide in the "Translating from terminal mode to XML" section (Page 52).
Wayne
Please remember to mark helpful responses and to set your question as answered if appropriate.