org.w3c.dom.Node , org.w3c.dom.Element
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static ContentHandler | Returns: the content handlerthe node to publish events to node)Returns a SAX |
| public static Element | Returns: theorg.w3c.dom.Element instance, or null if none foundthe DOM element to analyze ele, String the child element name to look for childEleName)Utility method that returns the first child element identified by its name. |
| public static List | Returns: a List of childorg.w3c.dom.Element instancesthe DOM element to analyze ele)Retrieves all child elements of the given DOM element. |
| public static List | Returns: a List of childorg.w3c.dom.Element instancesthe DOM element to analyze ele, String... the child element names to look for childEleNames)Retrieves all child elements of the given DOM element that match any of the given element names. |
| public static List | Returns: a List of childorg.w3c.dom.Element instancesthe DOM element to analyze ele, String the child element name to look for childEleName)Retrieves all child elements of the given DOM element that match the given element name. |
| public static String | Returns: the extracted text value, ornull if no child element foundthe DOM element to analyze ele, String the child element name to look for childEleName)Utility method that returns the first child element value identified by its name. |
| public static String | getTextValue(Element valueEle)
Extracts the text value from the given DOM element, ignoring XML comments. |
| public static boolean | |
| private static boolean | nodeNameMatch(Node node, String desiredName)
Matches the given node's name and local name against the given desired name. |
| private static boolean | nodeNameMatch(Node node, Collection<?> desiredNames)
Matches the given node's name and local name against the given desired names. |
| DomUtils | back to summary |
|---|---|
| public DomUtils() | |
| createContentHandler | back to summary |
|---|---|
| public static ContentHandler createContentHandler(Node node) Returns a SAX
| |
| getChildElementByTagName | back to summary |
|---|---|
| public static Element getChildElementByTagName(Element ele, String childEleName) Utility method that returns the first child element identified by its name. | |
| getChildElements | back to summary |
|---|---|
| public static List Retrieves all child elements of the given DOM element. | |
| getChildElementsByTagName | back to summary |
|---|---|
| public static List Retrieves all child elements of the given DOM element that match any of the given element names.
Only looks at the direct child level of the given element; do not go into further depth
(in contrast to the DOM API's
| |
| getChildElementsByTagName | back to summary |
|---|---|
| public static List Retrieves all child elements of the given DOM element that match the given element name.
Only look at the direct child level of the given element; do not go into further depth
(in contrast to the DOM API's
| |
| getChildElementValueByTagName | back to summary |
|---|---|
| public static String getChildElementValueByTagName(Element ele, String childEleName) Utility method that returns the first child element value identified by its name. | |
| getTextValue | back to summary |
|---|---|
| public static String getTextValue(Element valueEle) Extracts the text value from the given DOM element, ignoring XML comments. Appends all CharacterData nodes and EntityReference nodes into a single String value, excluding Comment nodes. Only exposes actual user-specified text, no default values of any kind.
| |
| nodeNameEquals | back to summary |
|---|---|
| public static boolean nodeNameEquals(Node node, String desiredName) Namespace-aware equals comparison. Returns | |
| nodeNameMatch | back to summary |
|---|---|
| private static boolean nodeNameMatch(Node node, String desiredName) Matches the given node's name and local name against the given desired name. | |
| nodeNameMatch | back to summary |
|---|---|
| private static boolean nodeNameMatch(Node node, Collection<?> desiredNames) Matches the given node's name and local name against the given desired names. | |