> struct / class Element(T) { > T name; > T[T] attributes; > // ... > string toString() { > return ...; > } > } Why did you chose the same type for keys and values? And shouldn't 'name' always be a string?