Java tutorial
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Freemarker Team. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Angelo Zerr <angelo.zerr@gmail.com> - initial API and implementation *******************************************************************************/ import java.io.IOException; import java.io.Writer; public class Main { /** * End XML element. Ex : </elementName> * * @param elementName * @param writer * @throws IOException */ public static void endElement(String elementName, Writer writer) throws IOException { writer.write("</"); writer.write(elementName); writer.write(">"); } /** * End XML element. Ex : /> * * @param writer * @throws IOException */ public static void endElement(Writer writer) throws IOException { writer.write("/>"); } }