org.bounce.xml
Class DOMUtils
java.lang.Object
org.bounce.xml.DOMUtils
public class DOMUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOMUtils
public DOMUtils()
isWhiteSpace
public static boolean isWhiteSpace(Text node)
getXPath
public static String getXPath(Node node)
getUniqueXPath
public static String getUniqueXPath(Node node)
isMixed
public static boolean isMixed(Element element)
getElementByTagName
public Element getElementByTagName(Element parent,
String name)
- Parameters:
parent
- the parent element.name
- the name of the tag to match on. The special value "*" matches
all tags.
- Returns:
- the first matching element.
getElementByTagNameNS
public Element getElementByTagNameNS(Element parent,
String namespaceURI,
String localName)
- Parameters:
parent
- the parent element.namespaceURI
- The namespace URI of the elements to match on. The special
value "*" matches all namespaces.localName
- The local name of the elements to match on. The special value
"*" matches all local names.
- Returns:
- the first matching element.
getName
public static String getName(Attr attribute)
getName
public static String getName(Element element)
getQName
public static String getQName(Element element)
getQName
public static String getQName(Attr attribute)
hasContent
public static boolean hasContent(Element element)
getText
public static String getText(Element element)
isTextOnly
public static boolean isTextOnly(Element element)
Copyright © 2002-2011 Edwin Dankert. All Rights Reserved.