com.bluecast.xml
Class JAXPSAXParserFactory

java.lang.Object
  extended by javax.xml.parsers.SAXParserFactory
      extended by com.bluecast.xml.JAXPSAXParserFactory

public class JAXPSAXParserFactory
extends javax.xml.parsers.SAXParserFactory

JAXP factory class for creating SAX parsers. This factory creates an instance of Piccolo when a non-validating parser is requested.

If a validating parser is requested, this class will search for another SAXParserFactory to create the validating parser. This class will search for a factory in the following ways:

  1. The system property com.bluecast.xml.ValidatingSAXParserFactory
  2. The next listed Service Provider for javax.xml.parsers.SAXParserFactory
  3. Crimson (org.apache.crimson.jaxp.SAXParserFactoryImpl)
If all of the above fail, a ParserConfigurationException will be thrown.

Version:
$Revision: 1.7 $
Author:
Yuval Oren, yuval@bluecast.com

Constructor Summary
JAXPSAXParserFactory()
           
 
Method Summary
 boolean getFeature(java.lang.String name)
           
static javax.xml.parsers.SAXParserFactory newInstance()
           
 javax.xml.parsers.SAXParser newSAXParser()
           
 void setFeature(java.lang.String name, boolean enabled)
           
 void setNamespaceAware(boolean awareness)
           
 void setValidating(boolean value)
           
 
Methods inherited from class javax.xml.parsers.SAXParserFactory
getSchema, isNamespaceAware, isValidating, isXIncludeAware, newInstance, setSchema, setXIncludeAware
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXPSAXParserFactory

public JAXPSAXParserFactory()
Method Detail

newInstance

public static javax.xml.parsers.SAXParserFactory newInstance()

getFeature

public boolean getFeature(java.lang.String name)
                   throws javax.xml.parsers.ParserConfigurationException,
                          org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
Specified by:
getFeature in class javax.xml.parsers.SAXParserFactory
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

newSAXParser

public javax.xml.parsers.SAXParser newSAXParser()
                                         throws javax.xml.parsers.ParserConfigurationException,
                                                org.xml.sax.SAXException
Specified by:
newSAXParser in class javax.xml.parsers.SAXParserFactory
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

setFeature

public void setFeature(java.lang.String name,
                       boolean enabled)
                throws javax.xml.parsers.ParserConfigurationException,
                       org.xml.sax.SAXNotRecognizedException,
                       org.xml.sax.SAXNotSupportedException
Specified by:
setFeature in class javax.xml.parsers.SAXParserFactory
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setNamespaceAware

public void setNamespaceAware(boolean awareness)
Overrides:
setNamespaceAware in class javax.xml.parsers.SAXParserFactory

setValidating

public void setValidating(boolean value)
Overrides:
setValidating in class javax.xml.parsers.SAXParserFactory