DoctypeDecl

DoctypeDecl

XML DocType, like

Constructor

new DoctypeDecl(doctypeName, sysidopt, pubidopt, hasInternalSubsetopt)

Description:
  • Creates an instance of DoctypeDecl.
Source:
See:
Parameters:
Name Type Attributes Description
doctypeName string
sysid string <optional>
pubid string <optional>
hasInternalSubset boolean <optional>

Extends

Classes

DoctypeDecl

Members

children :Array.<Node>

Source:
Overrides:
Type:

Methods

add(node) → {Node}

Description:
  • Add a child node. Side effect: sets the parent of the added node.
Source:
Overrides:
Parameters:
Name Type Description
node Node The node to add
Returns:
The added node
Type
Node

(generator) descendantElements() → {Generator.<Element>}

Description:
  • Iterate over all of the descendants of this node which are Elements, to infinite depth, in prefix order. That is, parents are yielded before their children.
Source:
Overrides:
Returns:
Type
Generator.<Element>

(generator) descendants() → {Generator.<Node>}

Description:
  • Iterate over all of the descendants of this node, to infinite depth, in prefix order. That is, parents are yielded before their children.
Source:
Overrides:
Returns:
Type
Generator.<Node>

(generator) elements(localopt, nsopt) → {Generator.<Element>}

Description:
  • Iterate over all of the children of this Node which are Elements and match the given local name and namespace (if specified).
Source:
Overrides:
Parameters:
Name Type Attributes Description
local string <optional>
The localname. If not given, match elements with any name
ns string <optional>
The namespace URI to match. If not given, match elements with any namespace.
Returns:
Type
Generator.<Element>

text(newTextopt) → {string|Node}

Description:
  • Gets the text associated with all of the child nodes, concatenated together. This sometimes has surprising results, because of included whitespace.
Source:
Overrides:
Parameters:
Name Type Attributes Description
newText string <optional>
New text to insert. Invalid on ParentNode but used for subclasses.
Returns:
The concatenated text
Type
string | Node

toString(optionsopt) → {string}

Description:
  • Convert to string.
Source:
Overrides:
Parameters:
Name Type Attributes Description
options MaybeStylizedSeparated <optional>
How to convert to string
Returns:
The node, converted to a string
Type
string