Пример #1
0
 @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;
 }
Пример #2
0
 void addChild(Element<?>... children) {
   for (Element<?> child : children)
     this.children.put((child instanceof Attribute ? "@" : "") + child.getName(), child);
 }