5 public class Element extends Node {
6 public final Name name;
7 public final List<Node> children = new ArrayList<>();
8 public final Map<Name, String> attribs = new HashMap<>();
10 public Element(Name name) {
14 public Element add(Node ch) {
19 public Element set(Name attrib, String val) {
20 attribs.put(attrib, val);
24 public String toString() {
25 return(String.format("#<element %s %d attr %d ch>", name, attribs.size(), children.size()));