This article contains an XML document that creates a SOP Invoice, it will create the taxes and total the document automatically.
The code to create this document will be published next: http://dyndeveloper.com/articleview.aspx?ArticleID=249