Package org.w3c.dom

Examples of org.w3c.dom.Element


          String nodeName = xmlNode.getNodeName();
          if (nodeName.equals(type)) {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            NodeList subNodeList = xmlNode.getChildNodes();
                for (int j = 0; j < subNodeList.getLength(); j++) {
                  Element subXmlNode = (Element) subNodeList.item(j);
                  DroolsAction action = extractAction(subXmlNode);
                  actions.add(action);
                }
              node.setActions(type, actions);
            return;
View Full Code Here


    }   
   
    public Object end(final String uri,
                      final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
        return null;
    }
View Full Code Here

                  Message odeResponse = mex.createMessage(mex.getOperation().getOutput().getMessage().getQName());
                  if(soapResponseMessage.getSOAPBody().hasFault())
                  {
                    // fault handling
                    Document odeMsg = DOMUtils.newDocument();
                    Element odeMsgEl = odeMsg.createElementNS(null, "message");
                    odeMsg.appendChild(odeMsgEl);
                   
                    Fault fault = messageAdapter.parseSoapFault(odeMsgEl, soapResponseMessage, mex.getOperation());

                    handleFault(mex, fault, soapResponseMessage.getSOAPBody().getFault(), odeMsgEl);
                   
                  }
                  else
                  {
                    messageAdapter.parseSoapResponse(new ODEMessageAdapter(odeResponse),
                            soapResponseMessage,mex.getOperation());
                    mex.reply(odeResponse);
                  }

                  if(log.isDebugEnabled())
                    log.debug( "ODE inbound message: \n" +DOMWriter.printNode(odeResponse.getMessage(), true) );
                 
              } catch(javax.xml.ws.soap.SOAPFaultException fe) {
               
                    // fault handling
                    Document odeMsg = DOMUtils.newDocument();
                    Element odeMsgEl = odeMsg.createElementNS(null, "message");
                    odeMsg.appendChild(odeMsgEl);
                   
                  if (log.isDebugEnabled()) {
                    log.debug("Riftsaw soap fault: \n" + DOMWriter.printNode(fe.getFault(), true));
                  }
View Full Code Here

    }   
   
    public Object end(final String uri,
                      final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
        return null;
    }
View Full Code Here


      DocumentBuilder builder =
          DocumentBuilderFactory.newInstance().newDocumentBuilder();
      Document doc = builder.parse(in);
      Element root = doc.getDocumentElement();

      normalize(root);

      ByteArrayOutputStream bout = new ByteArrayOutputStream();
      Writer writer = new PrintWriter(bout);
View Full Code Here

      throw new IllegalArgumentException("request XML not set");
    request.setPart(null, this.requestXML);
   
    if (requestHeaderParts != null) {
      for (String part : requestHeaderParts.keySet()) {
        Element elem=requestHeaderParts.get(part);
       
        request.setHeaderPart(part, elem);
      }
    }
  }
View Full Code Here

            throws SAXException {
        super.handleNode(node, element, uri, localName, parser);
        ActionNode actionNode = (ActionNode) node;
        org.w3c.dom.Node xmlNode = element.getFirstChild();
        if (xmlNode instanceof Element) {
        Element actionXml = (Element) xmlNode;
        DroolsAction action = extractAction(actionXml);
        actionNode.setAction(action);
        }
    }
View Full Code Here

      Document accountsDocument = domBuilder.parse(resource.toString());
      // give everyone an initial balance of $50
      Double initialBalance = new Double(50);
      // iterate over the accounts
      Map<String, Double> accounts = new HashMap<String, Double>();
      Element accountsElem = accountsDocument.getDocumentElement();
      NodeList accountElems = accountsElem.getElementsByTagName("account");
      for (int i = 0, n = accountElems.getLength(); i < n; i++) {
        Element accountElem = (Element) accountElems.item(i);
        // create account, assign initial balance
        String customerName = accountElem.getAttribute("holder");
        accounts.put(customerName, initialBalance);
      }
      return accounts;
    }
    catch (ParserConfigurationException e) {
View Full Code Here

    }   
   
    public Object end(final String uri,
                      final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
        return null;
    }
View Full Code Here

    }   
   
    public Object end(final String uri,
                      final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
        Object parent = parser.getParent();
        final String type = element.getAttribute("type");
        emptyAttributeCheck(localName, "type", type, parser);
        if ("eventType".equals(type)) {
            final String eventType = element.getAttribute("eventType");
            emptyAttributeCheck(localName, "eventType", eventType, parser);
            EventTypeFilter eventTypeFilter = new EventTypeFilter();
            eventTypeFilter.setType(eventType);
            if (parent instanceof EventNode) {
              ((EventNode) parent).addEventFilter(eventTypeFilter);
View Full Code Here

TOP

Related Classes of org.w3c.dom.Element

Copyright © 2018 www.massapicom. 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.