Rework the java test program to print out attribute nodes too.