Package org.dom4j

Examples of org.dom4j.Element.asXML()


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

      String variableName = variableElement.attributeValue("name");
      if (variableName == null)
      {
        addProblem(new Problem(Problem.LEVEL_WARNING, "the name attribute of a variable element is required: " + variableElement.asXML()));
      }
      String access = variableElement.attributeValue("access", "read,write");
      String mappedName = variableElement.attributeValue("mapped-name");

      variableAccesses.add(new VariableAccess(variableName, access, mappedName));
View Full Code Here


      Action action = (Action)unresolvedActionReference[1];
      String referencedActionName = actionElement.attributeValue("ref-name");
      Action referencedAction = processDefinition.getAction(referencedActionName);
      if (referencedAction == null)
      {
        addWarning("couldn't resolve action reference in " + actionElement.asXML());
      }
      action.setReferencedAction(referencedAction);
    }
  }
View Full Code Here

    while (iter.hasNext()) {
      Element variableElement = (Element) iter.next();
     
      String variableName = variableElement.attributeValue("name");
      if (variableName==null) {
        addProblem(new Problem(Problem.LEVEL_WARNING, "the name attribute of a variable element is required: "+variableElement.asXML()));
      }
      String access = variableElement.attributeValue("access", "read,write");
      String mappedName = variableElement.attributeValue("mapped-name");
     
      variableAccesses.add(new VariableAccess(variableName, access, mappedName));
View Full Code Here

      Element actionElement = (Element) unresolvedActionReference[0];
      Action action = (Action) unresolvedActionReference[1];
      String referencedActionName = actionElement.attributeValue("ref-name");
      Action referencedAction = processDefinition.getAction(referencedActionName);
      if (referencedAction==null) {
        addWarning("couldn't resolve action reference in "+actionElement.asXML());
      }
      action.setReferencedAction(referencedAction);
    }
  }
View Full Code Here

      "</carPart><model>Model 1</model><carType id=\"" +
      carType.getId() +
      "\"><typeName>Type 1</typeName></carType></car>";
       
    print(element);
    assertTrue(element.asXML().equals(expectedResult));
   
    s.createQuery("delete from CarPart").executeUpdate();
    s.createQuery("delete from Car").executeUpdate();
    s.createQuery("delete from CarType").executeUpdate();
   
View Full Code Here

       
    for (int i = 0; i < list.size(); i++) {
      Element element = (Element) list.get(i);

      print(element);
      assertTrue(element.asXML().equals(expectedResults[i]));
    }
   
    s.createQuery("delete from Car").executeUpdate();
    s.createQuery("delete from CarType").executeUpdate();
   
View Full Code Here

    private String createErrorBody(String type, String condition) {
        Element body = DocumentHelper.createElement("body");
        body.addNamespace("", "http://jabber.org/protocol/httpbind");
        body.addAttribute("type", type);
        body.addAttribute("condition", condition);
        return body.asXML();
    }

    private void handleSessionRequest(String sid, HttpServletRequest request,
                                      HttpServletResponse response, Element rootNode)
            throws IOException
View Full Code Here

    }

    private static String createEmptyBody() {
        Element body = DocumentHelper.createElement("body");
        body.addNamespace("", "http://jabber.org/protocol/httpbind");
        return body.asXML();
    }

    private long getLongAttribue(String value, long defaultValue) {
        if (value == null || "".equals(value)) {
            return defaultValue;
View Full Code Here

                    Log.debug("ServerDialback: OS - Unexpected answer in validation from: " + hostname + " id: " +
                            id +
                            " for domain: " +
                            domain +
                            " answer:" +
                            doc.asXML());
                    return false;
                }
            }
            catch (InterruptedException e) {
                Log.debug("ServerDialback: OS - Validation FAILED from: " + hostname +
View Full Code Here

                                    hostname);
                            return valid;
                        }
                    }
                    else {
                        Log.debug("ServerDialback: db:verify answer was: " + doc.asXML());
                    }
                }
                catch (DocumentException e) {
                    Log.error("An error occured connecting to the Authoritative Server", e);
                    // Thrown an error so <remote-connection-failed/> stream error condition is
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.