01: package org.ontoware.aifbcommons.xml;
02:
03: import java.io.IOException;
04:
05: /**
06: * Impls must write out the XML declaration
07: * @author voelkel
08: *
09: */
10: public interface XmlOut {
11:
12: public static final String XML_DECLARATION = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
13:
14: public void open(String elementName) throws IOException;
15:
16: public void attribute(String name, String value) throws IOException;
17:
18: public void content(String rawContent) throws IOException;
19:
20: public void close(String elementName) throws IOException;
21:
22: public void comment(String string) throws IOException;
23:
24: /** circumvent xml and just write as-is to writer
25: * @throws IOException */
26: public void write(String s) throws IOException;
27:
28: public void openProcessingInstruction(String processingInstruction)
29: throws IOException;
30:
31: public void closeProcessingInstruction() throws IOException;
32:
33: public void doctype(String doctype, String publicID, String url)
34: throws IOException;
35:
36: public void flush() throws IOException;
37:
38: public void close() throws IOException;
39: }
|