public void endElement(String uri, String localName, String qName) {
            if (_done)
                return;

            String text = new String(_chars);

            if (localName.equals("method")) {
                _invocation.setMethod(text);
            } else if (localName.equals("arg")) {
                _args.get(_args.size()-1).setValue(text);
            } else {
                if (text.length() > 0)
                    throw new ReplayRuntimeException("unhandled text for tag: " + localName + ": " + text);
            }

            if (localName.equals("invocation")) {
                if (_args.size() > 0)
                    _invocation.setArgs(_args.toArray(new ReplayObject[0]));

                while (!_done && _nextInvocation != null)
                    Thread.yield();
                if (_done)
                    return;

                _nextInvocation = _invocation;
                _invocation = null;

                _args = new ArrayList<ReplayObject>();
            }

            _tagStack.pop();
            _chars = new char[0];
        }