org.apache.cocoon.core.xml.impl
Class JaxpDOMParser

java.lang.Object
  extended byorg.apache.cocoon.core.xml.impl.AbstractJaxpParser
      extended byorg.apache.cocoon.core.xml.impl.JaxpDOMParser
All Implemented Interfaces:
BeanFactoryAware, org.apache.cocoon.core.xml.DOMParser

public final class JaxpDOMParser
extends AbstractJaxpParser
implements org.apache.cocoon.core.xml.DOMParser

A dom parser which uses a JAXP 1.1 compliant parsers.

Since:
2.2
Version:
$Id: JaxpDOMParser.html 1304280 2012-03-23 11:18:01Z ilgrosso $
See Also:
AbstractJaxpParser

Field Summary
protected  String documentBuilderFactoryName
           
protected  DocumentBuilderFactory factory
          the Document Builder factory
 
Fields inherited from class org.apache.cocoon.core.xml.impl.AbstractJaxpParser
resolver, searchResolver, validate
 
Constructor Summary
JaxpDOMParser()
           
 
Method Summary
 Document createDocument()
           
 String getDocumentBuilderFactoryName()
           
protected  void initDomBuilderFactory()
          Initialize the dom builder factory.
 Document parseDocument(InputSource input)
           
 void setDocumentBuilderFactoryName(String documentBuilderFactoryName)
           
protected  DocumentBuilder setupDocumentBuilder()
          Creates a new DocumentBuilder if needed.
 
Methods inherited from class org.apache.cocoon.core.xml.impl.AbstractJaxpParser
getEntityResolver, getLogger, isSearchResolver, isValidate, loadClass, setBeanFactory, setEntityResolver, setLogger, setSearchResolver, setValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected DocumentBuilderFactory factory
the Document Builder factory


documentBuilderFactoryName

protected String documentBuilderFactoryName
Constructor Detail

JaxpDOMParser

public JaxpDOMParser()
Method Detail

getDocumentBuilderFactoryName

public String getDocumentBuilderFactoryName()

setDocumentBuilderFactoryName

public void setDocumentBuilderFactoryName(String documentBuilderFactoryName)

initDomBuilderFactory

protected void initDomBuilderFactory()
                              throws Exception
Initialize the dom builder factory.

Throws:
Exception

parseDocument

public Document parseDocument(InputSource input)
                       throws SAXException,
                              IOException
Specified by:
parseDocument in interface org.apache.cocoon.core.xml.DOMParser
Throws:
SAXException
IOException
See Also:
DOMParser.parseDocument(org.xml.sax.InputSource)

setupDocumentBuilder

protected DocumentBuilder setupDocumentBuilder()
                                        throws SAXException
Creates a new DocumentBuilder if needed.

Throws:
SAXException

createDocument

public Document createDocument()
                        throws SAXException
Specified by:
createDocument in interface org.apache.cocoon.core.xml.DOMParser
Throws:
SAXException
See Also:
DOMParser.createDocument()


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.