SetDocType
Description
Sets the DOCTYPE declaration of this document.
Syntax
|
1 |
pbdom_document_name.SetDocType(pbdom_doctype pbdom_doctype_ref) |
|
Argument |
Description |
|---|---|
|
pbdom_document_name |
The name of a PBDOM_DOCUMENT object |
|
pbdom_doctype_ref |
A PBDOM_DOCTYPE object to be set as the DOCTYPE of |
Return value
PBDOM_DOCUMENT. The same PBDOM_DOCUMENT object with a modified
DOCTYPE declaration.
Throws
EXCEPTION_INVALID_ARGUMENT — The input PBDOM_DOCTYPE is invalid.
This can happen if it has not been initialized properly or is a
null object reference.
EXCEPTION_USE_OF_UNNAMED_PBDOM_OBJECT — The input PBDOM_DOCTYPE
is nameable and has not been given a user-defined name.
EXCEPTION_WRONG_DOCUMENT_ERROR — The input PBDOM_DOCTYPE already
has an owner document.
EXCEPTION_PBDOM_OBJECT_ALREADY_HAS_PARENT — The input
PBDOM_DOCTYPE is already the DOCTYPE of another document.
Usage
If this document already contains a DOCTYPE declaration, the new
PBDOM_DOCTYPE replaces it. The DOCTYPE of a PBDOM_DOCUMENT object can be
changed multiple times, and it is legal for a user to call the
SetDocType method multiple times.
A DOM DOCTYPE object can have no owner document, or it can have an
owner document but no parent node. A DOCTYPE that has an owner document
as well as a parent node is the actual DOCTYPE of the owner
document.