public class XmlWriter
extends java.lang.Object
| Constructor and Description |
|---|
XmlWriter(org.w3c.dom.Document newDocument,
java.io.Writer newWriter)
Creates new XmlWriter
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
write()
write the document to the instance's writer
|
static void |
writeToFile(org.w3c.dom.Document document,
java.io.File file)
Write the document to a file
|
static void |
writeToPath(org.w3c.dom.Document newDocument,
java.lang.String filePath)
write the XML document to the UNIX file path
|
static java.lang.String |
writeToString(org.w3c.dom.Document newDocument)
return a string representation of the XML document
|
static void |
writeToUrl(org.w3c.dom.Document document,
java.net.URL url)
write the XML document to the URL
|
static void |
writeToUrlSpec(org.w3c.dom.Document newDocument,
java.lang.String urlSpec)
write the XML document to the URL spec
|
static void |
writeToWriter(org.w3c.dom.Document newDocument,
java.io.Writer aWriter)
write the XML document to the specified writer
|
public XmlWriter(org.w3c.dom.Document newDocument,
java.io.Writer newWriter)
public static void writeToUrl(org.w3c.dom.Document document,
java.net.URL url)
throws java.net.MalformedURLException,
java.io.IOException
java.net.MalformedURLExceptionjava.io.IOExceptionpublic static void writeToUrlSpec(org.w3c.dom.Document newDocument,
java.lang.String urlSpec)
throws java.net.MalformedURLException,
java.io.IOException
java.net.MalformedURLExceptionjava.io.IOExceptionpublic static void writeToPath(org.w3c.dom.Document newDocument,
java.lang.String filePath)
throws java.io.IOException
java.io.IOExceptionpublic static void writeToFile(org.w3c.dom.Document document,
java.io.File file)
throws java.io.IOException
document - the document to writefile - the file to be writtenjava.io.IOExceptionpublic static java.lang.String writeToString(org.w3c.dom.Document newDocument)
public static void writeToWriter(org.w3c.dom.Document newDocument,
java.io.Writer aWriter)
protected void write()