This article vb.net code that creates a SOP Invoice, it will create the taxes and total the document automatically.
The XML document that it produces is blogged here: http://dyndeveloper.com/articleview.aspx?ArticleID=248