com.japisoft.xmlpad.validator
Class XMLPadSAXParserFactory

java.lang.Object
  extended bycom.japisoft.xmlpad.validator.XMLPadSAXParserFactory

public class XMLPadSAXParserFactory
extends java.lang.Object

Here a factory for getting a parser for validating the edited document. The default implementation is based on JAXP. You can create a subclass and delegate the creation of a new parser. This is useful for very particular cases like loading a remote parser or controlling some default parsing properties...

Version:
1.0
Author:
(c) 2004 JAPISoft / http://www.japisoft.com

Constructor Summary
XMLPadSAXParserFactory()
           
 
Method Summary
static javax.xml.parsers.DocumentBuilder getNewDocumentBuilder(boolean validating)
           
static javax.xml.parsers.SAXParser getNewSAXParser(boolean validating)
           
protected  javax.xml.parsers.DocumentBuilder getNonStaticNewDocumentBuilder(boolean validating)
           
protected  javax.xml.parsers.SAXParser getNonStaticNewSAXParser(boolean validating)
           
static void setDelegate(XMLPadSAXParserFactory factory)
          This is a way to override this factory by creating a subclass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLPadSAXParserFactory

public XMLPadSAXParserFactory()
Method Detail

setDelegate

public static void setDelegate(XMLPadSAXParserFactory factory)
This is a way to override this factory by creating a subclass


getNewSAXParser

public static javax.xml.parsers.SAXParser getNewSAXParser(boolean validating)
                                                   throws javax.xml.parsers.ParserConfigurationException,
                                                          org.xml.sax.SAXException
Returns:
a new SAX Parser. It uses JAXP as default
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getNewDocumentBuilder

public static javax.xml.parsers.DocumentBuilder getNewDocumentBuilder(boolean validating)
                                                               throws javax.xml.parsers.ParserConfigurationException
Returns:
a new DocumentBuilder. This is used for formatting the document
Throws:
javax.xml.parsers.ParserConfigurationException

getNonStaticNewDocumentBuilder

protected javax.xml.parsers.DocumentBuilder getNonStaticNewDocumentBuilder(boolean validating)
                                                                    throws javax.xml.parsers.ParserConfigurationException
Throws:
javax.xml.parsers.ParserConfigurationException

getNonStaticNewSAXParser

protected javax.xml.parsers.SAXParser getNonStaticNewSAXParser(boolean validating)
                                                        throws javax.xml.parsers.ParserConfigurationException,
                                                               org.xml.sax.SAXException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException


Copyright © 2006 JAPISoft. All Rights Reserved.