1 21 22 package nu.xom.samples; 23 24 import nu.xom.Element; 25 26 27 42 public class Subfunction { 43 44 private String code; 45 private String title; 46 private long amount; 47 48 public Subfunction(String title, String code, long amount) { 49 50 this.title = title; 51 this.code = code; 52 this.amount = amount; 53 54 } 55 56 public Element getXML() { 57 58 Element subfunction = new Element("Subfunction"); 59 Element name = new Element("Name"); 60 Element code = new Element("Code"); 61 Element amount = new Element("Amount"); 62 name.appendChild(this.title); 63 code.appendChild(this.code); 64 amount.appendChild(String.valueOf(this.amount)); 65 return subfunction; 66 67 } 68 69 } | Popular Tags |