public ParserNode(XMLParser xmlParser, Class<?> clazz)
    throws XMLStructureException
    {
        XMLNode node = clazz.getAnnotation(XMLNode.class);
        if (node == null)
            throw new XMLStructureException("Trying to register class " + clazz.getSimpleName()
                                            + " that does not have the XMLNode annotation");
        String tmpName = node.name().trim();
        if (tmpName.isEmpty())
            tmpName = clazz.getSimpleName();
        name = tmpName;
        this.clazz = clazz;
        Collections.addAll(superClazz, node.parentNodes());
        valueClazz = node.contentType();
        isSingleNode = node.single();
        type = node.type();
        updateContent = node.updateContent();
        resetContent = node.resetContent();
        hasContent = (!valueClazz.equals(None.class));
        if (isRoot() && hasParent())
            throw new XMLStructureException(name + ": Trying to register a root node with a parent node");
        if (type == XMLNodeType.DEFAULT && hasParent())
            throw new XMLStructureException(name + ": Trying to register a default node with a parent node");
        setter = hasContent ? new StringSetter(clazz, "Content", valueClazz) : null;
        if (type == XMLNodeType.DEFAULT)
            xmlParser.setDefaultNode(this);
        constructProperties();
    }