List of usage examples for org.dom4j.dom DOMElement getDocument
public Document getDocument()
From source file:hello.SampleSimpleApplication.java
License:Apache License
private void addBreadcrumbBefore(DOMElement autoTileElement) { DOMDocument document = (DOMDocument) autoTileElement.getDocument(); DOMElement breadcrumbEl = (DOMElement) document.createElement("div"); // breadcrumbEl.addAttribute("style", "font-weight: bold; left: 0px; position: absolute; top: 3px; font-size:x-small;"); breadcrumbEl.addAttribute("style", "left: 0px; position: absolute; top: 3px; font-size:x-small;"); Element lastChildElement = (Element) bookmarks.selectSingleNode("*[last()]"); addBreadcrumbItem(lastChildElement, breadcrumbEl); DOMElement h4El = (DOMElement) autoTileElement.selectSingleNode("*");//.detach(); autoTileElement.insertBefore(breadcrumbEl, h4El); }