Package org.xhtmlrenderer.pdf
Class DOMUtil
- java.lang.Object
-
- org.xhtmlrenderer.pdf.DOMUtil
-
public class DOMUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description DOMUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ElementgetChild(Element parent, String name)static List<Element>getChildren(Element parent, String name)static StringgetText(Element parent)Loads all the text content in all offspring of an element.static voidgetText(Element parent, StringBuilder sb)Appends all text content in all offspring of an element to a StringBuilder.
-
-
-
Method Detail
-
getText
public static String getText(Element parent)
Loads all the text content in all offspring of an element. Ignores all attributes, comments and processing instructions.- Returns:
- a String with the text content of an element (maybe an empty string but will not be null).
-
getText
public static void getText(Element parent, StringBuilder sb)
Appends all text content in all offspring of an element to a StringBuilder. Ignores all attributes, comments and processing instructions.
-
-