Here you can find the source of createUnmarshaller()
private static Unmarshaller createUnmarshaller() throws JAXBException
//package com.java2s; /*//w ww.j a va2 s . com * @(#)GmlHelper.java * * Copyright (C) 2010 www.interpss.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE * as published by the Free Software Foundation; either version 2.1 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * @Author Mike Zhou * @Version 1.0 * @Date 08/15/2010 * * Revision History * ================ * */ import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; public class Main { private static final String Gml_NS = "org.graphdrawing.gml"; private static Unmarshaller unmarshaller = null; private static Unmarshaller createUnmarshaller() throws JAXBException { if (unmarshaller == null) { JAXBContext jaxbContext = JAXBContext.newInstance(Gml_NS); unmarshaller = jaxbContext.createUnmarshaller(); } return unmarshaller; } }