Package org.w3c.dom

Examples of org.w3c.dom.Text


        case TEXT_NODE : {
          if (prevText == null) {
            prevText = (TextImpl) child;
            break;
          }
          Text text = (Text) child;
          removeChild(text);
          prevText.appendText(text);
          child = prevText;
          break;
        }
View Full Code Here


   */
  public void selectNodeContents(Node refNode) throws RangeException, DOMException {
    if (refNode == null)
      return;
    if (refNode.getNodeType() == Node.TEXT_NODE) {
      Text text = (Text) refNode;
      setStart(refNode, 0);
      setEnd(refNode, text.getLength());
    } else {
      NodeList childNodes = refNode.getChildNodes();
      int length = (childNodes != null ? childNodes.getLength() : 0);
      setStart(refNode, 0);
      setEnd(refNode, length);
View Full Code Here

      return;
    }

    if (node.getNodeType() == Node.TEXT_NODE) {
      TextImpl text = (TextImpl) node;
      Text nextText = text.splitText(startStructuredDocumentRegion);
      // notify the change
      text.notifyValueChanged();
      if (nextText == null)
        return; // error
      this.context.setNextNode(nextText);
View Full Code Here

                    }
                } else {
                    children.add(childNode);
                }
            } else if (w3cNode instanceof Text) {
                Text data = (Text) w3cNode;
                buffer.append(data.getData());
            }
        }

        String text = buffer.toString().trim();
        if (text.length() > 0 || (!node.hasChildren() && !node.isRoot())) {
View Full Code Here

     */
    public void setToken(byte[] data) {
        if (data == null) {
            throw new IllegalArgumentException("data == null");
        }
        Text node = getFirstNode();
        node.setData(Base64.encode(data));
    }
View Full Code Here

        } catch (CertificateEncodingException e) {
            throw new WSSecurityException(
                WSSecurityException.SECURITY_TOKEN_UNAVAILABLE, "encodeError", null, e
            );
        }
        Text text = doc.createTextNode(Base64.encode(data));
       
        createKeyIdentifier(doc, X509Security.X509_V3_TYPE, text, true);
    }
View Full Code Here

        if (skiCrypto == null) {
            skiCrypto = new Merlin();
        }
        byte data[] = skiCrypto.getSKIBytesFromCert(cert);
       
        Text text = doc.createTextNode(Base64.encode(data));
        createKeyIdentifier(doc, SKI_URI, text, true);       
    }
View Full Code Here

      doc.appendChild(root);
      for (QuadTreeData geo : filterList) {
        Element item = doc.createElement("item");

        Element id = doc.createElement("id");
        Text idText = doc.createTextNode(geo.getFileName());
        id.appendChild(idText);
        item.appendChild(id);

        Element lat = doc.createElement("lat");
        Text latText = doc.createTextNode(Double.toString(geo.getLatLon()
            .getLat()));
        lat.appendChild(latText);
        item.appendChild(lat);

        Element lon = doc.createElement("lon");
        Text lonText = doc.createTextNode(Double.toString(geo.getLatLon()
            .getLon()));
        lon.appendChild(lonText);
        item.appendChild(lon);

        root.appendChild(item);
      }

      Element timeElem = doc.createElement("time");
      Text timeText = doc.createTextNode(Long.toString(time));
      timeElem.appendChild(timeText);
      root.appendChild(timeElem);

      if (timeToLoad != null) {
        Element indexLoadTimeElem = doc.createElement("indexLoadTime");
        Text indexLoadTimeText = doc.createTextNode(timeToLoad);
        indexLoadTimeElem.appendChild(indexLoadTimeText);
        root.appendChild(indexLoadTimeElem);
        timeToLoad = null; // Only need to send this over to the client
        // on initial load
      }

      Element query = doc.createElement("query");
      root.appendChild(query);
      for (String rStr : regions) {
        Element region = doc.createElement("region");
        Text regionText = doc.createTextNode(rStr);
        region.appendChild(regionText);
        query.appendChild(region);
      }
      try {
        TransformerFactory transfac = TransformerFactory.newInstance();
View Full Code Here

               digestValueElement.removeChild(n);
               n = n.getNextSibling();
         }

         String base64codedValue = Base64.encode(digestValue);
         Text t = this._doc.createTextNode(base64codedValue);

         digestValueElement.appendChild(t);
   }
View Full Code Here

        if (base64codedValue.length() > 76 && !XMLUtils.ignoreLineBreaks()) {
      base64codedValue = "\n" + base64codedValue + "\n";
        }

        Text t = this._doc.createTextNode(base64codedValue);
        signatureValueElement.appendChild(t);
    }
View Full Code Here

TOP

Related Classes of org.w3c.dom.Text

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.