1 28 29 package com.caucho.xml.parsers; 30 31 import com.caucho.xml.LooseXml; 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 LooseXmlDocumentBuilderFactory extends DocumentBuilderFactory { 43 46 public DocumentBuilder newDocumentBuilder() 47 { 48 return new LooseXmlDocumentBuilder(); 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 LooseXmlDocumentBuilder extends AbstractDocumentBuilder { 75 LooseXmlDocumentBuilder() 76 { 77 _parser = new LooseXml(); 78 _parser.setConfig(LooseXmlDocumentBuilderFactory.this); 79 } 80 } 81 } 82 | Popular Tags |