package
0.0.0-20220808181603-57974efc943c
Repository: https://github.com/ampproject/amppackager.git
Documentation: pkg.go.dev
# Functions
AppendAttribute appends to any existing value of the attribute on node n with namespace and key with val.
AppendAttributeWithSeparator appends to any existing value of the attribute on node n with namespace and key with val.
AppendChildren appends the array of nodes to node n.
Element returns an html.Node for an element with tag and attributes.
FindAttribute returns a pointer to the attribute of node n with the given namespace and key or ok=false if there is none.
FindNode returns the (first) specified child node of the given atom type or ok=false if there are none.
GetAttributeVal returns the value for the attribute named with 'key' or ok=false if the attribute doesn't exist.
GetAttributeValOrNil returns a pointer to the value for the attribute named with 'key' or nil if the attribute doesn't exist.
HasAttribute returns true if the node has the attribute named with 'key'.
HasAttributeAndIsNotEmpty return true if the node has the attribute named with 'key' and it's value is not empty.
IsChildOf returns true if the node is a direct descendant (immediate child) of the given atom.
IsDescendantOf returns true if the node is a descendant of the given atom, regardless of distance (e.g.
Next returns the next node in depth first order.
NextSkippingChildren returns the next node in document order, but ignores the children of the passed in node.
PrependAttribute prepends to any existing value of the attribute on node n with namespace and key with val.
Prev returns the prev node in depth first order.
RemoveAllChildren removes all children from node n.
RemoveAttribute removes the given attribute from node n.
RemoveNode removes the node and adjusts the Node pointer to continue iterating over the remaining tree nodes.
SetAttribute overrides the value of the attribute on node n with namespace and key with val.
Text returns an html.Node containing the given string.