A representation of an XML DocumentType
node.
Methods
Method | Return type | Brief description |
---|---|---|
detach() | Content | Detaches the node from its parent Element node. |
getElementName() | String | Gets the name of the root Element node specified in the DocType declaration. |
getInternalSubset() | String | Gets the internal subset data for the DocumentType node. |
getParentElement() | Element | Gets the node's parent Element node. |
getPublicId() | String | Gets the public ID of the external subset data for the DocumentType node. |
getSystemId() | String | Gets the system ID of the external subset data for the DocumentType node. |
getValue() | 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. |
setElementName(name) | DocType | Sets the name of the root Element node to specify in the DocType
declaration. |
setInternalSubset(data) | DocType | Sets the internal subset data for the DocumentType node. |
setPublicId(id) | DocType | Sets the public ID of the external subset data for the DocumentType node. |
setSystemId(id) | DocType | Sets 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
Name | Type | Description |
---|---|---|
name | String | the 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
Name | Type | Description |
---|---|---|
data | String | the 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
Name | Type | Description |
---|---|---|
id | String | the 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
Name | Type | Description |
---|---|---|
id | String | the system ID of the external subset data to set |
Return
DocType
— the DocumentType
node, for chaining