org.jrobin.core

Class Util.Xml

public static class Util.Xml extends Object

Various DOM utility functions
Method Summary
static Node[]getChildNodes(Node parentNode)
static Node[]getChildNodes(Node parentNode, String childName)
static StringgetChildValue(Node parentNode, String childName)
static StringgetChildValue(Node parentNode, String childName, boolean trim)
static booleangetChildValueAsBoolean(Node parentNode, String childName)
static doublegetChildValueAsDouble(Node parentNode, String childName)
static intgetChildValueAsInt(Node parentNode, String childName)
static longgetChildValueAsLong(Node parentNode, String childName)
static NodegetFirstChildNode(Node parentNode, String childName)
static ElementgetRootElement(InputSource inputSource)
static ElementgetRootElement(String xmlString)
static ElementgetRootElement(File xmlFile)
static StringgetValue(Node node)
static StringgetValue(Node node, boolean trimValue)
static booleangetValueAsBoolean(Node node)
static doublegetValueAsDouble(Node node)
static intgetValueAsInt(Node node)
static longgetValueAsLong(Node node)
static booleanhasChildNode(Node parentNode, String childName)

Method Detail

getChildNodes

public static Node[] getChildNodes(Node parentNode)

getChildNodes

public static Node[] getChildNodes(Node parentNode, String childName)

getChildValue

public static String getChildValue(Node parentNode, String childName)

getChildValue

public static String getChildValue(Node parentNode, String childName, boolean trim)

getChildValueAsBoolean

public static boolean getChildValueAsBoolean(Node parentNode, String childName)

getChildValueAsDouble

public static double getChildValueAsDouble(Node parentNode, String childName)

getChildValueAsInt

public static int getChildValueAsInt(Node parentNode, String childName)

getChildValueAsLong

public static long getChildValueAsLong(Node parentNode, String childName)

getFirstChildNode

public static Node getFirstChildNode(Node parentNode, String childName)

getRootElement

public static Element getRootElement(InputSource inputSource)

getRootElement

public static Element getRootElement(String xmlString)

getRootElement

public static Element getRootElement(File xmlFile)

getValue

public static String getValue(Node node)

getValue

public static String getValue(Node node, boolean trimValue)

getValueAsBoolean

public static boolean getValueAsBoolean(Node node)

getValueAsDouble

public static double getValueAsDouble(Node node)

getValueAsInt

public static int getValueAsInt(Node node)

getValueAsLong

public static long getValueAsLong(Node node)

hasChildNode

public static boolean hasChildNode(Node parentNode, String childName)