class XmlDataWriter extends java.lang.Object implements DataWriter
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String |
heading |
(package private) java.lang.String |
linebreak |
Constructor and Description |
---|
XmlDataWriter(java.lang.String file,
java.lang.String heading)
Creates an XmlDataWriter
|
Modifier and Type | Method and Description |
---|---|
void |
clearComplement(java.util.Map variables)
Any variables that aren't referenced in the Map passed get cleared out this is so that you can pass all the session variables from screen-scraper and if
any aren't referenced in the list you can't connect or write to them anyway (unless they are mid script non-session variables, obviously)
|
void |
close()
Closes any connections and frees up any system resources/files
|
void |
finishWriting(java.lang.String finishUp)
finishes up the writing, this is not always required but may be depending on the output The purpose is to write out file footers, and get things cleaned
up in general
|
boolean |
flush(RootNode n)
write and clears the DataNode.
|
java.lang.String |
getCharEncoding() |
java.lang.String |
getFile() |
java.lang.String |
getHeading() |
void |
setCharEncoding(java.lang.String charEncoding) |
void |
setFile(java.lang.String file) |
void |
setHeading(java.lang.String heading) |
void |
startWriting(java.lang.String startUp)
starts up the writing, this is not always required but may be depending on the output The purpose is to write out file headers, and get things going in
general
|
boolean |
write(RootNode root)
write the contents to the file
|
public boolean write(@NotNull RootNode root)
write
in interface DataWriter
root
- The root node to writepublic boolean flush(@NotNull RootNode n)
n
- java.io.IOException
public java.lang.String getHeading()
public void setHeading(java.lang.String heading)
public java.lang.String getCharEncoding()
public void setCharEncoding(java.lang.String charEncoding)
public java.lang.String getFile()
public void setFile(java.lang.String file)
public void clearComplement(@NotNull java.util.Map variables) throws java.lang.Exception
variables
- java.lang.Exception
public void startWriting(java.lang.String startUp)
DataWriter
startWriting
in interface DataWriter
startUp
- A startup query to run before writingpublic void finishWriting(java.lang.String finishUp)
DataWriter
finishWriting
in interface DataWriter
finishUp
- A closing query to executepublic void close()
DataWriter
close
in interface DataWriter