Package javax.xml.parsers

Examples of javax.xml.parsers.DocumentBuilder.newDocument()


            documentBuilderFactory.setValidating(false);
            documentBuilderFactory.setNamespaceAware(true);

            documentBuilder  = documentBuilderFactory.newDocumentBuilder();
            this.document    = documentBuilder.newDocument();
            this.currentNode = this.document;
        }

        /**
         * Receive an object for locating the origin of SAX document events.
View Full Code Here


      String schedulerHost, String schedulerTCPPort, String action,
      String expires, String exitCode, Map eventParameters, String supervisorJobChainthrows Exception {
    try{
      DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();               
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();               
            Document addOrderDocument = docBuilder.newDocument();
            Element addOrderElement = addOrderDocument.createElement("add_order");
            addOrderDocument.appendChild(addOrderElement);
            addOrderElement.setAttribute("job_chain", supervisorJobChain);
            Element paramsElement = addOrderDocument.createElement("params");
            addOrderElement.appendChild(paramsElement);
View Full Code Here

                // if ( this.spooler.job_exists(currJob.get("job_name").toString())) continue;
               
               
                DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();               
                DocumentBuilder docBuilder = docFactory.newDocumentBuilder();               
                Document jobDocument = docBuilder.newDocument();
                Element jobElement = jobDocument.createElement("job");
                if(currJob.get("job_name")!=null) jobElement.setAttribute("name", currJob.get("job_name").toString());
                if(currJob.get("title")!=null) jobElement.setAttribute("title", currJob.get("title").toString());
                if(currJob.get("model")==null || currJob.get("model").toString().length()==0 || currJob.get("model").toString().equals("0")){
                  jobElement.setAttribute("order","no");
View Full Code Here

    spooler_log_debug3("....Building request");
    updateRequest = new SchedulerUpdateRequest();
    DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();

    DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
    Document requestXml = docBuilder.newDocument();

    Element envelope = requestXml.createElement("soapenv:Envelope");
    envelope.setAttribute("xmlns:soapenv",
        "http://schemas.xmlsoap.org/soap/envelope/");
View Full Code Here

           
            // Node xNode = myxpath.selectSingleNode("//param/name[text()='service']");
            Node xNode = myxpath.selectSingleNode("//xml_payload");
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();               
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();               
            Document xDoc = docBuilder.newDocument();
            // xDoc.importNode(xNode, true);
            // Element xElem = xDoc.createElement("test");
            // xElem.appendChild(xDoc.importNode(xNode, true));
            xDoc.appendChild(xDoc.importNode(xNode, true));
           
View Full Code Here

        Node node = this.selectSingleNode(element, xpathExpression);
        if (node == null) return "";

        DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();               
        DocumentBuilder docBuilder = docFactory.newDocumentBuilder();               
        Document document = docBuilder.newDocument();
        document.appendChild(document.importNode(node, true));
       
        StringWriter out = new StringWriter();
        XMLSerializer serializer = new XMLSerializer(out, new OutputFormat(document));
        serializer.serialize(document);
View Full Code Here

    String nameInTree ="";
    boolean orderJob = false;
    try{
      DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();               
      DocumentBuilder docBuilder = docFactory.newDocumentBuilder();               
      Document jobDocument = docBuilder.newDocument();
      Element jobElement = jobDocument.createElement("job");
      if(currJob.get("job_name")!=null) {
        jobElement.setAttribute("name", currJob.get("job_name").toString());
        nameInTree = currJob.get("job_name").toString();
      }
View Full Code Here

    String jobChainTitle = jobChainName;

    try {
      DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();               
      DocumentBuilder docBuilder = docFactory.newDocumentBuilder();               
      Document jobChainDocument = docBuilder.newDocument();
      Element jobChainElement = jobChainDocument.createElement("job_chain");

      jobChainElement.setAttribute("name", chain.get("name").toString());

      // Tasks des aktuellen Workflow Modells einlesen
View Full Code Here

    try{                 
            String currentWorkflowModelName = order.get("job_chain").toString();           
     
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();               
      DocumentBuilder docBuilder = docFactory.newDocumentBuilder();               
      Document orderDocument = docBuilder.newDocument();
      Element orderElement = orderDocument.createElement("add_order");
     
      orderElement.setAttribute("job_chain", currentWorkflowModelName);
      orderElement.setAttribute("id", orderId);
      orderElement.setAttribute("replace", "yes");
View Full Code Here

  public boolean spooler_process() throws Exception {
    boolean rc = true;
    try{
      DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();               
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            Document eventDocument = docBuilder.newDocument();
            eventDocument.appendChild(eventDocument.createElement("events"));
           
            JobSchedulerEventJob.readEventsFromDB(getConnection(), spooler, eventDocument, getLogger());
           
            // merge params
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.