Package org.dom4j

Examples of org.dom4j.Element.selectNodes()


       
        Iterator<Element> iter = targets.iterator();
        while (iter.hasNext()) {
            Element targetElement = (Element) iter.next();
            String name = targetElement.attributeValue("name");
            if ((name==null || "".equals(name)) && (targetName==null || "".equals(targetName))) return targetElement.selectNodes("mapping");
            if ((name!=null && targetName!=null && name.equals(targetName))) return targetElement.selectNodes("mapping");
        }
        iter = targets.iterator();
        while (iter.hasNext()) {
            Element targetElement = (Element) iter.next();
View Full Code Here


        Iterator<Element> iter = targets.iterator();
        while (iter.hasNext()) {
            Element targetElement = (Element) iter.next();
            String name = targetElement.attributeValue("name");
            if ((name==null || "".equals(name)) && (targetName==null || "".equals(targetName))) return targetElement.selectNodes("mapping");
            if ((name!=null && targetName!=null && name.equals(targetName))) return targetElement.selectNodes("mapping");
        }
        iter = targets.iterator();
        while (iter.hasNext()) {
            Element targetElement = (Element) iter.next();
            String name = targetElement.attributeValue("name");
View Full Code Here

        }
        iter = targets.iterator();
        while (iter.hasNext()) {
            Element targetElement = (Element) iter.next();
            String name = targetElement.attributeValue("name");
            if (name==null || "".equals(name) || "default".equals(name)) return targetElement.selectNodes("mapping");
        }       
        return null;
    }
   
    @SuppressWarnings("unchecked")
View Full Code Here

      if(this.timeGranulariry.equalsIgnoreCase("Month"))
        s1 = new TimeSeries(serieName, Month.class);
      else if(this.timeGranulariry.equalsIgnoreCase("Week"))
        s1 = new TimeSeries(serieName, Week.class);
   
      List items = serieElement.selectNodes("Item");
      Iterator itemsIterator = items.iterator();
      while(itemsIterator.hasNext())
      {
        Element itemElement = (Element)itemsIterator.next();
        Element yearElement = (Element)itemElement.selectSingleNode("yearId");
View Full Code Here

            component.setPagePartTemplateComponent(partTemplateReferenceComponent);
          }
     
          //Use this later
          //getComponentProperties(componentElement, component, locale, templateController);
          List propertiesNodeList = componentElement.selectNodes("properties");
          if(propertiesNodeList.size() > 0)
          {
            Element propertiesElement = (Element)propertiesNodeList.get(0);
           
            List propertyNodeList = propertiesElement.selectNodes("property");
View Full Code Here

          List propertiesNodeList = componentElement.selectNodes("properties");
          if(propertiesNodeList.size() > 0)
          {
            Element propertiesElement = (Element)propertiesNodeList.get(0);
           
            List propertyNodeList = propertiesElement.selectNodes("property");
            Iterator propertyNodeListIterator = propertyNodeList.iterator();
            while(propertyNodeListIterator.hasNext())
            {
              Element propertyElement = (Element)propertyNodeListIterator.next();
             
View Full Code Here

              {
                component.setPreProcessingOrder(path);
              }

              List<ComponentBinding> bindings = new ArrayList<ComponentBinding>();
              List bindingNodeList = propertyElement.selectNodes("binding");
              Iterator bindingNodeListIterator = bindingNodeList.iterator();
              while(bindingNodeListIterator.hasNext())
              {
                Element bindingElement = (Element)bindingNodeListIterator.next();
                String entity = bindingElement.attributeValue("entity");
View Full Code Here

    //logger.info("restrictionsNodeList:" + restrictionsNodeList.getLength());
    if(restrictionsNodeList.size() > 0)
    {
      Element restrictionsElement = (Element)restrictionsNodeList.get(0);
     
      List restrictionNodeList = restrictionsElement.selectNodes("restriction");
      //logger.info("restrictionNodeList:" + restrictionNodeList.getLength());
      Iterator restrictionNodeListIterator = restrictionNodeList.iterator();
      while(restrictionNodeListIterator.hasNext())
      {
        Element restrictionElement = (Element)restrictionNodeListIterator.next();
View Full Code Here

            //assert contents
            final Document d = reader.read(test1);
            assertNotNull(d);
            final Element root = d.getRootElement();
            assertEquals("project", root.getName());
            assertEquals(1, root.selectNodes("/project/*").size());
            assertEquals(1, root.selectNodes("node").size());
            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("", root.selectSingleNode("node/@description").getStringValue());
View Full Code Here

            final Document d = reader.read(test1);
            assertNotNull(d);
            final Element root = d.getRootElement();
            assertEquals("project", root.getName());
            assertEquals(1, root.selectNodes("/project/*").size());
            assertEquals(1, root.selectNodes("node").size());
            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("", root.selectSingleNode("node/@osArch").getStringValue());
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.