1 29 30 package com.caucho.xml2; 31 32 import com.caucho.xml.QName; 33 34 import org.xml.sax.*; 35 36 import java.io.IOException ; 37 import java.util.Locale ; 38 39 42 public class XMLParserImpl implements Parser { 43 public static final String XMLNS = "http://www.w3.org/2000/xmlns/"; 45 46 static final QName DOC_NAME = new QName(null, "#document", null); 47 static final QName TEXT_NAME = new QName(null, "#text", null); 48 static final QName JSP_NAME = new QName(null, "#jsp", null); 49 static final QName WHITESPACE_NAME = new QName(null, "#whitespace", null); 50 static final QName JSP_ATTRIBUTE_NAME = new QName("xtp", "jsp-attribute", null); 51 52 private EntityResolver _entityResolver; 53 private ErrorHandler _errorHandler; 54 private DocumentHandler _documentHandler; 55 private DTDHandler _dtdHandler; 56 private Locale _locale; 57 58 63 public void setErrorHandler(ErrorHandler handler) 64 { 65 _errorHandler = handler; 66 } 67 68 73 public void setEntityResolver(EntityResolver resolver) 74 { 75 _entityResolver = resolver; 76 } 77 78 83 public void setDocumentHandler(DocumentHandler handler) 84 { 85 _documentHandler = handler; 86 } 87 88 93 public void setDTDHandler(DTDHandler handler) 94 { 95 _dtdHandler = handler; 96 } 97 98 103 public void setLocale(Locale locale) 104 { 105 _locale = locale; 106 } 107 108 113 public void parse(InputSource source) 114 throws IOException , SAXException 115 { 116 117 } 118 119 124 public void parse(String source) 125 throws IOException , SAXException 126 { 127 128 } 129 } 130 | Popular Tags |