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 methodoutprovides means to write some arguments to the writer.outFullTag(String tag, String value) The methodoutFullTagprovides means to generate a full tag.The methodoutIfprovides means to write a parameter if a condition is met and the value is not empty.The methodoutIfprovides means to write a parameter if a condition is met and the value is not empty.The methodoutIfprovides means to write a parameter if a condition is met and the value is not empty.The methodoutNameprovides means to write out a parameter.The methodoutprovides means to write some arguments to the writer followed by a newline character.outTagWithAttribute(String tag, String attribute, String value) The methodoutTagprovides 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, writeMethods inherited from class java.io.Writer
nullWriter, write
-
Constructor Details
-
XmlWriter
public XmlWriter()
-
-
Method Details
-
out
The methodoutprovides means to write some arguments to the writer.- Parameters:
args- the arguments to append- Returns:
- this
-
outFullTag
The methodoutFullTagprovides means to generate a full tag.- Parameters:
tag- the tagvalue- the value- Returns:
- this
-
outIf
The methodoutIfprovides 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 methodoutIfprovides 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 methodoutIfprovides 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 methodoutNameprovides means to write out a parameter.- Parameters:
cond- check for a conditiontag- the tagvalue- the value- Returns:
- this
-
outNl
The methodoutprovides means to write some arguments to the writer followed by a newline character.- Parameters:
args- the arguments to append- Returns:
- this
-
outTagWithAttribute
The methodoutTagprovides 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
-