Examples of asXml()


Examples of org.dom4j.Document.asXML()

            m.remove(m.attribute("script"));
            Document d = m.getDocument();
            d.addDocType("channel-definition", null, "channelDefinition.dtd");

            String xml = d.asXML();
            InputStream inpt = new ByteArrayInputStream(xml.getBytes());
            IChannelPublisher pub = ChannelPublisher.getCommandLineInstance();
            pub.publishChannel(inpt);

        } catch (Throwable t) {
View Full Code Here

Examples of org.dom4j.Document.asXML()

                "location", "US").addText("Bob McWhirter");
        // now that we have something to process, we compare the origial version
        // with
        // the processed one.
        // As document has no equals method, we compare the xml representation.
        String original = document.asXML();
        Document pdoc = mod.process(document)[0];
        String modified = pdoc.asXML();
        assertEquals(
                "The returned document is different from the processed one",
                original, modified);
View Full Code Here

Examples of org.dom4j.Document.asXML()

        // with
        // the processed one.
        // As document has no equals method, we compare the xml representation.
        String original = document.asXML();
        Document pdoc = mod.process(document)[0];
        String modified = pdoc.asXML();
        assertEquals(
                "The returned document is different from the processed one",
                original, modified);
    }
}
View Full Code Here

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

Examples of org.dom4j.Element.asXML()

      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

Examples of org.dom4j.Element.asXML()

    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

Examples of org.dom4j.Element.asXML()

      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

Examples of org.dom4j.Element.asXML()

      "</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

Examples of org.dom4j.Element.asXML()

       
    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

Examples of org.dom4j.Element.asXML()

    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
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.