1 22 package org.jboss.xb.binding.parser; 23 24 import org.xml.sax.Attributes ; 25 import org.xml.sax.EntityResolver ; 26 import org.jboss.xb.binding.JBossXBException; 27 import org.apache.xerces.xs.XSTypeDefinition; 28 29 import java.io.Reader ; 30 import java.io.InputStream ; 31 32 36 public interface JBossXBParser 37 { 38 interface ContentHandler 39 { 40 void characters(char[] ch, int start, int length); 41 42 void endElement(String namespaceURI, String localName, String qName); 43 44 void startElement(String namespaceURI, String localName, String qName, Attributes atts, XSTypeDefinition type); 45 46 void startPrefixMapping(String prefix, String uri); 47 48 void endPrefixMapping(String prefix); 49 50 void processingInstruction(String target, String data); 51 52 Object getRoot(); 53 } 54 55 void setEntityResolver(EntityResolver entityResolver) throws JBossXBException; 56 57 void setProperty(String name, Object value); 58 59 void setFeature(String name, boolean value); 60 61 void parse(String source, ContentHandler handler) throws JBossXBException; 62 63 void parse(InputStream is, ContentHandler handler) throws JBossXBException; 64 65 void parse(Reader reader, ContentHandler handler) throws JBossXBException; 66 } 67 | Popular Tags |