public String toXML() {
public String toXML(DataDictionary dataDictionary) {
    public String toXML() {        try {            Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();            Element message = document.createElement("message");            document.appendChild(message);            toXMLFields(message, "header", this.header);            toXMLFields(message, "body", this);            toXMLFields(message, "trailer", this.trailer);            DOMSource domSource = new DOMSource(document);            ByteArrayOutputStream out = new ByteArrayOutputStream();            StreamResult streamResult = new StreamResult(out);            TransformerFactory tf = TransformerFactory.newInstance();            Transformer serializer = tf.newTransformer();            serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");            // serializer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"users.dtd");            serializer.setOutputProperty(OutputKeys.INDENT, "yes");            serializer.transform(domSource, streamResult);            return out.toString();        } catch (Exception e) {            throw new RuntimeException(e);        }    }