Package nu.xom

Examples of nu.xom.Comment


        return new NodeFactory().startMakingDocument();
      case XMLStreamConstants.PROCESSING_INSTRUCTION:
        return new ProcessingInstruction(
            reader.getPITarget(), reader.getPIData());
      case XMLStreamConstants.COMMENT:
        return new Comment(reader.getText());
      case XMLStreamConstants.SPACE:
      case XMLStreamConstants.CDATA:
      case XMLStreamConstants.ENTITY_REFERENCE:
      case XMLStreamConstants.CHARACTERS:
        return readText();
View Full Code Here


        case XMLStreamConstants.PROCESSING_INSTRUCTION:
          node = new ProcessingInstruction(
              reader.getPITarget(), reader.getPIData());
          break;
        case XMLStreamConstants.COMMENT:
          node = new Comment(reader.getText());
          break;
        case XMLStreamConstants.SPACE:
        case XMLStreamConstants.CDATA:
        case XMLStreamConstants.ENTITY_REFERENCE:
        case XMLStreamConstants.CHARACTERS:
View Full Code Here

    if (dst == null) return null; // NONE;
    return factory.makeAttribute(qname, namespaceURI, value, attrType);
  }
 
  private Comment readComment(ArrayByteList src, int type) {
    return new Comment(readString(src, 4, type));
  }
View Full Code Here

        break;
      case Type.TEXT:
        value = new Text(node.getStringValue());
        break;
      case Type.COMMENT:
        value = new Comment(node.getStringValue());
        break;
      case Type.PROCESSING_INSTRUCTION:
        value = new ProcessingInstruction(node.getLocalPart(), node.getStringValue());
        break;
      case Type.NAMESPACE:
View Full Code Here

        log("", new Attribute(name, URI, value, type));
        return child.makeAttribute(name, URI, value, type);
      }
 
      public Nodes makeComment(String data) {
        log("", new Comment(data));
        return child.makeComment(data);
      }
 
      public Nodes makeDocType(String rootElementName, String publicID, String systemID) {
        log("", new DocType(rootElementName, publicID, systemID));
View Full Code Here

      }
 
      public Nodes makeComment(String data) {
        flush();
        try {
          serializer.write(new Comment(data));
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
        return NONE;
      }
View Full Code Here

    
        Element root = new Element("root");
        Document doc = new Document(root);
        DocType doctype = new DocType("root");
        doc.setDocType(doctype);
        Comment c = new Comment("test");
        doc.insertChild(c, 0);
       
        Nodes result = doc.query("child::node()[1]");
        assertEquals(1, result.size());
        assertEquals(c, result.get(0));
View Full Code Here

        Element parent = new Element("Test");
        Element child = new Element("child");
        parent.appendChild(child);
        grandparent.appendChild(parent);
       
        Comment c1 = new Comment("c1");
        Comment c2 = new Comment("c2");
        Comment c3 = new Comment("c3");
        Comment c4 = new Comment("c4");
       
        doc.insertChild(c1, 0);
        grandparent.insertChild(c2, 0);
        parent.insertChild(c3, 0);
        child.insertChild(c4, 0);
View Full Code Here

        Element parent = new Element("Test");
        Element child = new Element("child");
        parent.appendChild(child);
        grandparent.appendChild(parent);
       
        Comment c1 = new Comment("c1");
        Comment c2 = new Comment("c2");
        Comment c3 = new Comment("c3");
        Comment c4 = new Comment("c4");
       
        doc.insertChild(c1, 0);
        grandparent.insertChild(c2, 0);
        parent.insertChild(c3, 0);
        child.insertChild(c4, 0);
View Full Code Here

        Element parent = new Element("Test");
        Element child = new Element("child");
        parent.appendChild(child);
        grandparent.appendChild(parent);
       
        Comment c1 = new Comment("c1");
        Comment c2 = new Comment("c2");
        Comment c3 = new Comment("c3");
        Comment c4 = new Comment("c4");
       
        doc.insertChild(c1, 0);
        grandparent.insertChild(c2, 0);
        parent.insertChild(c3, 0);
        child.insertChild(c4, 0);
View Full Code Here

TOP

Related Classes of nu.xom.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.