1 28 29 package com.caucho.xml.parsers; 30 31 import com.caucho.xml.LooseHtml; 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 LooseHtmlSAXParserFactory extends SAXParserFactory { 44 47 public SAXParser newSAXParser() 48 { 49 return new LooseHtmlSAXParser(); 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 LooseHtmlSAXParser extends SAXParser { 71 private XmlParser parser; 72 73 LooseHtmlSAXParser() 74 { 75 parser = new LooseHtml(); 76 } 77 78 public Parser getParser() 79 { 80 return parser; 81 } 82 83 public XMLReader getXMLReader() 84 { 85 return parser; 86 } 87 88 public Object getProperty(String key) 89 { 90 return null; 91 } 92 93 public void setProperty(String key, Object value) 94 { 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 |