Class XmlWriter
java.lang.Object
java.io.Writer
java.io.StringWriter
org.ctan.site.resources.catalogue.api.XmlWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
The class
XmlWriter
contains the specialised writer for XML
files. It collects the data in memory.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe methodout
provides means to write some arguments to the writer.outFullTag
(String tag, String value) The methodoutFullTag
provides means to generate a full tag.The methodoutIf
provides means to write a parameter if a condition is met and the value is not empty.The methodoutIf
provides means to write a parameter if a condition is met and the value is not empty.The methodoutIf
provides means to write a parameter if a condition is met and the value is not empty.The methodoutName
provides means to write out a parameter.The methodout
provides means to write some arguments to the writer followed by a newline character.outTagWithAttribute
(String tag, String attribute, String value) The methodoutTag
provides means to add a tag with an attribute value.Methods inherited from class java.io.StringWriter
append, append, append, close, flush, getBuffer, toString, write, write, write, write
Methods inherited from class java.io.Writer
nullWriter, write
-
Constructor Details
-
XmlWriter
public XmlWriter()
-
-
Method Details
-
out
The methodout
provides means to write some arguments to the writer.- Parameters:
args
- the arguments to append- Returns:
- this
-
outFullTag
The methodoutFullTag
provides means to generate a full tag.- Parameters:
tag
- the tagvalue
- the value- Returns:
- this
-
outIf
The methodoutIf
provides means to write a parameter if a condition is met and the value is not empty.- Parameters:
cond
- the condition to checkattr
- the attributevalue
- the value- Returns:
- this
-
outIf
The methodoutIf
provides means to write a parameter if a condition is met and the value is not empty.- Parameters:
attr
- the attributevalue
- the value- Returns:
- this
-
outIf
The methodoutIf
provides means to write a parameter if a condition is met and the value is not empty.- Parameters:
tag
- the tagattr
- the attributevalue
- the value- Returns:
- this
-
outName
The methodoutName
provides means to write out a parameter.- Parameters:
cond
- check for a conditiontag
- the tagvalue
- the value- Returns:
- this
-
outNl
The methodout
provides means to write some arguments to the writer followed by a newline character.- Parameters:
args
- the arguments to append- Returns:
- this
-
outTagWithAttribute
The methodoutTag
provides means to add a tag with an attribute value.- Parameters:
tag
- the name of the tagattribute
- the name of the attributevalue
- the value of the attribute- Returns:
- this
-