Java 8 DocumentType - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DocumentType class.

This code example shows how to use the following methods: getName, getPublicId, getSystemId
    } else { 
      assertNotNull(text, maker);
      DOMImplementation impl = DOMImplementationRegistry.newInstance()
          .getDOMImplementation("XML 1.0 Traversal"); 
      DocumentType doctype = maker.apply(impl);
      assertEquals(text, name, doctype.getName());
      assertEquals(text, systemId, doctype.getSystemId());
      assertEquals(text, pubid, doctype.getPublicId());
    } 
  } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getPublicId, getSystemId
      String publicId;
      String systemId;
      doc = (Document) load("staffNS", builder);
      domImpl = doc.getImplementation();
      docType = domImpl.createDocumentType("l2:root", "PUB", "SYS");
      publicId = docType.getPublicId();
      systemId = docType.getSystemId();
      assertEquals("documenttypepublicid01", "PUB", publicId);
      assertEquals("documenttypesystemid01", "SYS", systemId);
      } 
 
} 
 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getInternalSubset, getName, getPublicId, getSystemId
		write(node.getDocumentElement());
	} 
 
	protected void write(DocumentType node) throws ShellException {
		printWriter.print("<!DOCTYPE "); //$NON-NLS-1$
		printWriter.print(node.getName());
		String publicId = node.getPublicId();
		String systemId = node.getSystemId();
		if (publicId != null) {
			printWriter.print(" PUBLIC \""); //$NON-NLS-1$
			printWriter.print(publicId);
			printWriter.print("\" \""); //$NON-NLS-1$
			printWriter.print(systemId);
			printWriter.print('\"');
		} else if (systemId != null) {
			printWriter.print(" SYSTEM \""); //$NON-NLS-1$
			printWriter.print(systemId);
			printWriter.print('"');
		} 
 

5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getName, getPublicId, getSystemId
  { 
    if (newChild instanceof StandaloneDocumentType)
      { 
        DocumentType dt = (DocumentType) newChild;
        newChild = ((GnomeDocument) getOwnerDocument())
          .createDocumentType(dt.getName(), dt.getPublicId(),
                              dt.getSystemId());
      } 
    if (newChild == null)
      { 
        throw new GnomeDOMException(DOMException.NOT_FOUND_ERR, null);
      } 
    if (!(newChild instanceof GnomeNode))
      { 
        throw new GnomeDOMException(DOMException.WRONG_DOCUMENT_ERR, null);
      } 
    if (refChild == null || !(refChild instanceof GnomeNode))
      { 
        throw new GnomeDOMException(DOMException.NOT_FOUND_ERR, null);
      } 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getName, getPublicId, getSystemId, getNamespaceURI
        DocumentType controlDocType = controlDocument.getDoctype();
 
        log(systemDocument);
        log(controlDocument);
 
        this.assertEquals(controlDocType.getName(), systemDocType.getName());
        this.assertEquals(controlDocType.getNamespaceURI(), systemDocType.getNamespaceURI());
        this.assertEquals(controlDocType.getPublicId(), systemDocType.getPublicId());
        this.assertEquals(controlDocType.getSystemId(), systemDocType.getSystemId());
 
        assertXMLIdentical(controlDocument, systemDocument);
 
    } 
 
    public void testCreateDocumentWithSystemIdentifierNullName() throws Exception {
        XMLPlatform xmlPlatform = XMLPlatformFactory.getInstance().getXMLPlatform();
        try { 
            Document systemDocument = xmlPlatform.createDocumentWithSystemIdentifier(null, "http://127.0.0.1/manual.dtd");
        } catch (XMLPlatformException platformException) {
            assertTrue("The wrong XMLPlatformException was thrown.", platformException.getErrorCode() == XMLPlatformException.XML_PLATFORM_COULD_NOT_CREATE_DOCUMENT);
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Java 8 DocumentType Methods: