1 50 51 package org.openlaszlo.iv.flash.xml.caucho; 52 53 import org.openlaszlo.iv.flash.context.*; 54 import org.openlaszlo.iv.flash.xml.*; 55 56 import org.w3c.dom.*; 57 import javax.xml.parsers.*; 58 import javax.xml.transform.TransformerException ; 59 60 65 public class XMLFactoryImpl extends XMLFactory { 66 67 private DocumentBuilderFactory factory; 68 private XPathProcessor xpathProcessor; 69 70 public XMLFactoryImpl( DocumentBuilderFactory factory ) throws ParserConfigurationException { 71 this.factory = factory; 72 } 73 74 public DocumentBuilder getDocumentBuilder() throws ParserConfigurationException { 75 return factory.newDocumentBuilder(); 76 } 77 78 public XMLContext newXMLContext( Context parent, Node node ) { 79 return new XMLContextImpl(parent, node); 80 } 81 82 public XPathProcessor getXPathProcessor() { 83 if( xpathProcessor == null ) { 84 xpathProcessor = new XPathProcessorImpl(); 85 } 86 return xpathProcessor; 87 } 88 89 } 90 91 92 93 94 | Popular Tags |