Package org.dom4j

Examples of org.dom4j.Element.attributeIterator()


            if (nestedAdviceElement.getName().trim().equals("pointcut-def") ||
                    nestedAdviceElement.getName().trim().equals("pointcut")) {
                try {
                    final PointcutDefinition pointcutDef = new PointcutDefinition();

                    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("name")) {
                            pointcutDef.setName(value);
View Full Code Here


            if (nestedAdviceElement.getName().trim().equals("controller-def") ||
                    nestedAdviceElement.getName().trim().equals("controller")) {
                try {
                    final ControllerDefinition controllerDef = new ControllerDefinition();

                    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("pointcut") || name.equals("expression")) {
                            controllerDef.setExpression(value);
View Full Code Here

            if (nestedAdviceElement.getName().trim().equals("bind-introduction") ||
                    nestedAdviceElement.getName().trim().equals("introduction")) {
                try {
                    final IntroductionWeavingRule introWeavingRule = new IntroductionWeavingRule();

                    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")) {
                            introWeavingRule.setClassPattern(packageName + value);
View Full Code Here

            if (nestedAdviceElement.getName().trim().equals("bind-advice") ||
                    nestedAdviceElement.getName().trim().equals("advice")) {
                try {
                    final AdviceWeavingRule adviceWeavingRule = new AdviceWeavingRule();

                    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")) {
                            adviceWeavingRule.setCFlowExpression(value);
View Full Code Here

                                                 final AspectWerkzDefinition definition) {
        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

              String name = null;
              String path = null;
              boolean checkModification = false;
              boolean lazyLoad = false;
              @SuppressWarnings("rawtypes")
              Iterator attributeIterator = crElement.attributeIterator();
              while (attributeIterator.hasNext()) {
                Attribute attribute = (Attribute) attributeIterator.next();
                if (attribute.getName().equals("name")) {
                  name = attribute.getValue();
                } else if (attribute.getName().equals("path")) {
View Full Code Here

      Element element = (Element) iterator.next();
      if (element.getName().equals("type")) {
        types.add(element.getTextTrim());
      } else if (element.getName().equals("default")) {
        @SuppressWarnings("rawtypes")
        Iterator attributeIterator = element.attributeIterator();
        while (attributeIterator.hasNext()) {
          Attribute attribute = (Attribute) attributeIterator.next();
          if (attribute.getName().equals("tag")) {
            tag = attribute.getValue().trim();
          } else {
View Full Code Here

      e.printStackTrace();
    }
    // 根据Xpath搜索节点
    Element elRoot = (Element) document.selectSingleNode(pXPath);
    // 遍历节点属性值将其压入Dto
    for (Iterator it = elRoot.attributeIterator(); it.hasNext();) {
      Attribute attribute = (Attribute) it.next();
      outDto.put(attribute.getName().toLowerCase(), attribute.getData());
    }
    return outDto;
  }
View Full Code Here

    Element elRoot = document.getRootElement();
    // 获取根节点的所有子节点元素
    Iterator elIt = elRoot.elementIterator();
    while (elIt.hasNext()) {
      Element el = (Element) elIt.next();
      Iterator attrIt = el.attributeIterator();
      Dto dto = new BaseDto();
      while (attrIt.hasNext()) {
        Attribute attribute = (Attribute) attrIt.next();
        dto.put(attribute.getName().toLowerCase(), attribute.getData());
      }
View Full Code Here

            Element system = (Element) it1.next();
            final String basePackage = getBasePackage(system);
            for (Iterator it11 = system.elementIterator("aspect"); it11.hasNext();) {
                String className = null;
                Element aspect = (Element) it11.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.equalsIgnoreCase("class")) {
                        className = value;
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.