org.ops4j.util.xml
Class XmlUtils

java.lang.Object
  extended by org.ops4j.util.xml.XmlUtils

public class XmlUtils
extends Object

XML related utilities. TODO merge this clas with ElementHelper

Author:
Alin Dreghiciu, Niclas Heldman

Method Summary
static List<Element> getChildElements(Element element)
           
static Element getElement(Document doc, String path)
           
static Element getElement(Element element, String path)
           
static List<Element> getElements(Document doc, String path)
           
static List<Element> getElements(Element element, String path)
           
static String getTextContent(Node node)
           
static String getTextContentOfElement(Document doc, String path)
           
static String getTextContentOfElement(Element element, String path)
           
static Document parseDoc(File xmlFile)
           
static Document parseDoc(InputStream is)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseDoc

public static Document parseDoc(File xmlFile)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Throws:
ParserConfigurationException
SAXException
IOException

parseDoc

public static Document parseDoc(InputStream is)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Throws:
ParserConfigurationException
SAXException
IOException

getElement

public static Element getElement(Document doc,
                                 String path)

getElement

public static Element getElement(Element element,
                                 String path)

getElements

public static List<Element> getElements(Document doc,
                                        String path)

getElements

public static List<Element> getElements(Element element,
                                        String path)

getChildElements

public static List<Element> getChildElements(Element element)

getTextContentOfElement

public static String getTextContentOfElement(Document doc,
                                             String path)

getTextContentOfElement

public static String getTextContentOfElement(Element element,
                                             String path)

getTextContent

public static String getTextContent(Node node)


Copyright © 2006-2013 OPS4J - Open Participation Software for Java. All Rights Reserved.