vibe.d beta banner
get vibe.d
0.8.0

Asynchronous I/O that doesn’t get in your way, written in D

Class Node

Represents a single node in the DOM tree.

class Node ;

Constructors

Constructors

NameDescription
thisConstructs a new node.

Fields

Fields

NameTypeDescription
attribsNodeAttribsFlags that control the parser and generator behavior.
attributesAttribute[]A key-value set of attributes.
contentsNodeContent[]The main contents of the node.
locLocationStart location of the node in the source file.
namestringName of the node

Properties

Properties

NameTypeDescription
class_[get]inout(Attribute)Returns "class" attribute - a white space separated list of style class identifiers.
id[get]inout(Attribute)Returns the "id" attribute.

Methods

Methods

NameDescription
addTextAdds a piece of text to the node's contents.
getAttributeReturns a given named attribute.
hasAttribute
hasNonWhitespaceContentDetermines if this node has any non-whitespace contents.
isProceduralTextNodeTests if the node consists only of text and interpolations, but doesn't contain child nodes.
isTextNodeTests if the node consists of only a single, static string.
opEquals
opEqualsCompares all properties of two nodes for equality.
setAttribute
stripIfOnlyWhitespaceRemoves all content if it conists of only white space.
stripLeadingWhitespaceStrips any leading whitespace from the contents.
stripTrailingWhitespaceStrips any trailign whitespace from the contents.
toStringOutputs a simple string representation of the node.

Enums

Enums

NameDescription
SpecialNameA set of names that identify special-purpose nodes
Authors
Copyright
License