java.lang.Object
edu.hm.hafner.analysis.util.XmlElementUtil
Provides some useful methods to process the DOM.
- Autor:
- Ullrich Hafner
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetChildElementsByName(Element parent, String name) Returns all elements in the parent that match the specified name.getFirstChildElementByName(Element parent, String name) Returns the first element in the parent that match the specified name.nodeListToList(NodeList nodeList) Convert aNodeListinto aList<Element>.
-
Methodendetails
-
getChildElementsByName
Returns all elements in the parent that match the specified name.- Parameter:
parent- the parent elementname- the expected name of the childs- Gibt zurück:
- the elements, the list might be empty if there is no match
-
getFirstChildElementByName
Returns the first element in the parent that match the specified name.- Parameter:
parent- the parent elementname- the expected name of the childs- Gibt zurück:
- the first element if there is a match,
Optional.empty()otherwise
-
nodeListToList
Convert aNodeListinto aList<Element>. Also filters out non elements from the node list.- Parameter:
nodeList- node list to convert.- Gibt zurück:
- list of elements.
-