Java tutorial
//package com.java2s; /* * Copyright 2008 The Kuali Foundation * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ecl2.php * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ public class Main { public static StringBuffer getInvoiceSummaryXMLChunk() { StringBuffer summary = new StringBuffer(); summary.append("<InvoiceDetailSummary>"); summary.append("<SubtotalAmount><Money currency=\"USD\">10</Money></SubtotalAmount>"); summary.append("<Tax>"); summary.append("<Money currency=\"USD\">0</Money>"); summary.append("<Description xml:lang=\"en\">TOTAL TAX</Description>"); summary.append("<TaxDetail category=\"sales\" percentageRate=\"0\" purpose=\"tax\">"); summary.append("<TaxAmount><Money currency=\"USD\">0.0</Money></TaxAmount>"); summary.append("<Description xml:lang=\"en\">Item State and Local Tax</Description>"); summary.append("</TaxDetail></Tax>"); summary.append("<SpecialHandlingAmount><Money currency=\"USD\">0.00</Money></SpecialHandlingAmount>\n"); summary.append("<ShippingAmount><Money currency=\"USD\">0.00</Money></ShippingAmount>"); summary.append("<InvoiceDetailDiscount><Money currency=\"USD\">0.00</Money></InvoiceDetailDiscount>"); summary.append("<NetAmount><Money currency=\"USD\">10.00</Money></NetAmount>"); summary.append("<DepositAmount><Money currency=\"USD\">2.00</Money></DepositAmount>"); summary.append("<DueAmount><Money currency=\"USD\">10.00</Money></DueAmount>"); summary.append("</InvoiceDetailSummary>"); return summary; } }