Package org.dom4j

Examples of org.dom4j.Element.selectSingleNode()


      Element rootElement = document.getRootElement();
      String _name = rootElement.attributeValue(StarFlowNames.FLOW_ATTR_NAME);
      String _chname = rootElement.attributeValue(StarFlowNames.FLOW_ATTR_CHNAME);
      String _version = rootElement.attributeValue(StarFlowNames.FLOW_ATTR_VERSION);
      String _xpath = "/ProcessDefine/ProcessProperty/".concat(StarFlowNames.FLOW_CHILD_DESC);
      String _description = rootElement.selectSingleNode(_xpath).getText();
     
      _xpath = "/ProcessDefine/ProcessProperty/".concat(StarFlowNames.FLOW_CHILD_LIMITTIME);
      String _limitTime = rootElement.selectSingleNode(_xpath).getText();
     
      processDefine.setProcessDefName(_name);
View Full Code Here


      String _version = rootElement.attributeValue(StarFlowNames.FLOW_ATTR_VERSION);
      String _xpath = "/ProcessDefine/ProcessProperty/".concat(StarFlowNames.FLOW_CHILD_DESC);
      String _description = rootElement.selectSingleNode(_xpath).getText();
     
      _xpath = "/ProcessDefine/ProcessProperty/".concat(StarFlowNames.FLOW_CHILD_LIMITTIME);
      String _limitTime = rootElement.selectSingleNode(_xpath).getText();
     
      processDefine.setProcessDefName(_name);
     
      if(_chname != null)
        processDefine.setProcessCHName(_chname);
View Full Code Here

    Element rootElement = document.getRootElement();
    String name = rootElement.attributeValue(StarFlowNames.FLOW_ATTR_NAME);
    String chname = rootElement.attributeValue(StarFlowNames.FLOW_ATTR_CHNAME);
    String version = rootElement.attributeValue(StarFlowNames.FLOW_ATTR_VERSION);
    String xpath = "/ProcessDefine/ProcessProperty/".concat(StarFlowNames.FLOW_CHILD_DESC);
    String description = rootElement.selectSingleNode(xpath).getText();
   
    xpath = "/ProcessDefine/ProcessProperty/".concat(StarFlowNames.FLOW_CHILD_LIMITTIME);
    String limitTime = rootElement.selectSingleNode(xpath).getText();
   
    processXml.setName(name);
View Full Code Here

    String version = rootElement.attributeValue(StarFlowNames.FLOW_ATTR_VERSION);
    String xpath = "/ProcessDefine/ProcessProperty/".concat(StarFlowNames.FLOW_CHILD_DESC);
    String description = rootElement.selectSingleNode(xpath).getText();
   
    xpath = "/ProcessDefine/ProcessProperty/".concat(StarFlowNames.FLOW_CHILD_LIMITTIME);
    String limitTime = rootElement.selectSingleNode(xpath).getText();
   
    processXml.setName(name);
   
    if(chname != null)
      processXml.setChname(chname);
View Full Code Here

          }
        } else if (instance.getType() == TYPE_KPRIM) {
          instance.setSingleCorrect(false);
          float maxValue = 0;
          try {
            Node score = resprocessingXML.selectSingleNode(".//decvar[@varname='SCORE']/@maxvalue");
            if (score != null) {
              maxValue = Float.parseFloat(score.getText());
            }

          } catch (NumberFormatException e) {
View Full Code Here

            }
          }
        }

        // set min/max score
        QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
      }
    } catch (NullPointerException e) {
      /*
       * A null pointer exeption may occur (and has occured) due to incomplete
       * implementation of the qti specification within OLAT. Since the QTI xml
View Full Code Here

        instance.setSingleCorrect(false);
      }
 
      // set min/max score
      QTIEditHelper.configureMinMaxScore(instance,
       (Element)resprocessingXML.selectSingleNode(".//decvar"));
    }   
    return instance;
  }
 
  /**
 
View Full Code Here

      Element el_section = (Element) iter.next();

      // resolve sectionref into the correct sections
      if (el_section.getName().equals("sectionref")) {
        String linkRefId = el_section.attributeValue("linkrefid");
        el_section = (Element) el_section.selectSingleNode("//section[@ident='" + linkRefId + "']");
        if (el_section == null) { throw new RuntimeException("sectionref with ref '" + linkRefId + "' could not be resolved"); }
      }

      SectionContext sc = new SectionContext();
      sc.setUp(assessInstance, el_section, sw);
View Full Code Here

        {
          final Element updateElement = (Element) updateElements.get(i);
          final String version = updateElement.attributeValue("version");//NON-NLS
          final String type = updateElement.attributeValue("type");//NON-NLS
          //final String os = updateElement.attributeValue("os");
          final String downloadUrl = updateElement.selectSingleNode("downloadurl").getText();//NON-NLS
          final UpdateInfo info = new UpdateInfo(version, type, downloadUrl);
          updates.add(info);
        }

        if (updates.isEmpty())
View Full Code Here

        // Gets the user's ID from Clearspace
        try {
            String path = ClearspaceUserProvider.USER_URL_PREFIX + "users/" + unescapedUsername;
            Element element = executeRequest(org.jivesoftware.openfire.clearspace.ClearspaceManager.HttpType.GET, path);

            Long id = Long.valueOf(WSUtils.getElementText(element.selectSingleNode("return"), "ID"));

            userIDCache.put(username, id);

            return id;
        } catch (UserNotFoundException unfe) {
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.