@Override public Element<?> get(String path) { ParsedPath parsed = new ParsedPath(path); Element<?> child = children.get(parsed.getName()); return parsed.getChildPath() != null ? ((ComplexType) child.getType()).get(parsed.getChildPath().toString()) : child; }
void addChild(Element<?>... children) { for (Element<?> child : children) this.children.put((child instanceof Attribute ? "@" : "") + child.getName(), child); }