Package org.xml.sax

Examples of org.xml.sax.AttributeList


     * @param context The SAX context within which this element was encountered
     */
    public void start(SaxContext context) throws Exception {

        int top = context.getTagCount() - 1;
        AttributeList attributes = context.getAttributeList(top);
        String username = attributes.getValue("name");
        String password = attributes.getValue("password");
        String roles = attributes.getValue("roles");

        MemoryRealm realm = (MemoryRealm) context.getRoot();
        realm.addUser(username, password, roles);

    }
View Full Code Here


        // Instantiate a new Loader implementation object
        String className = loaderClass;
        if (attributeName != null) {
            int top = context.getTagCount() - 1;
            AttributeList attributes = context.getAttributeList(top);
            if (attributes.getValue(attributeName) != null)
                className = attributes.getValue(attributeName);
        }
        Class clazz = Class.forName(className);
        Class[] paramTypes = { ClassLoader.class };
        Object[] arguments = { parentClassLoader };
        Constructor constructor = clazz.getDeclaredConstructor(paramTypes);
View Full Code Here

        // Create a new listener object
        String className = listenerClass;
        if (attributeName != null) {
            int top = context.getTagCount() - 1;
            AttributeList attributes = context.getAttributeList(top);
            if (attributes.getValue(attributeName) != null)
                className = attributes.getValue(attributeName);
        }
        if (context.getDebug() >= 1)
            context.log("Add " + className + " listener");
        Class clazz = Class.forName(className);
        LifecycleListener listener =
View Full Code Here

TOP

Related Classes of org.xml.sax.AttributeList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.