OSCI2-StarterKit


eu.osci.helper
Class XMLGeneralHelper

java.lang.Object
  extended by eu.osci.helper.XMLGeneralHelper

public class XMLGeneralHelper
extends java.lang.Object

Helper class for XML creation and handling.
Copyright © 2010 Freie Hansestadt Bremen.
Created by bremen online services Entwicklungs- und Betriebsgesellschaft mbH & Co. KG.
This library (Starter Kit) can be used by anybody according to the Bremer Lizenz für freie Softwarebibliotheken. The license terms can be viewed at www.osci.de or can be ordered at the OSCI-Leitstelle (Die Senatorin für Finanzen, Freie Hansestadt Bremen, Postfach 10 15 40, 28015 Bremen).


Constructor Summary
XMLGeneralHelper()
           
 
Method Summary
static org.w3c.dom.Document createDOMDocument()
          Creates a new DOM document.
static org.w3c.dom.Document createDOMDocument(java.io.InputStream in)
          Creates a new DOM document from a given InputStream.
static java.io.ByteArrayOutputStream dumpDomNode(org.w3c.dom.Node element)
          Returns an OutputStream including the serialised DOM node.
static void dumpDomNode(org.w3c.dom.Node node, java.io.OutputStream out)
          Writes the DOM node to the given OutputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLGeneralHelper

public XMLGeneralHelper()
Method Detail

dumpDomNode

public static java.io.ByteArrayOutputStream dumpDomNode(org.w3c.dom.Node element)
                                                 throws javax.xml.transform.TransformerException
Returns an OutputStream including the serialised DOM node.

Parameters:
element - The node that will be serialised.
Throws:
javax.xml.transform.TransformerException

dumpDomNode

public static void dumpDomNode(org.w3c.dom.Node node,
                               java.io.OutputStream out)
                        throws javax.xml.transform.TransformerException
Writes the DOM node to the given OutputStream.

Parameters:
node - The node that will be serialised.
out - The OutputStream to write into.
Throws:
javax.xml.transform.TransformerException

createDOMDocument

public static org.w3c.dom.Document createDOMDocument()
                                              throws javax.xml.parsers.ParserConfigurationException
Creates a new DOM document.

Throws:
javax.xml.parsers.ParserConfigurationException

createDOMDocument

public static org.w3c.dom.Document createDOMDocument(java.io.InputStream in)
                                              throws javax.xml.parsers.ParserConfigurationException,
                                                     org.xml.sax.SAXException,
                                                     java.io.IOException
Creates a new DOM document from a given InputStream.

Parameters:
in - The given InputStream.
Throws:
javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
Since:
1.1.0

OSCI2-StarterKit


Copyright © 2010 Freie Hansestadt Bremen.