Package org.dom4j.io

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


            xml.startDTD("catalogs", PUBLIC_ID, SYSTEM_ID);
            xml.endDTD();

            _saveCatalogs(xml, catalogs);

            xml.endDocument();
        } finally {
            try {
                if (xml != null) {
                    xml.flush();
                }
View Full Code Here


        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();

        System.out.println(xml);
View Full Code Here

        String txt = "<test></test>";

        xmlWriter.startDocument();
        xmlWriter.characters(txt.toCharArray(), 0, txt.length());
        xmlWriter.endDocument();

        String output = writer.toString();
        System.out.println(output);
        assertTrue(output.indexOf("<test>") != -1);
    }
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.