|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.topologi.diffx.load.SAXRecorder
public final class SAXRecorder
Records the SAX events in an 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
Constructor Summary | |
---|---|
SAXRecorder()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SAXRecorder()
Method Detail |
---|
public EventSequence process(File file) throws LoadingException, IOException
This method will count on the InputSource
to guess the correct encoding.
process
in interface Recorder
file
- 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 Recorder
xml
- 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 XMLRecorder
is
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |