/** {@inheritDoc} */
        public object parse(XMLEventParserContext ctx, javax.xml.stream.events.XMLEvent inputEvent, params object[] args)
        {
            if (ctx == null)
            {
                string message = Logging.getMessage("nullValue.ParserContextIsNull");
                Logging.logger().severe(message);
                throw new System.ArgumentException(message);
            }

            if (inputEvent == null)
            {
                string message = Logging.getMessage("nullValue.EventIsNull");
                Logging.logger().severe(message);
                throw new System.ArgumentException(message);
            }

            try
            {
                // Parse this event's attributes
                this.doParseEventAttributes(ctx, inputEvent, args);

                // Build the symbol table
                string id = (string)this.getField("id");
                if (id != null)
                {
                    ctx.addId(id, this);
                }
            }
            catch (javax.xml.stream.XMLStreamException e)
            {
                ctx.firePropertyChange(new XMLParserNotification(ctx, XMLParserNotification.EXCEPTION, inputEvent,
                                                                 "XML.ExceptionParsingElement", null, e));
            }

            // Parse the event's subelements.
            for (XMLEvent event = ctx.nextEvent(); ctx.hasNext(); event = ctx.nextEvent())
        /**
         * Create a parser for a specified event.
         *
         * @param ctx   the current parser context.
         * @param event the event for which the parser is created. Only the event type is used; the new parser can operate
         *              on any event of that type.
         *
         * @return the new parser.
         */
        public XMLEventParser allocate(SharpEarth.util.xml.XMLEventParserContext ctx, javax.xml.stream.events.XMLEvent @event)
        {
            if (ctx == null)
            {
                string message = Logging.getMessage("nullValue.ParserContextIsNull");
                Logging.logger().severe(message);
                throw new System.ArgumentException(message);
            }

            XMLEventParser parser = ctx.allocate(@event);

            if (parser != null)
            {
                parser.setParent(this);
            }

            return(parser);
        }