1 package org.codehaus.plexus.util.xml.pull;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.IOException;
23 import java.io.OutputStream;
24 import java.io.Writer;
25
26
27
28
29 public interface XmlSerializer
30 {
31
32 void setFeature( String name, boolean state )
33 throws IllegalArgumentException, IllegalStateException;
34
35 boolean getFeature( String name );
36
37 void setProperty( String name, Object value )
38 throws IllegalArgumentException, IllegalStateException;
39
40 Object getProperty( String name );
41
42 void setOutput( OutputStream os, String encoding )
43 throws IOException, IllegalArgumentException, IllegalStateException;
44
45 void setOutput( Writer writer )
46 throws IOException, IllegalArgumentException, IllegalStateException;
47
48 void startDocument( String encoding, Boolean standalone )
49 throws IOException, IllegalArgumentException, IllegalStateException;
50
51 void endDocument()
52 throws IOException, IllegalArgumentException, IllegalStateException;
53
54 void setPrefix( String prefix, String namespace )
55 throws IOException, IllegalArgumentException, IllegalStateException;
56
57 String getPrefix( String namespace, boolean generatePrefix )
58 throws IllegalArgumentException;
59
60 int getDepth();
61
62 String getNamespace();
63
64 String getName();
65
66 XmlSerializer startTag( String namespace, String name )
67 throws IOException, IllegalArgumentException, IllegalStateException;
68
69 XmlSerializer attribute( String namespace, String name, String value )
70 throws IOException, IllegalArgumentException, IllegalStateException;
71
72 XmlSerializer endTag( String namespace, String name )
73 throws IOException, IllegalArgumentException, IllegalStateException;
74
75 XmlSerializer text( String text )
76 throws IOException, IllegalArgumentException, IllegalStateException;
77
78 XmlSerializer text( char[] buf, int start, int len )
79 throws IOException, IllegalArgumentException, IllegalStateException;
80
81 void cdsect( String text )
82 throws IOException, IllegalArgumentException, IllegalStateException;
83
84 void entityRef( String text )
85 throws IOException, IllegalArgumentException, IllegalStateException;
86
87 void processingInstruction( String text )
88 throws IOException, IllegalArgumentException, IllegalStateException;
89
90 void comment( String text )
91 throws IOException, IllegalArgumentException, IllegalStateException;
92
93 void docdecl( String text )
94 throws IOException, IllegalArgumentException, IllegalStateException;
95
96 void ignorableWhitespace( String text )
97 throws IOException, IllegalArgumentException, IllegalStateException;
98
99 void flush()
100 throws IOException;
101 }