1 50 51 package org.openlaszlo.iv.flash.xml.generic; 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 ) { 71 this.factory = factory; 72 } 73 74 public DocumentBuilder getDocumentBuilder() throws ParserConfigurationException { 75 DocumentBuilder builder = factory.newDocumentBuilder(); 76 return builder; 77 } 78 79 public XMLContext newXMLContext( Context parent, Node node ) { 80 return new XMLContextImpl(parent, node); 81 } 82 83 public XPathProcessor getXPathProcessor() { 84 if( xpathProcessor == null ) { 85 xpathProcessor = new XPathProcessorImpl(); 86 } 87 return xpathProcessor; 88 } 89 90 } 91 92 93 94 | Popular Tags |