Example usage for org.dom4j.dom DOMElement getDocument

List of usage examples for org.dom4j.dom DOMElement getDocument

Introduction

In this page you can find the example usage for org.dom4j.dom DOMElement getDocument.

Prototype

public Document getDocument() 

Source Link

Usage

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);
}