Package org.dom4j

Examples of org.dom4j.Element.attributeIterator()


        for (Iterator it2 = aspect.elementIterator(); it2.hasNext();) {
            final Element nestedAdviceElement = (Element)it2.next();
            if (nestedAdviceElement.getName().trim().equals("bind-introduction")) {
                try {
                    final BindIntroductionRule bindIntroductionRule = new BindIntroductionRule();
                    for (Iterator it3 = nestedAdviceElement.attributeIterator(); it3.hasNext();) {
                        Attribute attribute = (Attribute)it3.next();
                        final String name = attribute.getName().trim();
                        final String value = attribute.getValue().trim();
                        if (name.equals("class")) {
                            bindIntroductionRule.setExpression(
View Full Code Here


            final Element nestedAdviceElement = (Element)it2.next();
            if (nestedAdviceElement.getName().trim().equals("bind-advice")) {
                try {
                    final BindAdviceRule bindAdviceRule = new BindAdviceRule();

                    for (Iterator it3 = nestedAdviceElement.attributeIterator(); it3.hasNext();) {
                        Attribute attribute = (Attribute)it3.next();
                        final String name = attribute.getName().trim();
                        final String value = attribute.getValue().trim();
                        if (name.equals("cflow")) {
                            //bindAdviceRule.setCFlowExpression(value);
View Full Code Here

        boolean hasDef = false;
        for (Iterator it1 = root.elementIterator("advices-def"); it1.hasNext();) {
            final AdviceStackDefinition adviceStackDef = new AdviceStackDefinition();

            Element adviceStack = (Element)it1.next();
            for (Iterator it2 = adviceStack.attributeIterator(); it2.hasNext();) {
                Attribute attribute = (Attribute)it2.next();
                final String name = attribute.getName().trim();
                final String value = attribute.getValue().trim();
                if (name.equals("name")) {
                    adviceStackDef.setName(value);
View Full Code Here

            final PersistenceDefinition definition) {
        for (Iterator it1 = root.elementIterator("index"); it1.hasNext();) {
            IndexDefinition indexDef = new IndexDefinition();

            Element introduction = (Element)it1.next();
            for (Iterator it2 = introduction.attributeIterator(); it2.hasNext();) {
                Attribute attribute = (Attribute)it2.next();

                String name = attribute.getName().trim();
                String value = attribute.getValue().trim();
                if (name.equals("name")) {
View Full Code Here

        for (Iterator it1 = root.elementIterator("persistence-manager"); it1.hasNext();) {

            PersistenceManagerDefinition pmDef = new PersistenceManagerDefinition();

            final Element pm = (Element)it1.next();
            for (Iterator it2 = pm.attributeIterator(); it2.hasNext();) {
                Attribute attribute = (Attribute)it2.next();
                String name = attribute.getName().trim();
                String value = attribute.getValue().trim();
                if (name.equals("class")) {
                    pmDef.setClassName(value);
View Full Code Here

        for (Iterator it1 = root.elementIterator("persistent"); it1.hasNext();) {
            final PersistentObjectDefinition persistentDef =
                    new PersistentObjectDefinition();

            final Element persistent = (Element)it1.next();
            for (Iterator it2 = persistent.attributeIterator(); it2.hasNext();) {
                Attribute attribute = (Attribute)it2.next();
                String name = attribute.getName().trim();
                String value = attribute.getValue().trim();
                if (name.equals("class")) {
                    persistentDef.setClassName(value);
View Full Code Here

        boolean hasDef = false;
        for (Iterator it1 = systemElement.elementIterator("use-aspect"); it1.hasNext();) {

            String className = null;
            Element aspect = (Element)it1.next();
            for (Iterator it2 = aspect.attributeIterator(); it2.hasNext();) {
                Attribute attribute = (Attribute)it2.next();

                final String name = attribute.getName().trim();
                final String value = attribute.getValue().trim();
                if (name.equals("class")) {
View Full Code Here

            return JaxenConstants.EMPTY_ITERATOR;
        }

        Element elem = (Element) contextNode;

        return elem.attributeIterator();
    }

    /**
     * Retrieves an <code>Iterator</code> over the attribute elements that
     * match the supplied name.
View Full Code Here

            return null;
        }

        Element elem = (Element) contextNode;

        return elem.attributeIterator();
    }

    public Iterator getNamespaceAxisIterator(Object contextNode)
    {
        if ( ! ( contextNode instanceof Element ) )
View Full Code Here

        testNodePath(branch);

        if (branch instanceof Element) {
            Element element = (Element) branch;

            for (Iterator iter = element.attributeIterator(); iter.hasNext();) {
                Node node = (Node) iter.next();
                testNodePath(node);
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.