import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class Utils {
/**
* Add an entity to a specified Element.
* (eg DomUtils.addEntity(element, "nbsp");
)
* @param element the containing element
* @param entity the entity to add
*/
public static void addEntity(Element element, String entity) {
element.appendChild(element.getOwnerDocument().createEntityReference(entity));
}
}