List of usage examples for org.w3c.dom.html HTMLElement getElementsByTagName
public NodeList getElementsByTagName(String name);
NodeList
of all descendant Elements
with a given tag name, in document order. From source file:org.fit.cssbox.scriptbox.dom.Html5DocumentImpl.java
/** * Returns base element if there is any inside Document. * /*from www . j a v a 2 s. c om*/ * @return Base element if there is any inside Document. */ public HTMLBaseElement getBaseElement() { // FIXME: We should not wait for completeness, but try to get base address from actual loaded elements - proper synchronized section is needed. if (_documentReadiness == DocumentReadyState.COMPLETE) { HTMLElement head = getHead(); NodeList baseElements = head.getElementsByTagName("base"); if (baseElements.getLength() > 0) { Node baseElement = baseElements.item(0); if (baseElement instanceof HTMLBaseElement) { return (HTMLBaseElement) baseElement; } } } return null; }