eu.cedarsoft.utils
Class XmlCommons
java.lang.Object
eu.cedarsoft.utils.XmlCommons
public class XmlCommons
- extends java.lang.Object
Common xml methods
|
Method Summary |
static javax.xml.parsers.DocumentBuilder |
getDocumentBuilder()
|
static void |
out(org.w3c.dom.Document document,
java.io.OutputStream out)
|
static void |
out(org.w3c.dom.Document document,
java.io.Writer out)
|
static org.w3c.dom.Document |
parse(byte[] bytes)
|
static org.w3c.dom.Document |
parse(java.io.InputStream in)
|
static org.jdom.Document |
toJDom(org.w3c.dom.Document document)
|
static java.lang.String |
toString(org.w3c.dom.Document document)
|
static void |
writeXml(java.io.File file,
org.jdom.Document document)
Write the document to the given file |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
writeXml
public static void writeXml(@NotNull
java.io.File file,
@NotNull
org.jdom.Document document)
throws java.io.IOException
- Write the document to the given file
- Parameters:
file - the filedocument - the document
- Throws:
java.io.IOException - if an io exception occures
getDocumentBuilder
@NotNull
public static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
out
public static void out(@NotNull
org.w3c.dom.Document document,
@NotNull
java.io.OutputStream out)
out
public static void out(@NotNull
org.w3c.dom.Document document,
@NotNull
java.io.Writer out)
toJDom
@NotNull
public static org.jdom.Document toJDom(@NotNull
org.w3c.dom.Document document)
parse
@NotNull
public static org.w3c.dom.Document parse(@NotNull
byte[] bytes)
throws java.io.IOException,
org.xml.sax.SAXException
- Throws:
java.io.IOException
org.xml.sax.SAXException
parse
@NotNull
public static org.w3c.dom.Document parse(@NotNull
java.io.InputStream in)
throws java.io.IOException,
org.xml.sax.SAXException
- Throws:
java.io.IOException
org.xml.sax.SAXException
toString
@NotNull
public static java.lang.String toString(org.w3c.dom.Document document)
Copyright © 2008 cedarsoft GmbH. All Rights Reserved.