Class DomUtils


  • public final class DomUtils
    extends Object
    Some DOM utility methods.
    • Constructor Detail

      • DomUtils

        public DomUtils()
    • Method Detail

      • getChildElementByName

        protected static Element getChildElementByName​(Element parent,
                                                       String localName)

        Returns the first child element with the given name. Returns null if not found.

        Parameters:
        parent - parent element
        localName - name of the child element
        Returns:
        child element, null if not found.
      • getChildElementsByName

        protected static List<Element> getChildElementsByName​(Element parent,
                                                              String localName)

        Returns a list of child elements with the given name. Returns an empty list if there are no such child elements.

        Parameters:
        parent - parent element
        localName - Local name of the child element
        Returns:
        child elements