Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamWriter;

public class Main {

    public static void main(String[] args) throws Exception {
        XMLOutputFactory xof = XMLOutputFactory.newFactory();
        XMLStreamWriter xsw = xof.createXMLStreamWriter(System.out);

        xsw.writeStartDocument();
        xsw.writeStartElement("response");
        xsw.writeStartElement("message");
        xsw.writeCharacters("1 < 2");
        xsw.writeEndDocument();

        xsw.close();
    }

}