Low-level parse5 node manipulation utilities.
const utils = require('parse5-utils')
Parse an HTML string,
If smart
, returns a document
or documentFragment
, appropriately.
Otherwise, always parses it as a document.
Parses HTML as a fragment.
Converts an AST into an HTML string.
Get the attributes of a node as an object.
Set an attribute of a node.
Get the attribute of a node.
Set a node's attributes from an object.
Create a node with a specific tag name.
Create a text node.
Add a child to a node, making it the first child.
Add a child to a node, making it the last child.
Replace a node with another node.
Remove a node.
Get all the nodes in a tree as a flat array.
Get the text of a node.
Set the text of a node.