Code example for Element

Methods: isLeaf

0
    public int getStartOffset() { 
        return element.getStartOffset();
    } 
 
    public boolean isLeaf() { 
        return element.isLeaf();
    } 
 
    public String getText() {
        int start = getStartOffset();
        int length = getEndOffset() - start;
        try { 
            return getDocument().getText(start, length);
        } catch (BadLocationException e1) {
            throw new RuntimeException(e1);
        } 
    } 
 
    public HtmlElement getChild(int index) {
        return new HtmlElement(getElement(index));