Code example for SAXParseException

0
            if (fn == null)
                throw new SAXParseException("Element " + el
                        + " must be in a separate file", locator);
            passToDelegate(fn);
        } else if (fn != null) {
            throw new SAXParseException("Only " + delegate_tag 
                    + " may be in a separate file", locator);
        } 
        Generator o = (Generator)generators.get(el);
        if (o != null) {
            String type = attributes.getValue("type");
            Object g = o.generate(el, type);
            if (g == null)
                throw new SAXParseException("Error creating " + el + " object", locator);
            startObject(g);
        } 
        elements.addFirst(el);
        String id = attributes.getValue("id");
        if (id != null) {
            String key = el + '\u0000' + id; // use \0 as separator since 
                                            // it can't be in an XML file