public class XmlWriter extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
doctype |
protected boolean |
escapeHex |
protected String |
publicID |
protected String |
systemID |
Constructor and Description |
---|
XmlWriter() |
XmlWriter(String doctype,
String publicID,
String systemID)
Create a new XmlWriter, capable to write a XML DOM document to a file., with escaped hexadecimal sequences.
|
XmlWriter(String doctype,
String publicID,
String systemID,
boolean escapeHex)
Create a new XmlWriter, capable to write a XML DOM document to a file.
|
Modifier and Type | Method and Description |
---|---|
void |
flush() |
String |
getDoctype()
Return the doctype.
|
String |
getPublicID()
Return the publicID.
|
String |
getSystemID()
Return the systemID.
|
void |
setPublicSystemID(String doctype,
String publicID,
String systemID)
Set the public and system ID of the written XML Document.
|
void |
writeDocument(Document doc,
Writer writer) |
void |
writeXml(Node node,
Writer writer) |
protected boolean escapeHex
protected String publicID
protected String systemID
protected String doctype
public XmlWriter()
public XmlWriter(String doctype, String publicID, String systemID)
doctype
- the document typepublicID
- the publicID of the documentsystemID
- the systemID of the documentpublic XmlWriter(String doctype, String publicID, String systemID, boolean escapeHex)
doctype
- the document typepublicID
- the publicID of the documentsystemID
- the systemID of the documentescapeHex
- defines if non ASCII characters are writen as UTF-8 chars (false)
or escaped XML hexadecimal sequences (true)for rules for giving these parameters
public void setPublicSystemID(String doctype, String publicID, String systemID)
doctype
- the doctypepublicID
- the publicIDsystemID
- the systemIDpublic String getPublicID()
public String getDoctype()
public String getSystemID()
public void flush() throws IOException
IOException
public void writeDocument(Document doc, Writer writer) throws IOException, XmlWriterIOException
IOException
XmlWriterIOException
public void writeXml(Node node, Writer writer) throws XmlWriterIOException
XmlWriterIOException