Handling various types of nodes when traversing a DOM tree
Consider creating an object which can handle each case:

interface NodeHandler {
    void handle(Node node, Element current, ...);
}

class ElementHandler implements NodeHandler {
    public void handle(Node node, Element current, ...) {
        readElement(node, current);
    }
}


You can then populate a map, like this, to look up the appropriate handler for a node:

private static Map&lt;Integer, NodeHandler&gt; handlerMap;
static {
    handlerMap = new HashMap&lt;Integer, NodeHandler&gt;();
    handlerMap.put(Node.ELEMENT_NODE, new ElementHandler());
    //...
}


and then...

handlerMap.get(node.getNodeType()).handle(...);


I don't think this makes the code shorter, but it does make the code more maintainable. Each object has a single, clear responsibility, and you don't have to deal with issues like fall-through cases, or state getting mingled between different handlers. You could conceivably invent new handlers without actually changing the implementation of the readTree() method, or impacting the behavior of existing handlers.