Package org.dom4j.io

Examples of org.dom4j.io.XMLWriter.endElement()


        XMLWriter writer = new XMLWriter(out, OutputFormat.createPrettyPrint());
        writer.startDocument();
        writer.startElement(null, "root", "root", new AttributesImpl());
        writer.startElement(null, "code", "code", new AttributesImpl());
        writer.characters(new char[] { 'f', 'o', 'o' }, 0, 3);
        writer.endElement(null, "code", "code");
        writer.characters(new char[] { ' ', 'b', 'a', 'r' }, 0, 4);
        writer.endElement(null, "root", "root");
        writer.endDocument();
        writer.close();
View Full Code Here


        writer.startElement(null, "root", "root", new AttributesImpl());
        writer.startElement(null, "code", "code", new AttributesImpl());
        writer.characters(new char[] { 'f', 'o', 'o' }, 0, 3);
        writer.endElement(null, "code", "code");
        writer.characters(new char[] { ' ', 'b', 'a', 'r' }, 0, 4);
        writer.endElement(null, "root", "root");
        writer.endDocument();
        writer.close();

        String xml = out.toString();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.