Package org.jsoup.nodes

Class DocumentType

java.lang.Object
org.jsoup.nodes.Node
org.jsoup.nodes.LeafNode
org.jsoup.nodes.DocumentType
All Implemented Interfaces:
Cloneable

public class DocumentType extends LeafNode
A <!DOCTYPE> node.
  • Field Details

  • Constructor Details

    • DocumentType

      public DocumentType(String name, String publicId, String systemId)
      Create a new doctype element.
      Parameters:
      name - the doctype's name
      publicId - the doctype's public ID
      systemId - the doctype's system ID
  • Method Details

    • setPubSysKey

      public void setPubSysKey(@Nullable String value)
    • name

      public String name()
      Get this doctype's name (when set, or empty string)
      Returns:
      doctype name
    • publicId

      public String publicId()
      Get this doctype's Public ID (when set, or empty string)
      Returns:
      doctype Public ID
    • systemId

      public String systemId()
      Get this doctype's System ID (when set, or empty string)
      Returns:
      doctype System ID
    • nodeName

      public String nodeName()
      Description copied from class: Node
      Get the node name of this node. Use for debugging purposes and not logic switching (for that, use instanceof).
      Specified by:
      nodeName in class Node
      Returns:
      node name