Moving to "Program Logic" forum.
There is no tutorial unfortunately. But you can always check the source code of any built-in module to get the idea.
I suppose the sitemap module can be used as a source:
Code:
grep -r "\/Sitemap\/" *
Also, check this ->
http://help.qtmsoft.com/index.php?title=X-Cart:Integration_with_third_party_modules