topical media & game development
basic-xml-15-listing2.txt / txt
Function QuantityDiscount(quantity)
'For the sake of the example, just return a fixed amount
QuantityDiscount = 10
End Function
Function ErrorXML()
Dim sXML
sXML = "<Error><Reason>Invalid numbers</Reason></Error>"
ErrorXML = sXML
End Function
Function SuccessXML(sDiscount, sExtprice)
Dim sXML
sXML = "<updateTotalResponse>" & vbNewLine
sXML = sXML & " <discount>" & sDiscount & "</discount>" & vbNewLine
sXML = sXML & " <extPrice>" & sExtprice & "</extPrice>" & vbNewLine
sXML = sXML & "</updateTotalResponse>"
SuccessXML = sXML
End Function
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.