1 28 29 package com.caucho.xml.parsers; 30 31 import com.caucho.xml.Html; 32 import com.caucho.xml.QDOMImplementation; 33 34 import org.w3c.dom.DOMImplementation ; 35 36 import javax.xml.parsers.DocumentBuilder ; 37 import javax.xml.parsers.DocumentBuilderFactory ; 38 39 42 public class HtmlDocumentBuilderFactory extends DocumentBuilderFactory { 43 46 public DocumentBuilder newDocumentBuilder() 47 { 48 return new HtmlDocumentBuilder(); 49 } 50 51 public Object getAttribute(String key) 52 { 53 return null; 54 } 55 56 public void setAttribute(String key, Object value) 57 { 58 } 59 60 public boolean getFeature(String key) 61 { 62 return false; 63 } 64 65 public void setFeature(String key, boolean value) 66 { 67 } 68 69 public DOMImplementation getDOMImplementation() 70 { 71 return new QDOMImplementation(); 72 } 73 74 class HtmlDocumentBuilder extends AbstractDocumentBuilder { 75 HtmlDocumentBuilder() 76 { 77 _parser = new Html(); 78 _parser.setConfig(HtmlDocumentBuilderFactory.this); 79 } 80 } 81 } 82 | Popular Tags |