1 58 package org.oddjob.arooa; 59 60 import org.xml.sax.Attributes ; 61 import org.xml.sax.SAXParseException ; 62 63 73 public class ArooaHandler { 74 75 90 public void onStartElement(String uri, String tag, String qname, 91 Attributes attrs, 92 ArooaContext context) 93 throws SAXParseException { 94 } 95 96 113 public ArooaHandler onStartChild(String uri, String tag, String qname, 114 Attributes attrs, 115 ArooaContext context) 116 throws SAXParseException { 117 throw new SAXParseException ("Unexpected element \"" + qname 118 + " \"", context.getLocator()); 119 } 120 121 130 public void onEndChild(String uri, String tag, String qname, 131 ArooaContext context) 132 throws SAXParseException { 133 } 134 135 142 public void onEndElement(String uri, String tag, 143 ArooaContext context) { 144 } 145 146 159 public void characters(char[] buf, int start, int count, ArooaContext context) 160 throws SAXParseException { 161 String s = new String (buf, start, count).trim(); 162 163 if (s.length() > 0) { 164 throw new SAXParseException ("Unexpected text \"" + s 165 + "\"", context.getLocator()); 166 } 167 } 168 169 175 protected void checkNamespace(String uri) { 176 177 } 178 } 179 180 | Popular Tags |