|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencrx.application.uses.net.sf.webdav.fromcatalina.XMLWriter
public class XMLWriter
XMLWriter helper class.
| Field Summary | |
|---|---|
protected StringBuffer |
_buffer
Buffer. |
protected boolean |
_isRootElement
Is true until the root element is written |
protected Map<String,String> |
_namespaces
Namespaces to be declared in the root element |
protected Writer |
_writer
Writer. |
static int |
CLOSING
Closing tag. |
static int |
NO_CONTENT
Element with no content. |
static int |
OPENING
Opening tag. |
| Constructor Summary | |
|---|---|
XMLWriter(Map<String,String> namespaces)
Constructor. |
|
XMLWriter(Writer writer,
Map<String,String> namespaces)
Constructor. |
|
| Method Summary | |
|---|---|
void |
sendData()
Send data and reinitializes buffer. |
String |
toString()
Retrieve generated XML. |
void |
writeData(String data)
Write data. |
void |
writeElement(String name,
int type)
Write an element. |
void |
writeProperty(String name)
Write property to the XML. |
void |
writeProperty(String name,
String value)
Write property to the XML. |
void |
writeText(String text)
Write text. |
void |
writeXMLHeader()
Write XML Header. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int OPENING
public static final int CLOSING
public static final int NO_CONTENT
protected StringBuffer _buffer
protected Writer _writer
protected Map<String,String> _namespaces
protected boolean _isRootElement
| Constructor Detail |
|---|
public XMLWriter(Map<String,String> namespaces)
public XMLWriter(Writer writer,
Map<String,String> namespaces)
| Method Detail |
|---|
public String toString()
toString in class Object
public void writeProperty(String name,
String value)
name - Property namevalue - Property valuepublic void writeProperty(String name)
name - Property name
public void writeElement(String name,
int type)
name - Element nametype - Element typepublic void writeText(String text)
text - Text to appendpublic void writeData(String data)
data - Data to appendpublic void writeXMLHeader()
public void sendData()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||