View Javadoc
1   package org.codehaus.plexus.util.xml.pull;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *  http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.IOException;
23  import java.io.OutputStream;
24  import java.io.Writer;
25  
26  /**
27   *
28   */
29  public class MXSerializer
30      implements XmlSerializer
31  {
32      private Writer output;
33  
34      public void setOutput( Writer writer )
35      {
36          output = writer;
37      }
38  
39      public XmlSerializer attribute( String namespace, String name, String value )
40      {
41          return null;
42      }
43  
44      public void cdsect( String text )
45      {
46          // ignore
47      }
48  
49      public void comment( String text )
50      {
51          // ignore
52      }
53  
54      public void docdecl( String text )
55      {
56          // ignore
57      }
58  
59      public void endDocument()
60      {
61          // ignore
62      }
63  
64      public XmlSerializer endTag( String namespace, String name )
65      {
66          return null;
67      }
68  
69      public void entityRef( String text )
70      {
71          // ignore
72      }
73  
74      public void flush()
75      {
76          // ignore
77      }
78  
79      public int getDepth()
80      {
81          return 0;
82      }
83  
84      public boolean getFeature( String name )
85      {
86          return false;
87      }
88  
89      public String getName()
90      {
91          return null;
92      }
93  
94      public String getNamespace()
95      {
96          return null;
97      }
98  
99      public String getPrefix( String namespace, boolean generatePrefix )
100     {
101         return null;
102     }
103 
104     public Object getProperty( String name )
105     {
106         return null;
107     }
108 
109     public void ignorableWhitespace( String text )
110     {
111         // ignore
112     }
113 
114     public void processingInstruction( String text )
115     {
116         // ignore
117     }
118 
119     public void setFeature( String name, boolean state )
120     {
121         // ignore
122     }
123 
124     public void setOutput( OutputStream os, String encoding )
125     {
126         // ignore
127     }
128 
129     public void setPrefix( String prefix, String namespace )
130     {
131         // ignore
132     }
133 
134     public void setProperty( String name, Object value )
135     {
136         // ignore
137     }
138 
139     public void startDocument( String encoding, Boolean standalone )
140     {
141         // ignore
142     }
143 
144     public XmlSerializer startTag( String namespace, String name )
145         throws IOException
146     {
147         output.write( name );
148 
149         return this;
150     }
151 
152     public XmlSerializer text( String text )
153     {
154         return null;
155     }
156 
157     public XmlSerializer text( char[] buf, int start, int len )
158     {
159         return null;
160     }
161 }