public class XMLWriter extends Object
| Constructor and Description |
|---|
XMLWriter(OutputStream os,
String encoding) |
XMLWriter(Writer out) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static String |
escapeAttributeValue(String str)
Replaces & < > ' " with their XML entities.
|
void |
writeElement(String name,
Map<String,String> attribs) |
void |
writeElementEnd(String name) |
void |
writeElementStart(String name,
Map<String,String> attribs) |
void |
writeElementStart(String name,
Map<String,String> attribs,
boolean atomic) |
void |
writeText(String text) |
void |
writeXMLDecl() |
public XMLWriter(OutputStream os, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic XMLWriter(Writer out)
public static String escapeAttributeValue(String str)
str - the str to escapepublic void writeXMLDecl()
throws IOException
IOExceptionpublic void writeElementStart(String name, Map<String,String> attribs) throws IOException
IOExceptionpublic void writeElement(String name, Map<String,String> attribs) throws IOException
IOExceptionpublic void writeElementStart(String name, Map<String,String> attribs, boolean atomic) throws IOException
IOExceptionpublic void writeElementEnd(String name) throws IOException
IOExceptionpublic void writeText(String text) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionCopyright © 2024 OpenClover.org. All rights reserved.