# class DocType

Extends Parent

Represents an XML DOCTYPE declaration; that is, the contents of <!DOCTYPE ... >. DOCTYPES can be used to declare the DTD of a document, as well as being used to declare entities used in the document.

## Attributes

- external_id
- name

## Methods

- add_entity_sub
- clone
- DocType
- DocType
- DocType
- initialize
- parse_entities
- write

## Attributes

external_id (reader) name is the name of the doctype external_id is the referenced DTD, if given
name (reader) name is the name of the doctype external_id is the referenced DTD, if given

## Methods

### add_entity_sub

#### Arguments

ent

### clone

### DocType

#### Arguments

parse_stream source
listener

### DocType

#### Arguments

parser source

### DocType

#### Arguments

parse_entities_source source
listener

### initialize

#### Arguments

first
can be multiple types. If String, name is set to this and external_id is set to nil. If DocType, the object is cloned. If Source, the source is scanned for the DOCTYPE declaration.
parent<nil>
if given, is set as the parent of this object

Constructor

### parse_entities

#### Arguments

src

### write

#### Arguments

output
indent<0>