Sky View Café - Java

org.shetline.util
Class DOMUtil

java.lang.Object
  extended by org.shetline.util.DOMUtil

public class DOMUtil
extends Object


Method Summary
static boolean documentHasElement(Document doc, String tagName)
           
static String extractEnclosedText(Element container)
           
static String extractEnclosedText(Node node)
           
static Node findNode(Node node, String name)
           
static String getAttribute(Node node, String attribute, String defaultValue)
           
static List<Element> getChildElements(Document doc, String... tagNames)
           
static List<Element> getChildElements(Node parent, String... tagNames)
           
static List<Node> getChildNodes(Document doc)
           
static List<Node> getChildNodes(Node parent)
           
static Map<String,Element> getElementMap(Document doc, String... tagNames)
           
static Map<String,Element> getElementMap(Node parent, String... tagNames)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

documentHasElement

public static boolean documentHasElement(Document doc,
                                         String tagName)

getChildNodes

public static List<Node> getChildNodes(Document doc)

getChildNodes

public static List<Node> getChildNodes(Node parent)

getChildElements

public static List<Element> getChildElements(Document doc,
                                             String... tagNames)

getChildElements

public static List<Element> getChildElements(Node parent,
                                             String... tagNames)

getElementMap

public static Map<String,Element> getElementMap(Document doc,
                                                String... tagNames)

getElementMap

public static Map<String,Element> getElementMap(Node parent,
                                                String... tagNames)

getAttribute

public static String getAttribute(Node node,
                                  String attribute,
                                  String defaultValue)

findNode

public static Node findNode(Node node,
                            String name)

extractEnclosedText

public static String extractEnclosedText(Node node)

extractEnclosedText

public static String extractEnclosedText(Element container)

Sky View Café - Java