1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package net.sf.stax;
25
26 import org.xml.sax.Locator;
27 import org.xml.sax.Attributes;
28 import org.xml.sax.SAXException;
29
30 /***
31 * Simple implementation of the <code>StAXContentHandler</code>
32 * interface, with empty implementations for all the methods.
33 *
34 * <p>
35 * This class is provided as a base for content handlers where
36 * the implementor does not wish to provide all the methods.
37 * </p>
38 *
39 * @author Thomas Down
40 * @author Michael Heuer
41 * @version $Revision: 1.3 $ $Date: 2006/01/02 20:37:34 $
42 */
43 public class StAXContentHandlerBase
44 implements StAXContentHandler
45 {
46
47 /*** @see StAXContentHandler */
48 public void startTree(final StAXContext ctx)
49 throws SAXException
50 {
51
52 }
53
54 /*** @see StAXContentHandler */
55 public Object endTree(final StAXContext ctx)
56 throws SAXException
57 {
58 return null;
59 }
60
61 /*** @see StAXContentHandler */
62 public void characters(final char[] ch,
63 final int start,
64 final int length,
65 final StAXContext ctx)
66 throws SAXException
67 {
68
69 }
70
71 /*** @see StAXContentHandler */
72 public void ignorableWhitespace(final char[] ch,
73 final int start,
74 final int length,
75 final StAXContext ctx)
76 throws SAXException
77 {
78
79 }
80
81 /*** @see StAXContentHandler */
82 public void startPrefixMapping(final String prefix,
83 final String uri,
84 final StAXContext ctx)
85 throws SAXException
86 {
87
88 }
89
90 /*** @see StAXContentHandler */
91 public void endPrefixMapping(final String prefix,
92 final StAXContext ctx)
93 throws SAXException
94 {
95
96 }
97
98 /*** @see StAXContentHandler */
99 public void processingInstruction(final String target,
100 final String data,
101 final StAXContext ctx)
102 throws SAXException
103 {
104
105 }
106
107 /*** @see StAXContentHandler */
108 public void setDocumentLocator(final Locator locator,
109 final StAXContext ctx)
110 {
111 ctx.setLocator(locator);
112 }
113
114 /*** @see StAXContentHandler */
115 public void skippedEntity(final String name,
116 final StAXContext ctx)
117 throws SAXException
118 {
119
120 }
121
122 /*** @see StAXContentHandler */
123 public void startElement(final String nsURI,
124 final String localName,
125 final String qName,
126 final Attributes attrs,
127 final StAXDelegationContext dctx)
128 throws SAXException
129 {
130
131 }
132
133 /*** @see StAXContentHandler */
134 public void endElement(final String nsURI,
135 final String localName,
136 final String qName,
137 final Object result,
138 final StAXContext ctx)
139 throws SAXException
140 {
141
142 }
143 }