Class DocType

DocType

A representation of an XML DocumentType node.

Methods

MethodReturn typeBrief description
detach()ContentDetaches the node from its parent Element node.
getElementName()StringGets the name of the root Element node specified in the DocType declaration.
getInternalSubset()StringGets the internal subset data for the DocumentType node.
getParentElement()ElementGets the node's parent Element node.
getPublicId()StringGets the public ID of the external subset data for the DocumentType node.
getSystemId()StringGets the system ID of the external subset data for the DocumentType node.
getValue()StringGets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document.
setElementName(name)DocTypeSets the name of the root Element node to specify in the DocType declaration.
setInternalSubset(data)DocTypeSets the internal subset data for the DocumentType node.
setPublicId(id)DocTypeSets the public ID of the external subset data for the DocumentType node.
setSystemId(id)DocTypeSets the system ID of the external subset data for the DocumentType 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 — the detached node


getElementName()

Gets the name of the root Element node specified in the DocType declaration.

Return

String — the name of the root Element node specified in the DocType declaration


getInternalSubset()

Gets the internal subset data for the DocumentType node.

Return

String — the internal subset data


getParentElement()

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

Return

Element — the parent Element node


getPublicId()

Gets the public ID of the external subset data for the DocumentType node.

Return

String — the public ID of the external subset data


getSystemId()

Gets the system ID of the external subset data for the DocumentType node.

Return

String — the system ID of the external subset data


getValue()

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


setElementName(name)

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

Parameters

NameTypeDescription
nameStringthe name of the root Element node to specify in the DocType declaration

Return

DocType — the DocumentType node, for chaining


setInternalSubset(data)

Sets the internal subset data for the DocumentType node.

Parameters

NameTypeDescription
dataStringthe internal subset data to set

Return

DocType — the DocumentType node, for chaining


setPublicId(id)

Sets the public ID of the external subset data for the DocumentType node.

Parameters

NameTypeDescription
idStringthe public ID of the external subset data to set

Return

DocType — the DocumentType node, for chaining


setSystemId(id)

Sets the system ID of the external subset data for the DocumentType node.

Parameters

NameTypeDescription
idStringthe system ID of the external subset data to set

Return

DocType — the DocumentType node, for chaining