Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;

import javax.xml.stream.XMLStreamWriter;

public class Main {
    public static void marshal(JAXBContext jaxbContext, Object item, XMLStreamWriter xmlWriter)
            throws JAXBException {
        Marshaller marshaller = jaxbContext.createMarshaller();
        marshaller.marshal(item, xmlWriter);
    }
}