vibe.d beta banner
get vibe.d
0.8.4

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

NameDescription
this Constructs a new node.

Fields

NameTypeDescription
attribs NodeAttribsFlags that control the parser and generator behavior.
attributes Attribute[]A key-value set of attributes.
contents NodeContent[]The main contents of the node.
loc LocationStart location of the node in the source file.
name stringName of the node

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

NameDescription
addText Adds a piece of text to the node's contents.
getAttribute Returns a given named attribute.
hasAttribute
hasNonWhitespaceContent Determines if this node has any non-whitespace contents.
isProceduralTextNode Tests if the node consists only of text and interpolations, but doesn't contain child nodes.
isTextNode Tests if the node consists of only a single, static string.
opEquals
opEquals Compares all properties of two nodes for equality.
setAttribute
stripIfOnlyWhitespace Removes all content if it conists of only white space.
stripLeadingWhitespace Strips any leading whitespace from the contents.
stripTrailingWhitespace Strips any trailign whitespace from the contents.
toString Outputs a simple string representation of the node.

Enums

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