Package org.w3c.dom

Examples of org.w3c.dom.Comment


            TextImplEx saajTextNode =
                    new TextImplEx(text.getData(), parent, prevSiblingDOMNode, nextSiblingDOMNode);
            ((NodeImpl)domNode).setUserData(SAAJ_NODE, saajTextNode, null);
            return saajTextNode;
        } else if (domNode instanceof org.w3c.dom.Comment) {
            Comment comment = (Comment)domNode;
            org.w3c.dom.Node prevSiblingDOMNode = comment.getPreviousSibling();
            org.w3c.dom.Node nextSiblingDOMNode = comment.getNextSibling();
            SOAPElementImpl parent = new SOAPElementImpl((ElementImpl)domNode.getParentNode());
            TextImplEx saajTextNode = new TextImplEx("<!--" +
                    comment.getData() +
                    "-->",
                                                     parent, prevSiblingDOMNode,
                                                     nextSiblingDOMNode);
            ((NodeImpl)domNode).setUserData(SAAJ_NODE, saajTextNode, null);
            return saajTextNode;
View Full Code Here


            Transformer aTransformer = tranFactory.newTransformer();

            // lo creamos de cero por que no existe
            Document doc = parser.newDocument();

            Comment comment = doc.createComment("GestDB. File containing the user's favorite querys");
            doc.appendChild(comment);

            Element eFavoritos = doc.createElement("favoritos"); // creamos el elemento root
            doc.appendChild(eFavoritos);
View Full Code Here

            if(doc == null)
            {
                // lo creamos de cero por que no existe
                doc = parser.newDocument();

                Comment comment = doc.createComment("GestDB. File containing the user's favorite querys");
                doc.appendChild(comment);

                Element eFavoritos = doc.createElement("favoritos"); // creamos el elemento root
                doc.appendChild(eFavoritos);
            }
View Full Code Here

   private void appendCommentNode(SOAPElement soapElement, Node child)
   {
      String nodeValue = child.getNodeValue();
      Document ownerDoc = soapElement.getOwnerDocument();
      Comment comment = ownerDoc.createComment(nodeValue);
      soapElement.appendChild(comment);
   }
View Full Code Here

            container.addTextNode(nodeValue);
         }
         else if (childType == Node.COMMENT_NODE)
         {
            String nodeValue = child.getNodeValue();
            Comment comment = ownerDoc.createComment(nodeValue);
            container.appendChild(comment);
         }
         else if (childType == Node.CDATA_SECTION_NODE)
         {
            String nodeValue = child.getNodeValue();
View Full Code Here

                case Node.CDATA_SECTION_NODE:
                    CDATASection s = doc.createCDATASection(n.getNodeValue());
                    documentationEl.appendChild(s);
                    break;
                case Node.COMMENT_NODE:
                    Comment c = doc.createComment(n.getNodeValue());
                    documentationEl.appendChild(c);
                    break;
                default:
                    break;
                }
View Full Code Here

      case Node.COMMENT_NODE:
      {
        if(dexter.isPropigateComments())
        {
          indentWithWhitespace();
          Comment comment = currentDocument.createComment(name);
          currentNode.appendChild(comment);
        }
        lastWasEntity = false;
      }
      break;
View Full Code Here

            .getChildNodes();
        boolean inserted = false;
        for (int a = 0; a < childNodes2.getLength(); a++) {
          Node item = childNodes2.item(a);
          if (item instanceof Comment) {
            Comment mn = (Comment) item;
            if (mn.getTextContent().contains(
                ONPOSITIVE_COMMENTS_MARK)) {
              for (Element e : toAppend) {
                Node adoptNode = myWebXML.adoptNode(e
                    .cloneNode(true));
                if (a != childNodes2.getLength() - 1) {
                  try {
                    myWebXML.getDocumentElement()
                        .insertBefore(adoptNode,
                            childNodes.item(a + 1));
                  } catch (DOMException ex) {
                    mn.getParentNode().appendChild(
                        adoptNode);
                  }
                } else {
                  myWebXML.appendChild(adoptNode);
                }
View Full Code Here

      case Node.COMMENT_NODE:
      {
        if(dexter.isPropigateComments())
        {
          indentWithWhitespace();
          Comment comment = currentDocument.createComment(name);
          currentNode.appendChild(comment);
        }
        lastWasEntity = false;
      }
      break;
View Full Code Here

      }
      Element propNode = doc.createElement("property");
      conf.appendChild(propNode);

      if (updatingResource != null) {
        Comment commentNode = doc.createComment(
          "Loaded from " + updatingResource.get(name));
        propNode.appendChild(commentNode);
      }
      Element nameNode = doc.createElement("name");
      nameNode.appendChild(doc.createTextNode(name));
View Full Code Here

TOP

Related Classes of org.w3c.dom.Comment

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.