Code example for Stack

Methods: push, size

0
        SAXParserFactory parserFactory = SAXParserFactory.newInstance();
        SAXParser parser = parserFactory.newSAXParser();
 
        this.resolver = resolver;
        this.serializer = serializer;
        elementHandlers = new Stack<Map<String, EntityFactory>>();
        elementHandlers.push(new HashMap<String, EntityFactory>());
        handler = new TestWikisFactory();
        register(handler);
 
        parser.parse(url.toURI().toString(), this);
 
        if (elementHandlers.size() > 1) {
            throw new SAXException("Handlers stack as been corrupted while parsing.");
        } 
 
        elementHandlers = null;
        locator = null;
        this.resolver = null;
        this.serializer = null;
        TestDefinition wikis = getWikis();