private Element getChildElement(XmlTokenizer tokenizer, Tag startingTag){
        Element element = new Element();
        Element child;
        Token token;
        Tag tag;
        boolean done = false;

        element.setStartTag(startingTag);

        if(startingTag.isSelfClosing()){
            done = true;
        }

        while(tokenizer.hasNextToken() && !done){
            token = tokenizer.getNextToken();

            if(token instanceof Tag){
                tag = (Tag) token;

                if(tag.isClosingTag()){
                    element.setEndTag(tag);
                    done = true;
                }else{
                    child = getChildElement(tokenizer, tag);
                    element.addChildElement(child);
                }

            }else if(token instanceof Text){
                element.setText((Text) token);
            }
        }

        return element;
    }