Class DOMUtilities


  • public final class DOMUtilities
    extends Object
    Some utility methods to help parsing when using a DOM parser.
    Author:
    Thomas Morgner
    • Method Detail

      • getText

        public static String getText​(Element e)
        extracts all text-elements of a particular element and returns an single string containing the contents of all textelements and all character entity nodes. If a node is not known to the parser, its string value will be delivered as &entityname;.
        Parameters:
        e - the element which is direct parent of all to be extracted textnodes.
        Returns:
        the extracted String