1 28 29 package com.caucho.xml.parsers; 30 31 import com.caucho.xml.Html; 32 import com.caucho.xml.XmlParser; 33 34 import org.xml.sax.Parser ; 35 import org.xml.sax.XMLReader ; 36 37 import javax.xml.parsers.SAXParser ; 38 import javax.xml.parsers.SAXParserFactory ; 39 40 43 public class HtmlSAXParserFactory extends SAXParserFactory { 44 47 public SAXParser newSAXParser() 48 { 49 return new HtmlSAXParser(); 50 } 51 52 public Object getProperty(String key) 53 { 54 return null; 55 } 56 57 public void setProperty(String key, Object value) 58 { 59 } 60 61 public boolean getFeature(String key) 62 { 63 return false; 64 } 65 66 public void setFeature(String key, boolean value) 67 { 68 } 69 70 class HtmlSAXParser extends SAXParser { 71 private XmlParser parser; 72 73 HtmlSAXParser() 74 { 75 parser = new Html(); 76 } 77 78 public Object getProperty(String key) 79 { 80 return null; 81 } 82 83 public void setProperty(String key, Object value) 84 { 85 } 86 87 public Parser getParser() 88 { 89 return parser; 90 } 91 92 public XMLReader getXMLReader() 93 { 94 return parser; 95 } 96 97 public boolean isNamespaceAware() 98 { 99 return true; 100 } 101 102 public boolean isValidating() 103 { 104 return false; 105 } 106 } 107 } 108 | Popular Tags |