Package org.w3c.dom

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


          for (StmtIterator si = r.listProperties(RDF.value); si.hasNext(); ) {
            Duration d = schema.getDuration(si.nextStatement().getString());
            duration = duration==null?d:duration.add(d);
          }
          if (duration!=null)
            e.appendChild(doc.createTextNode(duration.toString()));
        }
        else addXMLValue(rdf, e, doc);
      } catch (Exception e1) {
        Gloze.logger.warn("missing value for: " + getElementName());
      }
View Full Code Here


    if (base != null) {
      String b = expandQName(ctx.getDefaultNS(),base, ctx.getModel());
      Statement s = subject.getProperty(RDF.value);
      if (s!=null) xs.toXMLText(e,s.getObject(),b,null,ctx);
      else if (b.equals(schema.ID) && !subject.isAnon())
        e.appendChild(doc.createTextNode(subject.getLocalName()));
    }
    // add attributes that extend simple content
    for (int i = 0; _attribute != null && i < _attribute.length; i++)
      _attribute[i].toXML(e, subject, pending,ctx);
    for (int i = 0; attributeGroup != null && i < attributeGroup.length; i++)
View Full Code Here

  {
    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)
    {
      Node oldData = children.item(0);
View Full Code Here

    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();
        fieldNode = response.createElement(TAG_FIELD);
        outputNode.appendChild(fieldNode);
View Full Code Here

        {
          fieldNode.setAttribute(ATTRIBUTE_LENGTH, String
              .valueOf(field.length));
        }

        outputNode.appendChild(response.createTextNode("\n"));
      }
    }

    children = response.getElementsByTagName(Constants.XBUSXMLMESSAGE_DATA);
    if (children.getLength() > 0)
View Full Code Here

      for (Enumeration keys = addresses.keys(); keys.hasMoreElements();)
      {
        address = (String) keys.nextElement();
        addressNode = doc.createElement("Address");
        addressNode.setAttribute("name", address);
        addressNode.appendChild(doc.createTextNode((String) addresses
            .get(address)));
        addressesNode.appendChild(addressNode);
      }
      root.appendChild(addressesNode);
    }
View Full Code Here

      if (this._HMACOutputLengthSet) {
         Document doc = element.getOwnerDocument();
         Element HMElem = XMLUtils.createElementInSignatureSpace(doc,
                             Constants._TAG_HMACOUTPUTLENGTH);
         Text HMText =
            doc.createTextNode(new Integer(this._HMACOutputLength).toString());

         HMElem.appendChild(HMText);
         XMLUtils.addReturnToElement(element);
         element.appendChild(HMElem);
         XMLUtils.addReturnToElement(element);
View Full Code Here

      Document doc = DocumentHolder.m_doc;
      synchronized (doc)
      {
        Element element = doc.createElement("token");
        Text text = doc.createTextNode(token);
        element.appendChild(text);
        resultSet.addNode(element);     
      }
    }
   
View Full Code Here

      synchronized (doc)
      {
        while (lTokenizer.hasMoreTokens())
        {
          Element element = doc.createElement("token");
          element.appendChild(doc.createTextNode(lTokenizer.nextToken()));
          resultSet.addNode(element);     
        }
      }
    }
    // If the delimiter is an empty string, create one token Element for
View Full Code Here

      synchronized (doc)
      {
        for (int i = 0; i < toTokenize.length(); i++)
        {
          Element element = doc.createElement("token");
          element.appendChild(doc.createTextNode(toTokenize.substring(i, i+1)));
          resultSet.addNode(element);             
        }
      }
    }
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.