org.xwiki.xml.internal
Class DefaultXMLReaderFactory

java.lang.Object
  extended by org.xwiki.xml.internal.DefaultXMLReaderFactory
All Implemented Interfaces:
Initializable, XMLReaderFactory

@Component
@Singleton
public class DefaultXMLReaderFactory
extends Object
implements XMLReaderFactory, Initializable

Verifies if Xerces is on the classpath and if so configures it to cache DTD grammars instead of reparsing it for every documents, thus greatly improving performances since most XML content handled in XWiki is XHTML using the XHTML DTD.

Since:
1.7.1
Version:
$Id$

Constructor Summary
DefaultXMLReaderFactory()
           
 
Method Summary
 XMLReader createXMLReader()
          
 void initialize()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultXMLReaderFactory

public DefaultXMLReaderFactory()
Method Detail

initialize

public void initialize()
                throws InitializationException

Specified by:
initialize in interface Initializable
Throws:
InitializationException
See Also:
Initializable.initialize()

createXMLReader

public XMLReader createXMLReader()
                          throws SAXException,
                                 ParserConfigurationException

Specified by:
createXMLReader in interface XMLReaderFactory
Returns:
the optimised XML Reader instance
Throws:
SAXException - in case of an error in the creation of the XML Reader instance
ParserConfigurationException - in case of an error in the creation of the XML Reader instance
See Also:
XMLReaderFactory.createXMLReader()


Copyright © 2004-2011 XWiki. All Rights Reserved.