com.japisoft.xmlpad.validator
Class XMLPadSAXParserFactory

java.lang.Object
  |
  +--com.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)
           
static void setDelegate(XMLPadSAXParserFactory factory)
          This is a way to override this factory by creating a subclass
 
Methods inherited from class java.lang.Object
equals, 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
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
javax.xml.parsers.ParserConfigurationException