Examples of createTextNode()


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

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

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

        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

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

        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

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

        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

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

        && 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

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

      }
      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

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

          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

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

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

    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

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

  {
    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
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.