func NodeNextElementSibling(n *Node) *Node {
	for e := n.NextSibling; e != nil; e = e.NextSibling {
		if e.Type == NodeText {
			continue
		}
		return e
	}
	return nil
}
NodeNextElementSibling returns the next element sibling of the node.
package html
import (
	"fmt"
	"strings"
)
func NodeGetID(n *Node) string {
	for k, v := range n.Attributes {
		if k != "id" {
			continue
		}
		return v
	}
	return ""
}
func NodeGetClasses(n *Node) []string {
	for k, v := range n.Attributes {
		if k != "class" {
			continue
		}
		return strings.Fields(v)
	}
	return nil
}
func NodeChildren(n *Node) []*Node {
	var children []*Node
	f := n.FirstChild
	if f == nil {
		return children
	}
	children = append(children, f)
	next := f.NextSibling
	for next != nil {
		children = append(children, next)
		next = next.NextSibling
	}
	return children
}
func NodeFirstElementChild(n *Node) *Node {
	for e := n.FirstChild; e != nil; e = e.NextSibling {
		if e.Type == NodeText {
			continue
		}
		return e
	}
	return nil
}
func NodeLastElementChild(n *Node) *Node {
	for e := n.LastChild; e != nil; e = e.PrevSibling {
		if e.Type == NodeText {
			continue
		}
		return e
	}
	return nil
}