Package org.zanata.xml

Examples of org.zanata.xml.StreamSerializer.writeXMLDeclaration()


            // error instead of simply aborting the output stream.
            if (iter.hasNext())
                iter.peek();

            StreamSerializer stream = new StreamSerializer(output);
            stream.writeXMLDeclaration();
            stream.write(new DocType("tmx", "http://www.lisa.org/tmx/tmx14.dtd"));
            stream.writeNewLine();

            Element tmx = new Element("tmx");
            tmx.addAttribute(new Attribute("version", "1.4"));
View Full Code Here


    @Test
    public void sanityTest() throws IOException {
        OutputStream out = new ByteArrayOutputStream();
        StreamSerializer serializer = new StreamSerializer(out);

        serializer.writeXMLDeclaration();
        Element rootElement = new Element("root");
        rootElement.addAttribute(new Attribute("rootAttr", "rootAttrVal"));
        serializer.writeStartTag(rootElement);

        Element sub1 = new Element("sub");
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.