Class XMLWriter
java.lang.Object
org.apache.catalina.util.XMLWriter
-
Field Summary
Modifier and TypeFieldDescriptionprotected StringBuilder
Buffer.static final int
Closing tag.protected boolean
static final int
Element with no content.static final int
Opening tag.protected final Writer
Writer. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sendData()
Send data and reinitializes buffer, if a writer has been specified.toString()
Retrieve generated XML.void
Write data.void
writeElement
(String namespace, String name, int type) Write an element.void
writeElement
(String namespace, String namespaceInfo, String name, int type) Write an element.void
writeProperty
(String namespace, String name, String value) Write property to the XML.void
Write raw XML data.void
Write text.void
Write XML Header.
-
Field Details
-
OPENING
public static final int OPENINGOpening tag.- See Also:
-
CLOSING
public static final int CLOSINGClosing tag.- See Also:
-
NO_CONTENT
public static final int NO_CONTENTElement with no content.- See Also:
-
buffer
Buffer. -
writer
Writer. -
lastWriteWasOpen
protected boolean lastWriteWasOpen
-
-
Constructor Details
-
XMLWriter
public XMLWriter()New XML writer utility that will store its data in an internal buffer. -
XMLWriter
New XML writer utility that will store its data in an internal buffer and can write it to the specified writer.See
sendData()
- Parameters:
writer
- The writer to use
-
-
Method Details
-
toString
-
writeProperty
-
writeElement
-
writeElement
-
writeText
-
writeRaw
-
writeData
-
writeXMLHeader
public void writeXMLHeader()Write XML Header. -
sendData
Send data and reinitializes buffer, if a writer has been specified.- Throws:
IOException
- Error writing XML data
-