private void removeFromStart(Document document, Element root)
    {
        Element line = root.getElement(0);
        int end = line.getEndOffset();

        try
        {
            document.remove(0, end);
        }
        catch(BadLocationException ble)
        {
            System.out.println(ble);
        }
    }