import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class Utils {
/**
* Add an entity to a specified Element.
* (eg <code>DomUtils.addEntity(element, "nbsp");</code>)
* @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));
}
}
sources68 the directory containing the programming examples, source code and programming guide online
Friday, 5 August 2011
Add an entity to a specified Element.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment