public final class DOMRecorder extends Object implements XMLRecorder
This class implements the methods Recorder.process(File)
and
Recorder.process(String)
for convenience, but is it much more efficient
to feed this recorder directly with a DOM.
This class is not synchronised.
Constructor and Description |
---|
DOMRecorder() |
Modifier and Type | Method and Description |
---|---|
DiffXConfig |
getConfig()
Returns the configuration used by this recorder.
|
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(Node node)
Processes the given node and returns the corresponding event sequence.
|
EventSequence |
process(NodeList node)
Processes the given node list and returns the corresponding event sequence.
|
EventSequence |
process(String xml)
Runs the recorder on the specified string.
|
void |
setConfig(DiffXConfig config)
Sets the configuration used by this recorder.
|
public DiffXConfig getConfig()
public void setConfig(DiffXConfig config)
config
- The configuration used by this recorder.public EventSequence process(File file) throws LoadingException, IOException
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
process
in interface Recorder
xml
- The string to process.LoadingException
- If thrown while parsing.public EventSequence process(InputSource is) throws LoadingException
process
in interface XMLRecorder
is
- The input source.LoadingException
- If thrown while parsing.public EventSequence process(Node node) throws LoadingException
node
- The W3C DOM node to be processed.LoadingException
- If thrown while parsing.public EventSequence process(NodeList node) throws LoadingException
This method only returns the event sequence from the first node in the node list, if the node list is empty, this method returns an empty sequence.
node
- The W3C DOM node to be processed.LoadingException
- If thrown while parsing.Copyright © 2007-2014. All Rights Reserved.