|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.xml.XmlWriter
XmlWriter is a class that can write an XML document to a desired output in XML format. It only supports writing of Document, Element and Attribute nodes. Other node support may be added as the need arises. XML writer is quite generic for writing XML 1.0 documents with standard encoding. This class mainly implements convenience methods for writing documents to different outputs. The work of writing XML constructs to text is left to the member classes.
| Constructor Summary | |
XmlWriter(org.w3c.dom.Document newDocument,
java.io.Writer newWriter)
Creates new XmlWriter |
|
| Method Summary | |
protected void |
write()
write the document to the instance's writer |
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 newDocument,
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XmlWriter(org.w3c.dom.Document newDocument,
java.io.Writer newWriter)
| Method Detail |
public static void writeToUrl(org.w3c.dom.Document newDocument,
java.net.URL url)
throws java.net.MalformedURLException,
java.io.IOException
java.net.MalformedURLException
java.io.IOException
public static void writeToUrlSpec(org.w3c.dom.Document newDocument,
java.lang.String urlSpec)
throws java.net.MalformedURLException,
java.io.IOException
java.net.MalformedURLException
java.io.IOException
public static void writeToPath(org.w3c.dom.Document newDocument,
java.lang.String filePath)
throws java.io.IOException
java.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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||