|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.xml.util.SaxUtil
A collection of utility functions for the SAX API.
Field Summary | |
static String |
FEATURE_NAMESPACES
|
static String |
FEATURE_NSPREFIXES
|
static String |
FEATURE_VALIDATION
|
static String |
PROPERTY_DECLHANDLER
|
static String |
PROPERTY_LEXHANDLER
|
Constructor Summary | |
SaxUtil()
|
Method Summary | |
static XMLReader |
createXmlReader()
Create a SAX XMLReader. |
static XMLReader |
createXmlReader(String className)
Create a SAX XMLReader. |
static boolean |
getFeature(XMLReader xmlReader,
String feature)
A helper method to set a SAX feature of a XMLReader. |
static boolean |
isValidating(XMLReader xmlReader)
Specifies that the parser will validate documents as they are parsed. |
static void |
setFeature(XMLReader xmlReader,
String feature,
boolean value)
A helper method to set a SAX feature of a XMLReader. |
static void |
setProperty(XMLReader xmlReader,
String property,
Object value)
A helper method to set a SAX property of a XMLReader. |
static void |
setValidating(XMLReader xmlReader,
boolean validate)
Specifies that the parser will validate documents as they are parsed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String FEATURE_NAMESPACES
public static final String FEATURE_NSPREFIXES
public static final String FEATURE_VALIDATION
public static final String PROPERTY_LEXHANDLER
public static final String PROPERTY_DECLHANDLER
Constructor Detail |
public SaxUtil()
Method Detail |
public static XMLReader createXmlReader() throws SAXException
org.xml.sax.driver
is set
an instance of this class is returned.
org.apache.crimson.parser.XMLReaderImpl
).
org.apache.xerces.parsers.SAXParser
).
SAXException
- thrown if no XMLReader
can be created.public static XMLReader createXmlReader(String className) throws SAXException
className
- the name of the XMLReader class. If it is the name of
a deprecated SAX Parser class, then the Parser is instantiated
and wrapped with a SAX ParserAdapter.
SAXException
- thrown if the XMLReader
can be created.public static void setFeature(XMLReader xmlReader, String feature, boolean value)
public static boolean getFeature(XMLReader xmlReader, String feature)
public static void setValidating(XMLReader xmlReader, boolean validate)
public static boolean isValidating(XMLReader xmlReader)
public static void setProperty(XMLReader xmlReader, String property, Object value)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |