Here you can find the source of CloseNewHTML(XMLStreamWriter serializer)
public static XMLStreamWriter CloseNewHTML(XMLStreamWriter serializer) throws XMLStreamException
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); you may import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class Main { public static XMLStreamWriter CloseNewHTML(XMLStreamWriter serializer) throws XMLStreamException { serializer.writeEndElement(); // end body serializer.writeEndElement(); // end html serializer.writeEndDocument();//w w w . j a va 2s . c o m return serializer; } }