Examples of writeEmptyElement()


Examples of org.codehaus.stax2.XMLStreamWriter2.writeEmptyElement()

           
            // and same for explicitly empty element; wrong root
            sw = getDTDValidatingWriter(strw, SIMPLE_DTD, nsAware, repairing);
            sw.writeDTD("root", "http://foo", "public-id", SIMPLE_DTD);
            try {
                sw.writeEmptyElement("branch");
                fail(modeDesc+" Expected a validation exception when trying to write wrong root element");
            } catch (XMLValidationException vex) {
                // expected...
            }
        }
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamWriter2.writeEmptyElement()

            sw.writeEndElement();
            sw.writeStartElement("branch");
            sw.writeCharacters("test");
            sw.writeComment("comment");
            sw.writeEndElement();
            sw.writeEmptyElement("branch");
            sw.writeEmptyElement("end");
            sw.writeAttribute("endAttr", "value");
            sw.writeCharacters("\n"); // imitating indentation
            sw.writeEndElement(); // for root
        }
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.