protected String getBoxDescription(Box box)
    {
        if (box.getType() == Type.TEXT_CONTENT)
            return box.getText();
        else
        {
            final String cls = box.getAttribute("class");
            final String id = box.getAttribute("id");
            StringBuilder ret = new StringBuilder("<");
            ret.append(box.getTagName());
            if (id != null)
                ret.append(" id=").append(id);
            if (cls != null)
                ret.append(" class=").append(cls);
            ret.append(">");
            return ret.toString();
        }
    }