XML::DOM::DocumentType(3pm) | User Contributed Perl Documentation | XML::DOM::DocumentType(3pm) |
XML::DOM::DocumentType - An XML document type (DTD) in XML::DOM
XML::DOM::DocumentType extends XML::DOM::Node.
Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Level 1 Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML scheme efforts on DTD representation are not clearly understood as of this writing. The DOM Level 1 doesn't support editing DocumentType nodes.
Not In DOM Spec: This implementation has added a lot of extra functionality to the DOM Level 1 interface. To allow editing of the DocumentType nodes, see XML::DOM::ignoreReadOnly.
<!DOCTYPE ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar "bar"> <!ENTITY % baz "baz"> ]> <ex/>
the interface provides access to foo and bar but not baz. Every node in this map also implements the Entity interface.
The DOM Level 1 does not support editing entities, therefore entities cannot be altered in any way.
Not In DOM Spec: See XML::DOM::ignoreReadOnly to edit the DocumentType etc.
The DOM Level 1 does not support editing notations, therefore notations cannot be altered in any way.
Not In DOM Spec: See XML::DOM::ignoreReadOnly to edit the DocumentType etc.
$doctype = $doc->createDocumentType ($name, $sysId, $pubId, $internal);
To set (or replace) the DocumentType for a particular document, use:
$doc->setDocType ($doctype);
Parameters:
notationName the entity name.
value the entity value.
sysId the system id (if any.)
pubId the public id (if any.)
ndata the NDATA declaration (if any, for general unparsed
entities.)
parameter whether it is a parameter entity (%ent;) or not
(&ent;).
SysId, pubId and ndata may be undefined.
DOMExceptions:
Raised if the notationName does not conform to the XML spec.
Parameters:
name the notation name.
base the base to be used for resolving a relative URI.
sysId the system id.
pubId the public id.
Base, sysId, and pubId may all be undefined. (These parameters are passed by the XML::Parser Notation handler.)
DOMExceptions:
Raised if the notationName does not conform to the XML spec.
See XML::DOM::AttDef::new for the other parameters.
Parameters:
elem The element tagName.
attr The attribute name.
2022-10-14 | perl v5.34.0 |