public final class SAXRecorder extends Object implements XMLRecorder
EventSequence.
It is possible to specify the name of the XML reader implementation class.
By default this class will try to use the Crimson parser
org.apache.crimson.parser.XMLReaderImpl.
The XML reader implementation must support the following features settings
http://xml.org/sax/features/validation => false http://xml.org/sax/features/namespaces => true | false http://xml.org/sax/features/namespace-prefixes => true | false
| Modifier and Type | Field and Description |
|---|---|
protected EventSequence |
sequence
The sequence of event for this recorder.
|
| Constructor and Description |
|---|
SAXRecorder() |
| Modifier and Type | Method and Description |
|---|---|
DiffXConfig |
getConfig()
Returns the configuration used by this recorder.
|
static String |
getXMLReaderClass()
Returns the name XMLReader class used by the SAXRecorders.
|
EventSequence |
process(File file)
Runs the recorder on the specified file.
|
EventSequence |
process(InputSource is)
Runs the recorder on the specified input source.
|
EventSequence |
process(String xml)
Runs the recorder on the specified string.
|
void |
setConfig(DiffXConfig config)
Sets the configuration used by this recorder.
|
static void |
setXMLReaderClass(String className)
Sets the name of the XML reader class to use.
|
protected transient EventSequence sequence
public EventSequence process(File file) throws LoadingException, IOException
This method will count on the InputSource to guess the correct encoding.
process in interface Recorderfile - The file to process.LoadingException - If thrown while parsing.IOException - Should I/O error occur.public EventSequence process(String xml) throws LoadingException, IOException
This method is provided for convenience. It is best to only use this method for short strings.
process in interface Recorderxml - The XML string to process.LoadingException - If thrown while parsing.IOException - Should I/O error occur.public EventSequence process(InputSource is) throws LoadingException, IOException
process in interface XMLRecorderis - The input source.LoadingException - If thrown whilst parsing.IOException - Should I/O error occur.public DiffXConfig getConfig()
public void setConfig(DiffXConfig config)
config - The configuration used by this recorder.public static String getXMLReaderClass()
public static void setXMLReaderClass(String className)
Use null to reset the XML reader class and use the default XML reader.
A new reader will be created only if the specified class is different from the current one.
className - The name of the XML reader class to use;
or null to reset the XML reader.Copyright © 2007-2022. All Rights Reserved.