org.xhtmlrenderer.pdf
Class DOMUtil

java.lang.Object
  extended by org.xhtmlrenderer.pdf.DOMUtil

public class DOMUtil
extends Object


Constructor Summary
DOMUtil()
           
 
Method Summary
static Element getChild(Element parent, String name)
           
static List getChildren(Element parent, String name)
           
static String getText(Element parent)
          Loads all of the text content in all offspring of an element.
static void getText(Element parent, StringBuilder sb)
          Appends all text content in all offspring of an element to a StringBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMUtil

public DOMUtil()
Method Detail

getChild

public static Element getChild(Element parent,
                               String name)

getChildren

public static List getChildren(Element parent,
                               String name)

getText

public static String getText(Element parent)
Loads all of 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 (may be 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 StringBuffer. Ignores all attributes, comments and processing instructions.



Copyright © 2012. All Rights Reserved.