Package org.w3c.dom

Examples of org.w3c.dom.Document.createElement()


      emailElement = doc.createElement("Content");
      emailNode = doc.createTextNode(mContent);
      emailElement.appendChild(emailNode);
      root.appendChild(emailElement);

      emailElement = doc.createElement("IsHTMLMessage");
      if (isHTMLMessage())
      {
        emailNode = doc.createTextNode("true");
      }
      else
View Full Code Here


        {
          String[] values = (String[]) obj;
          mSource.setAddress(XBUSSystem.FILENAME_WILDCARD, values[0]);
        }

        Element rootNode = requestDoc.createElement(mSource.getName());
        requestDoc.appendChild(rootNode);

        SortedSet paramSet = new TreeSet(parameters.keySet());
        String key = null;
        Node tmpNode = null;
View Full Code Here

          else
          {
            values = (String[]) parameters.get(key);
            for (int i = 0; i < values.length; i++)
            {
              tmpNode = requestDoc.createElement(key);
              tmpNode.appendChild(requestDoc
                  .createTextNode(values[i]));
              rootNode.appendChild(tmpNode);
            }
          }
View Full Code Here

      || (xs.getElementFormDefault().equals("unqualified")))
        e.setPrefix(lookupPrefix(xs.getTargetNamespace(),m,ctx));
      xml.appendChild(e);
    } else {
      // don't define the element in the (target) namespace
      e = doc.createElement(getElementName());
      xml.appendChild(e);
    }
    // nil
    if (def.is_nillable()) {
      if (rdf instanceof Resource
View Full Code Here

  private Document getResponseDocument(String function, List outputLists)
      throws XException
  {
    Document response = getTemplateAsDocument();

    Element newFunction = response
        .createElement(Constants.XBUSXMLMESSAGE_FUNCTION);
    newFunction.appendChild(response.createTextNode(function));
    NodeList children = response
        .getElementsByTagName(Constants.XBUSXMLMESSAGE_FUNCTION);
    if (children.getLength() > 0)
View Full Code Here

      Node oldData = children.item(0);
      Node father = oldData.getParentNode();
      father.replaceChild(newFunction, oldData);
    }

    Element newData = response.createElement(Constants.XBUSXMLMESSAGE_DATA);

    List fields = null;
    Field field = null;
    Element outputNode = null;
    Element fieldNode = null;
View Full Code Here

    Element outputNode = null;
    Element fieldNode = null;
    for (Iterator it1 = outputLists.iterator(); it1.hasNext();)
    {
      fields = (List) it1.next();
      outputNode = response.createElement(TAG_OUTPUT);
      newData.appendChild(outputNode);
      outputNode.appendChild(response.createTextNode("\n"));
      for (Iterator it2 = fields.iterator(); it2.hasNext();)
      {
        field = (Field) it2.next();
View Full Code Here

      newData.appendChild(outputNode);
      outputNode.appendChild(response.createTextNode("\n"));
      for (Iterator it2 = fields.iterator(); it2.hasNext();)
      {
        field = (Field) it2.next();
        fieldNode = response.createElement(TAG_FIELD);
        outputNode.appendChild(fieldNode);
        fieldNode.setAttribute(ATTRIBUTE_NAME, field.name);
        fieldNode.setAttribute(ATTRIBUTE_VALUE, field.value);
        fieldNode.setAttribute(ATTRIBUTE_FORMAT, field.format);
        if (!FORMAT_DATE.equals(field.format))
View Full Code Here

          "13");
    }
    Document resultDocument = builder.newDocument();

    // create root node <i>systemName</i>
    Element root = resultDocument.createElement(systemName);
    resultDocument.appendChild(root);

    // separate the entries
    Vector lines = returnSeparatedEntries(text);
    int lineCounter = 0;
View Full Code Here

    if (isHasHeader())
    {
      lineCounter++;
    }

    Element records = resultDocument.createElement("Records");
    root.appendChild(records);

    // go through the entries and parse every single one of them
    for (; lineCounter < lines.size(); lineCounter++)
    {
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.