net.bpelunit.util
Class XMLUtil

java.lang.Object
  extended by net.bpelunit.util.XMLUtil

public final class XMLUtil
extends Object


Method Summary
static void addAsFirstChild(Element element, Element newChild)
           
static List<Element> getChildElements(Element element)
           
static List<Element> getChildElementsByName(Element element, String localName)
           
static QName getQName(Node n)
           
static Document parseXML(InputStream in)
           
static Document parseXML(String xmlAsString)
           
static void removeNodes(Element parent, NodeList elements)
           
static void writeXML(Node xml, File file)
           
static void writeXML(Node xml, OutputStream outputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseXML

public static Document parseXML(String xmlAsString)
                         throws SAXException,
                                IOException,
                                ParserConfigurationException
Parameters:
xmlAsString - document in string form, encoding specified in XML should be UTF-8
Returns:
Throws:
SAXException
IOException
UnsupportedEncodingException
ParserConfigurationException

parseXML

public static Document parseXML(InputStream in)
                         throws SAXException,
                                IOException,
                                ParserConfigurationException
Throws:
SAXException
IOException
ParserConfigurationException

writeXML

public static void writeXML(Node xml,
                            File file)
                     throws IOException,
                            TransformerException
Throws:
IOException
TransformerException

writeXML

public static void writeXML(Node xml,
                            OutputStream outputStream)
                     throws TransformerException
Throws:
TransformerException

removeNodes

public static void removeNodes(Element parent,
                               NodeList elements)

getChildElementsByName

public static List<Element> getChildElementsByName(Element element,
                                                   String localName)

getChildElements

public static List<Element> getChildElements(Element element)

addAsFirstChild

public static void addAsFirstChild(Element element,
                                   Element newChild)

getQName

public static QName getQName(Node n)


Copyright © 2013 Leibniz Universität Hannover. All Rights Reserved.