Examples of CStringBuilder


Examples of org.allcolor.xml.parser.CStringBuilder

    while (i >= 0) {
      String token = (String) selTokenizerList.get(i);

      //System.err.println("new tk "+token);
      if ("]".equals(token)) {
        CStringBuilder modifier = new CStringBuilder();

        if ((i - 2) >= 0) {
          i--;
          token = (String) selTokenizerList.get(i);

          while ((i >= 0) && (!token.equals("["))) {
            modifier.append(token);
            i--;
            token = (String) selTokenizerList.get(i);
          } // end while

          modifierList.add(modifier.toString());
        } // end if
        else {

          break;
        }
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

   * DOCUMENT ME!
   *
   * @return DOCUMENT ME!
   */
  public String toString() {
    CStringBuilder result = new CStringBuilder();
    result.append("<![CDATA[");
    result.append(getData());
    result.append("]]>");

    return result.toString();
  } // end toString()
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

   * DOCUMENT ME!
   *
   * @return DOCUMENT ME!
   */
  public String toString() {
    CStringBuilder result = new CStringBuilder();
    result.append("<!--");
    result.append(getData());
    result.append("-->");

    return result.toString();
  } // end toString()
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

     * DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public String toString() {
      CStringBuilder buffer = new CStringBuilder();
      buffer.append("Namespace : ");
      buffer.append(getNamespaceURI());
      buffer.append(" Prefix : '");
      buffer.append((getPrefix() == null) ? "" : getPrefix());
      buffer.append("'");

      return buffer.toString();
    } // end toString()
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

   * DOCUMENT ME!
   *
   * @return DOCUMENT ME!
   */
  public final String toString() {
    CStringBuilder result = new CStringBuilder();
    if (this.hasChildNodes()) {
      NodeList nl = this.getChildNodes();
      for (int i = 0; i < nl.getLength(); i++) {
        Node node = nl.item(i);
        result.append(node.toString());
      } // end for
    } // end if

    return result.toString();
  } // end toString()
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

   */
  public final static String stringReplace(
    String toBeReplaced,
    final String toReplace,
    final String replacement) {
    CStringBuilder result = new CStringBuilder();
    int         index = toBeReplaced.indexOf(toReplace,0);

    if (index == -1) {
      return toBeReplaced;
    }

    while (index != -1) {
      result.append(toBeReplaced.substring(0, index));
      result.append(replacement);
      toBeReplaced     = toBeReplaced.substring(index +
          toReplace.length());
      index       = toBeReplaced.indexOf(toReplace,0);
    } // end while

    result.append(toBeReplaced);

    return result.toString();
  } // end stringReplace()
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

   * DOCUMENT ME!
   *
   * @return DOCUMENT ME!
   */
  public String toString() {
    CStringBuilder result = new CStringBuilder();

    if (hasChildNodes()) {
      NodeList nl = getChildNodes();

      for (int i = 0; i < nl.getLength(); i++) {
        Node node = nl.item(i);
        result.append(node.toString());
      } // end for
    } // end if

    return result.toString();
  } // end toString()
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

   * @throws DOMException DOCUMENT ME!
   */
  public void setData(String data)
    throws DOMException {
    isReadOnly();
    CStringBuilder result = new CStringBuilder();

    while (data.indexOf("?>",0) != -1) {
      result.append(data.substring(0, data.indexOf("?>",0)));
      data = data.substring(data.indexOf("?>",0) + 2);
    } // end while

    result.append(data);
    this.data = result.toString();
  } // end setData()
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

  public String toString() {
    if (name.equals("xml")) {
      return "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
    } // end if

    CStringBuilder result = new CStringBuilder();
    result.append("<?");
    result.append(name);
    result.append(" ");
    result.append(data.trim());
    result.append(" ?>");

    return result.toString();
  } // end toString()
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder

   * DOCUMENT ME!
   *
   * @return DOCUMENT ME!
   */
  public String toString() {
    CStringBuilder result = new CStringBuilder();
    result.append("<");
    result.append(name);
    if (listAttributes != null) {
      if (listAttributes.getLength() > 0) {
        result.append(" ");
      } // end if
 
      for (int i=0;i<listAttributes.getLength();i++) {
        CAttr attr = (CAttr) listAttributes.item(i);
        result.append(attr.toString());
 
        if (i < listAttributes.getLength()-1) {
          result.append(" ");
        } // end if
      } // end while
    }
    if (hasChildNodes()) {
      result.append(">");

      NodeList nl = getChildNodes();

      for (int i = 0; i < nl.getLength(); i++) {
        Node node = nl.item(i);
        result.append(node.toString());
      } // end for

      result.append("</");
      result.append(name);
      result.append(">");
    } // end if
    else {
      result.append(" />");
    } // end else

    return result.toString();
  } // end toString()
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.