Package org.w3c.dom

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


      {
        emailNode = doc.createTextNode("true");
      }
      else
      {
        emailNode = doc.createTextNode("false");
      }
      emailElement.appendChild(emailNode);
      root.appendChild(emailElement);

    }
View Full Code Here


          {
            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

//         System.out.println("AddText "+domArgument.length());
        if (domArgument.length() >= 1)
        {
          if (!script && !style)
          {
            Text textNode = resultDocument.createTextNode(domArgument);
            currentElement.appendChild(textNode);
          }
          else
          {
            domArgument = domArgument.trim();
View Full Code Here

              currentElement.appendChild(cdataSection);
            }
            else
            {
              domArgument = DomDocumentBuilder.fixText(domArgument);
              Text textNode = resultDocument.createTextNode(domArgument);
              currentElement.appendChild(textNode);
            }
          }
        }
        break;
View Full Code Here

        break;
      case ParserInstruction.AddEntity:
        EntityReference entity = resultDocument.createEntityReference(domArgument);
        // a bugfix for a c++ problem in the mozilla parser:
        if (!Character.isDigit(domArgument.charAt(0)))
          entity.appendChild(resultDocument.createTextNode("&" + domArgument + ";"));
        else
          entity.appendChild(resultDocument.createTextNode(""));
        currentElement.appendChild(entity);
        break;
      case ParserInstruction.AddComment:
View Full Code Here

        EntityReference entity = resultDocument.createEntityReference(domArgument);
        // a bugfix for a c++ problem in the mozilla parser:
        if (!Character.isDigit(domArgument.charAt(0)))
          entity.appendChild(resultDocument.createTextNode("&" + domArgument + ";"));
        else
          entity.appendChild(resultDocument.createTextNode(""));
        currentElement.appendChild(entity);
        break;
      case ParserInstruction.AddComment:
        Comment comment = resultDocument.createComment(domArgument);
        currentElement.appendChild(comment);
View Full Code Here

        Comment comment = resultDocument.createComment(domArgument);
        currentElement.appendChild(comment);
        break;
      case ParserInstruction.SetTitle:
        Element titleNode = createElementNS(resultDocument, currentNamespaceURI, "title");
        titleNode.appendChild(resultDocument.createTextNode(fixText(domArgument)));
        NodeList headElements = resultDocument.getElementsByTagName("head");
        // Add the title with the new text :
        if (headElements.getLength() > 0)
          headElements.item(0).appendChild(titleNode);
        break;
View Full Code Here

        && rdf.canAs(RDFList.class)) {
      RDFList l = (RDFList) rdf.as(RDFList.class);
      for (ExtendedIterator i=l.iterator(); i.hasNext();) {
        v = toXMLValue(element, (RDFNode) i.next(), XSD.IDREF.getURI(), ctx);
        if (v==null) return false; // failed for this type
        element.appendChild(doc.createTextNode(pack==null?v:pack+v));
        pack = " ";
      }
      return true;
    }
    String val = toXMLValue(element, rdf, type, ctx);
View Full Code Here

      }
      return true;
    }
    String val = toXMLValue(element, rdf, type, ctx);
    if (val!=null) {
      element.appendChild(doc.createTextNode(pack==null?val:pack+val));
      return true;
    }
    return false;
  }
 
View Full Code Here

          type.endsWith("#IDREF") ||
          type.endsWith("#IDREFS") ||
          type.endsWith("#NMTOKENS") ||
          type.endsWith("#ENTITY") ||
          type.endsWith("#QName")) {
          e.appendChild(doc.createTextNode(xs.toXMLValue(e, rdf, type, ctx)));
        }
        else if (type.endsWith("#duration") && !rdf.isLiteral()) {
          // sum of all durations
          Duration duration = null;
          Resource r = (Resource) rdf;
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.