@SuppressWarnings("unchecked")
    public void add(final XmlNode child) {

        if (childrenMap == null) {
            childrenMap = new HashMap<>();
        }
        final Object currentValue = childrenMap.get(child.name);
        if (currentValue instanceof XmlNode) {
            final List<XmlNode> list = new ArrayList<>();
            list.add((XmlNode) currentValue);
            list.add(child);
            childrenMap.put(child.name, list);
        } else if (currentValue instanceof List) {
            ((List<XmlNode>) currentValue).add(child);
        } else {
            childrenMap.put(child.name, child);
        }
    }
Reprents the content of an XML Node and it's children. Sort of a poor-mans DOM model.
<br>
Instances of this class are optimized for fast random access to child nodes by their (local) name.
Although lists (=many children of same node with same common name) are also supported, order
of tags from original document is not preserved.
main/src/main/java/cgeo/geocaching/utils/xml/XmlNode.java