Class DocType

  • DocType represents an XML DocumentType node.

  • It provides methods to get and set various properties of the DocType, such as the element name, internal and external subset data, and its parent element.

  • The detach() method removes the DocType node from its parent.

Doc Type

A representation of an XML Document Type node.

Methods

Method Return type Brief description
Content |null Detaches the node from its parent Element node.
String Gets the name of the root Element node specified in the Doc Type declaration.
String Gets the internal subset data for the Document Type node.
Element |null Gets the node's parent Element node.
String Gets the public ID of the external subset data for the Document Type node.
String Gets the system ID of the external subset data for the Document Type node.
String Gets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document.
Doc Type Sets the name of the root Element node to specify in the Doc Type declaration.
Doc Type Sets the internal subset data for the Document Type node.
Doc Type Sets the public ID of the external subset data for the Document Type node.
Doc Type Sets the system ID of the external subset data for the Document Type node.

Detailed documentation

detach()

Detaches the node from its parent Element node. If the node does not have a parent, this method has no effect.

Return

Content |null — The detached node.


get Element Name()

Gets the name of the root Element node specified in the Doc Type declaration.

Return

String — The name of the root Element node specified in the Doc Type declaration.


get Internal Subset()

Gets the internal subset data for the Document Type node.

Return

String — The internal subset data.


get Parent Element()

Gets the node's parent Element node. If the node does not have a parent, this method returns null .

Return

Element |null — The parent Element node.


get Public Id()

Gets the public ID of the external subset data for the Document Type node.

Return

String — The public ID of the external subset data.


get System Id()

Gets the system ID of the external subset data for the Document Type node.

Return

String — The system ID of the external subset data.


get Value()

Gets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document.

Return

String — The text value of all nodes that are direct or indirect children of the node.


set Element Name(name)

Sets the name of the root Element node to specify in the Doc Type declaration.

Parameters

Name Type Description
name
String The name of the root Element node to specify in the Doc Type declaration.

Return

Doc Type — The Document Type node, for chaining.


set Internal Subset(data)

Sets the internal subset data for the Document Type node.

Parameters

Name Type Description
data
String The internal subset data to set.

Return

Doc Type — The Document Type node, for chaining.


set Public Id(id)

Sets the public ID of the external subset data for the Document Type node.

Parameters

Name Type Description
id
String The public ID of the external subset data to set.

Return

Doc Type — The Document Type node, for chaining.


set System Id(id)

Sets the system ID of the external subset data for the Document Type node.

Parameters

Name Type Description
id
String The system ID of the external subset data to set.

Return

Doc Type — The Document Type node, for chaining.

Design a Mobile Site
View Site in Mobile | Classic
Share by: